This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.17 by this push:
     new fb51504dff0 server: dedicate vxlan range to account (#7215)
fb51504dff0 is described below

commit fb51504dff0ba6545b1bde722554924c3455d6ff
Author: Wei Zhou <[email protected]>
AuthorDate: Wed Apr 19 08:44:53 2023 +0200

    server: dedicate vxlan range to account (#7215)
    
    This fixes #6871
---
 server/src/main/java/com/cloud/network/NetworkServiceImpl.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java 
b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
index 2aca1f7c649..8f2d250f056 100644
--- a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
@@ -4048,12 +4048,14 @@ public class NetworkServiceImpl extends ManagerBase 
implements NetworkService, C
         }
         vlanOwnerId = vlanOwner.getAccountId();
 
-        // Verify physical network isolation type is VLAN
+        // Verify physical network isolation methods contain VLAN or VXLAN
         PhysicalNetworkVO physicalNetwork = 
_physicalNetworkDao.findById(physicalNetworkId);
         if (physicalNetwork == null) {
             throw new InvalidParameterValueException("Unable to find physical 
network by id " + physicalNetworkId);
-        } else if (!physicalNetwork.getIsolationMethods().isEmpty() && 
!physicalNetwork.getIsolationMethods().contains("VLAN")) {
-            throw new InvalidParameterValueException("Cannot dedicate guest 
vlan range. " + "Physical isolation type of network " + physicalNetworkId + " 
is not VLAN");
+        } else if (!physicalNetwork.getIsolationMethods().isEmpty() &&
+                !physicalNetwork.getIsolationMethods().contains("VLAN") &&
+                !physicalNetwork.getIsolationMethods().contains("VXLAN")) {
+            throw new InvalidParameterValueException("Cannot dedicate guest 
vlan range. " + "Physical isolation type of network " + physicalNetworkId + " 
is not VLAN nor VXLAN");
         }
 
         // Get the start and end vlan

Reply via email to