Skip to content

Commit fb51504

Browse files
server: dedicate vxlan range to account (#7215)
This fixes #6871
1 parent 96897f0 commit fb51504

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4048,12 +4048,14 @@ public GuestVlanRange dedicateGuestVlanRange(DedicateGuestVlanRangeCmd cmd) {
40484048
}
40494049
vlanOwnerId = vlanOwner.getAccountId();
40504050

4051-
// Verify physical network isolation type is VLAN
4051+
// Verify physical network isolation methods contain VLAN or VXLAN
40524052
PhysicalNetworkVO physicalNetwork = _physicalNetworkDao.findById(physicalNetworkId);
40534053
if (physicalNetwork == null) {
40544054
throw new InvalidParameterValueException("Unable to find physical network by id " + physicalNetworkId);
4055-
} else if (!physicalNetwork.getIsolationMethods().isEmpty() && !physicalNetwork.getIsolationMethods().contains("VLAN")) {
4056-
throw new InvalidParameterValueException("Cannot dedicate guest vlan range. " + "Physical isolation type of network " + physicalNetworkId + " is not VLAN");
4055+
} else if (!physicalNetwork.getIsolationMethods().isEmpty() &&
4056+
!physicalNetwork.getIsolationMethods().contains("VLAN") &&
4057+
!physicalNetwork.getIsolationMethods().contains("VXLAN")) {
4058+
throw new InvalidParameterValueException("Cannot dedicate guest vlan range. " + "Physical isolation type of network " + physicalNetworkId + " is not VLAN nor VXLAN");
40574059
}
40584060

40594061
// Get the start and end vlan

0 commit comments

Comments
 (0)