NeutronSubnet subnet = systemCRUD.getSubnet(ip.getSubnetUUID());\r
if (ip.getIpAddress() == null)\r
ip.setIpAddress(subnet.getLowAddr());\r
- if (!ip.getIpAddress().equals(subnet.getGatewayIP()))\r
+ if (!ip.getIpAddress().equals(subnet.getGatewayIP())) {\r
subnet.allocateIP(ip.getIpAddress());\r
- else\r
+ }\r
+ else {\r
subnet.setGatewayIPAllocated();\r
+ }\r
subnet.addPort(input);\r
}\r
INeutronNetworkCRUD networkIf = NeutronCRUDInterfaces.getINeutronNetworkCRUD(this);\r
while (fixedIPIterator.hasNext()) {\r
Neutron_IPs ip = fixedIPIterator.next();\r
NeutronSubnet subnet = systemCRUD.getSubnet(ip.getSubnetUUID());\r
- if (!ip.getIpAddress().equals(subnet.getGatewayIP()))\r
+ if (!ip.getIpAddress().equals(subnet.getGatewayIP())) {\r
subnet.releaseIP(ip.getIpAddress());\r
- else\r
+ }\r
+ else {\r
subnet.resetGatewayIPAllocated();\r
+ }\r
subnet.removePort(port);\r
}\r
return true;\r