mirror of https://github.com/apache/cloudstack.git
parent
96897f07f2
commit
fb51504dff
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue