mirror of https://github.com/apache/cloudstack.git
bug 13871: use perzone and peraccount (no spaces in values) when compare source nat capabilities
status 13871: resolved fixed Reviewed-by: Chiradeep Vittal
This commit is contained in:
parent
4e9b312bf2
commit
4dea695e09
|
|
@ -3213,7 +3213,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
boolean perAccount = value.contains("peraccount");
|
||||
boolean perZone = value.contains("perzone");
|
||||
if ((perAccount && perZone) || (!perAccount && !perZone)) {
|
||||
throw new InvalidParameterValueException("Either perAccount or perZone source NAT type can be specified for " + Capability.SupportedSourceNatTypes.getName());
|
||||
throw new InvalidParameterValueException("Either peraccount or perzone source NAT type can be specified for " + Capability.SupportedSourceNatTypes.getName());
|
||||
}
|
||||
} else if (capability == Capability.RedundantRouter) {
|
||||
boolean enabled = value.contains("true");
|
||||
|
|
@ -3311,7 +3311,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
boolean sharedSourceNat = false;
|
||||
boolean redundantRouter = false;
|
||||
if ((sourceNatServiceCapabilityMap != null) && (!sourceNatServiceCapabilityMap.isEmpty())) {
|
||||
String sourceNatType = sourceNatServiceCapabilityMap.get(Capability.SupportedSourceNatTypes.getName());
|
||||
String sourceNatType = sourceNatServiceCapabilityMap.get(Capability.SupportedSourceNatTypes);
|
||||
if (sourceNatType != null) {
|
||||
_networkMgr.checkCapabilityForProvider(serviceProviderMap.get(Service.SourceNat), Service.SourceNat, Capability.SupportedSourceNatTypes, sourceNatType);
|
||||
sharedSourceNat = sourceNatType.contains("perzone");
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan
|
|||
Map<Capability, String> sourceNatCapabilities = new HashMap<Capability, String>();
|
||||
// Specifies that this element supports either one source NAT rule per account, or no source NAT rules at all;
|
||||
// in the latter case a shared interface NAT rule will be used
|
||||
sourceNatCapabilities.put(Capability.SupportedSourceNatTypes, "per account, per zone");
|
||||
sourceNatCapabilities.put(Capability.SupportedSourceNatTypes, "peraccount, perzone");
|
||||
capabilities.put(Service.SourceNat, sourceNatCapabilities);
|
||||
|
||||
// Specifies that port forwarding rules are supported by this element
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
|
|||
capabilities.put(Service.Gateway, null);
|
||||
|
||||
Map<Capability, String> sourceNatCapabilities = new HashMap<Capability, String>();
|
||||
sourceNatCapabilities.put(Capability.SupportedSourceNatTypes, "per account");
|
||||
sourceNatCapabilities.put(Capability.SupportedSourceNatTypes, "peraccount");
|
||||
sourceNatCapabilities.put(Capability.RedundantRouter, "true");
|
||||
capabilities.put(Service.SourceNat, sourceNatCapabilities);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue