mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'apache/4.17' into main
This commit is contained in:
commit
f76b6c686d
@ -1075,7 +1075,11 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
||||
if (networkId != null) {
|
||||
guestNetwork = getNetwork(networkId);
|
||||
}
|
||||
if (ipVO.isSourceNat() && guestNetwork != null && guestNetwork.getState() != Network.State.Allocated) {
|
||||
Vpc vpc = null;
|
||||
if (ipVO.getVpcId() != null) {
|
||||
vpc = _vpcMgr.getActiveVpc(ipVO.getVpcId());
|
||||
}
|
||||
if (ipVO.isSourceNat() && ((guestNetwork != null && guestNetwork.getState() != Network.State.Allocated) || vpc != null)) {
|
||||
throw new IllegalArgumentException("ip address is used for source nat purposes and can not be disassociated.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user