diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index 1ddb7c3d06e..d2b98a054cd 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -542,7 +542,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag if (ipOwner == null) { throw new InvalidParameterValueException("Unable to find account " + accountName + " in domain " + domainId + ", permission denied"); } - + _accountMgr.checkAccess(caller, null, ipOwner); DataCenterVO zone = null; @@ -551,6 +551,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag if (zone == null) { throw new InvalidParameterValueException("Can't find zone by id " + zoneId); } + + if (zone.getNetworkType() == NetworkType.Basic) { + throw new InvalidParameterValueException("Can't associate ip in basic zone"); + } if (Grouping.AllocationState.Disabled == zone.getAllocationState() && !_accountMgr.isRootAdmin(caller.getType())) { throw new PermissionDeniedException("Cannot perform this operation, Zone is currently disabled: " + zoneId);