mirror of https://github.com/apache/cloudstack.git
VPC: CS-16179 - only offerings in Enabled state can be used for VPC creation
Reviewed-by: Frank Zhang Conflicts: server/src/com/cloud/network/vpc/VpcManagerImpl.java
This commit is contained in:
parent
3609e44b58
commit
48806fcc54
|
|
@ -528,8 +528,9 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
|
||||
// Validate vpc offering
|
||||
VpcOfferingVO vpcOff = _vpcOffDao.findById(vpcOffId);
|
||||
if (vpcOff == null) {
|
||||
InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find vpc offering by specified id");
|
||||
if (vpcOff == null || vpcOff.getState() != State.Enabled) {
|
||||
InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find vpc offering in " + State.Enabled +
|
||||
" state by specified id");
|
||||
ex.addProxyObject("vpc_offerings", vpcOffId, "vpcOfferingId");
|
||||
throw ex;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue