GabrielBrascher commented on a change in pull request #3026: Enhance bypass vlan overlap check URL: https://github.com/apache/cloudstack/pull/3026#discussion_r233532428
########## File path: engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java ########## @@ -2200,7 +2200,7 @@ public Network createGuestNetwork(final long networkOfferingId, final String nam } if (! UuidUtils.validateUUID(vlanId)){ // For Isolated and L2 networks, don't allow to create network with vlan that already exists in the zone - if (ntwkOff.getGuestType() == GuestType.Isolated || ntwkOff.getGuestType() == GuestType.L2) { + if (ntwkOff.getGuestType() == GuestType.Isolated || !(bypassVlanOverlapCheck && ntwkOff.getGuestType() == GuestType.L2)) { Review comment: @gmueller-ewerk this conditional is growing. Can you please extract it to a method? With such a method, it would be possible to have a Javadoc and a couple of JUnit test methods asserting the expected behavior. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services