mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
VPC: CS-15725 - don't allow regular offering upgrade to the offering that can be used inside vpc only
This commit is contained in:
parent
e0c85c0d41
commit
9be0a5525d
@ -4718,6 +4718,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
}
|
||||
|
||||
|
||||
//can't update from vpc to non-vpc network offering
|
||||
boolean forVpcNew = _configMgr.isOfferingForVpc(networkOffering);
|
||||
boolean vorVpcOriginal = _configMgr.isOfferingForVpc(_configMgr.getNetworkOffering(oldNetworkOfferingId));
|
||||
if (forVpcNew != vorVpcOriginal) {
|
||||
String errMsg = forVpcNew ? "a vpc offering " : "not a vpc offering";
|
||||
throw new InvalidParameterValueException("Can't update as the new offering is " + errMsg);
|
||||
}
|
||||
|
||||
//can't update from vpc to non-vpc network offering
|
||||
boolean forVpcNew = _configMgr.isOfferingForVpc(networkOffering);
|
||||
boolean vorVpcOriginal = _configMgr.isOfferingForVpc(_configMgr.getNetworkOffering(oldNetworkOfferingId));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user