mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3078. Since no default value is set for the isolation type during the physical network creation,
modify guest vlan range dedication to check if the isolation type is VLAN only when an isolation type has been set
This commit is contained in:
parent
fd77b60c5d
commit
c3d3c62a01
|
|
@ -2978,7 +2978,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
|
|||
PhysicalNetworkVO physicalNetwork = _physicalNetworkDao.findById(physicalNetworkId);
|
||||
if (physicalNetwork == null ) {
|
||||
throw new InvalidParameterValueException("Unable to find physical network by id " + physicalNetworkId);
|
||||
} else if (physicalNetwork.getIsolationMethods() == null || !physicalNetwork.getIsolationMethods().contains("VLAN")) {
|
||||
} else if (physicalNetwork.getIsolationMethods() != null && !physicalNetwork.getIsolationMethods().contains("VLAN")) {
|
||||
throw new InvalidParameterValueException("Cannot dedicate guest vlan range. " +
|
||||
"Physical isolation type of network " + physicalNetworkId + " is not VLAN");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue