mirror of https://github.com/apache/cloudstack.git
server: fix wrong error message when create isolated network without SourceNat (#4624)
This PR fixes wrong message when create isolated network without SourceNat.
This commit is contained in:
parent
a44fb11a02
commit
313ae1f449
|
|
@ -2412,8 +2412,11 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
|
|||
&& (ntwkOff.getGuestType() == GuestType.Shared || (ntwkOff.getGuestType() == GuestType.Isolated
|
||||
&& !_networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SourceNat)));
|
||||
if (cidr == null && ip6Cidr == null && cidrRequired) {
|
||||
throw new InvalidParameterValueException("StartIp/endIp/gateway/netmask are required when create network of" + " type " + Network.GuestType.Shared
|
||||
+ " and network of type " + GuestType.Isolated + " with service " + Service.SourceNat.getName() + " disabled");
|
||||
if (ntwkOff.getGuestType() == GuestType.Shared) {
|
||||
throw new InvalidParameterValueException("StartIp/endIp/gateway/netmask are required when create network of" + " type " + Network.GuestType.Shared);
|
||||
} else {
|
||||
throw new InvalidParameterValueException("gateway/netmask are required when create network of" + " type " + GuestType.Isolated + " with service " + Service.SourceNat.getName() + " disabled");
|
||||
}
|
||||
}
|
||||
|
||||
checkL2OfferingServices(ntwkOff);
|
||||
|
|
|
|||
Loading…
Reference in New Issue