revert reserving 1st IP in vpc segments

This commit is contained in:
Pearl Dsilva 2023-10-05 06:56:43 -04:00
parent be9e06f6af
commit 83540aab27
1 changed files with 0 additions and 10 deletions

View File

@ -2044,9 +2044,6 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
if (requestedIp != null) {
return this.acquireGuestIpAddress(network, requestedIp);
}
if ("NsxGuestNetworkGuru".equals(network.getGuruName())) {
return getRouterIp(network.getGateway());
}
String placementConfig = VrouterRedundantTiersPlacement.valueIn(network.getAccountId());
IpPlacement ipPlacement = IpPlacement.fromString(placementConfig);
switch (ipPlacement) {
@ -2058,13 +2055,6 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
return this.acquireGuestIpAddress(network, null);
}
private String getRouterIp(String gatewayIp) {
int i = gatewayIp.lastIndexOf('.');
String ipPart1 = gatewayIp.substring(0, i);
int ipLastOctect = Integer.parseInt(gatewayIp.substring(i+1)) + 1;
return ipPart1.concat("." + ipLastOctect);
}
/**
* Get the list of public IPs that need to be applied for a static NAT enable/disable operation.
* Manipulating only these ips prevents concurrency issues when disabling static nat at the same time.