You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/02/24 10:21:42 UTC

[GitHub] [cloudstack] ravening commented on a change in pull request #3780: Enhancement: Allow creating atmost 1 physical network with null tag

ravening 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_r383180974
 
 

 ##########
 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:
   you mean, move it to a method?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services