DaanHoogland commented on a change in pull request #3780: Enhancement: Allow
creating atmost 1 physical network with null tag
URL: https://github.com/apache/cloudstack/pull/3780#discussion_r383183411
##########
File path:
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -5471,9 +5472,14 @@ protected void validateNtwkOffDetails(final Map<Detail,
String> details, final M
for (final PhysicalNetworkVO pNtwk : pNtwks) {
final List<String> pNtwkTag = pNtwk.getTags();
if (pNtwkTag == null || pNtwkTag.isEmpty()) {
- throw new CloudRuntimeException("Tags are not defined
for physical network in the zone id=" + zoneId);
+ if (!allowNullTag) {
+ allowNullTag = true;
+ } else {
+ throw new CloudRuntimeException("There are more
than 1 physical network with empty tag in the zone id=" + zoneId);
+ }
+ } else {
+ pNtwkTags.addAll(pNtwkTag);
Review comment:
yes @ravening, methods seem to grow out of hand in our project so any
addition of more than one line I'd like to see in a separate method. As said
I'm being pedantic, and so open for discussion, but as a matter of principle
and keeping in mind that this is inherited code that will be passed on to
posterity....
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services