mirror of https://github.com/apache/cloudstack.git
Update Subnet purpose for Netris Public Traffic (#17)
* Update Subnet purpose for Netris Public Traffic * search for existing subnet of common purpose type
This commit is contained in:
parent
c8eb0f3779
commit
b497c65ff0
|
|
@ -444,10 +444,10 @@ public class NetrisApiClientImpl implements NetrisApiClient {
|
|||
}
|
||||
ipamAllocationId = new BigDecimal(ipamAllocation.getId());
|
||||
}
|
||||
IpTreeSubnet exactSubnet = getIpamSubnetByAllocationAndPrefixAndPurposeAndVpc(ipamAllocationId, exactCidr, IpTreeSubnet.PurposeEnum.NAT, systemVpc);
|
||||
IpTreeSubnet exactSubnet = getIpamSubnetByAllocationAndPrefixAndPurposeAndVpc(ipamAllocationId, exactCidr, IpTreeSubnet.PurposeEnum.COMMON, systemVpc);
|
||||
if (exactSubnet == null) {
|
||||
String ipamSubnetName = NetrisResourceObjectUtils.retrieveNetrisResourceObjectName(cmd, NetrisResourceObjectUtils.NetrisObjectType.IPAM_SUBNET, exactCidr);
|
||||
createIpamSubnetInternal(ipamSubnetName, exactCidr, SubnetBody.PurposeEnum.NAT, systemVpc);
|
||||
createIpamSubnetInternal(ipamSubnetName, exactCidr, SubnetBody.PurposeEnum.COMMON, systemVpc);
|
||||
}
|
||||
} catch (ApiException e) {
|
||||
String msg = String.format("Error setting up the Netris Public Range %s on super CIDR %s", exactCidr, superCidr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue