mirror of https://github.com/apache/cloudstack.git
bug 8819: Don't allow upgrade system network offerings
status 8819: resolved fixed
This commit is contained in:
parent
27c998f706
commit
1025f16940
|
|
@ -2589,8 +2589,6 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd) {
|
||||
String displayText = cmd.getDisplayText();
|
||||
|
|
@ -2600,10 +2598,15 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
Availability availability = null;
|
||||
|
||||
// Verify input parameters
|
||||
NetworkOfferingVO offeringHandle = _networkOfferingDao.findById(id);
|
||||
if (offeringHandle == null) {
|
||||
NetworkOfferingVO offeringToUpdate = _networkOfferingDao.findById(id);
|
||||
if (offeringToUpdate == null) {
|
||||
throw new InvalidParameterValueException("unable to find network offering " + id);
|
||||
}
|
||||
|
||||
//Don't allow to update system network offering
|
||||
if (offeringToUpdate.isSystemOnly()) {
|
||||
throw new InvalidParameterValueException("Can't update system network offerings");
|
||||
}
|
||||
|
||||
NetworkOfferingVO offering = _networkOfferingDao.createForUpdate(id);
|
||||
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
null,
|
||||
null,
|
||||
true,
|
||||
Availability.Required,
|
||||
Availability.Optional,
|
||||
//services - all true except for firewall/lb/vpn and gateway services
|
||||
true, true, true, false, false,false, false, GuestIpType.Direct);
|
||||
defaultGuestDirectNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultGuestDirectNetworkOffering);
|
||||
|
|
|
|||
Loading…
Reference in New Issue