Skip to content

Commit f927971

Browse files
committed
Update Subnet purpose for Netris Public Traffic (#17)
* Update Subnet purpose for Netris Public Traffic * search for existing subnet of common purpose type
1 parent 5a606c5 commit f927971

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisApiClientImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,10 @@ public boolean setupZoneLevelPublicRange(SetupNetrisPublicRangeCommand cmd) {
444444
}
445445
ipamAllocationId = new BigDecimal(ipamAllocation.getId());
446446
}
447-
IpTreeSubnet exactSubnet = getIpamSubnetByAllocationAndPrefixAndPurposeAndVpc(ipamAllocationId, exactCidr, IpTreeSubnet.PurposeEnum.NAT, systemVpc);
447+
IpTreeSubnet exactSubnet = getIpamSubnetByAllocationAndPrefixAndPurposeAndVpc(ipamAllocationId, exactCidr, IpTreeSubnet.PurposeEnum.COMMON, systemVpc);
448448
if (exactSubnet == null) {
449449
String ipamSubnetName = NetrisResourceObjectUtils.retrieveNetrisResourceObjectName(cmd, NetrisResourceObjectUtils.NetrisObjectType.IPAM_SUBNET, exactCidr);
450-
createIpamSubnetInternal(ipamSubnetName, exactCidr, SubnetBody.PurposeEnum.NAT, systemVpc);
450+
createIpamSubnetInternal(ipamSubnetName, exactCidr, SubnetBody.PurposeEnum.COMMON, systemVpc);
451451
}
452452
} catch (ApiException e) {
453453
String msg = String.format("Error setting up the Netris Public Range %s on super CIDR %s", exactCidr, superCidr);

0 commit comments

Comments
 (0)