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_r373134535
##########
File path: server/src/main/java/com/cloud/network/NetworkModelImpl.java
##########
@@ -1154,13 +1154,15 @@ public long findPhysicalNetworkId(long zoneId, String
tag, TrafficType trafficTy
}
if (pNtwks.size() > 1) {
- if (tag == null) {
- throw new InvalidParameterValueException("More than one
physical networks exist in zone id=" + zoneId +
- " and no tags are specified in order to make a choice");
- }
-
Long pNtwkId = null;
for (PhysicalNetwork pNtwk : pNtwks) {
+ if (pNtwk.getTags().isEmpty() && tag == null) {
+ s_logger.debug("Found physical network id=" +
pNtwk.getId() + " with null tag");
Review comment:
a string concal in a log message, can you surround with
if(isDebugEnabled()){}
----------------------------------------------------------------
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