X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fimplementation%2FNeutronPortInterface.java;h=273d4209533112d181f106e490a9b459e9477b2a;hb=505ca1cf096d0866e3ea6b82a441e3178b94db66;hp=eea19776eceaeecec1701d1e1ea0934e9826ac36;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;p=controller.git diff --git a/opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/NeutronPortInterface.java b/opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/NeutronPortInterface.java index eea19776ec..273d420953 100644 --- a/opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/NeutronPortInterface.java +++ b/opendaylight/networkconfiguration/neutron/implementation/src/main/java/org/opendaylight/controller/networkconfig/neutron/implementation/NeutronPortInterface.java @@ -222,10 +222,12 @@ public class NeutronPortInterface implements INeutronPortCRUD { NeutronSubnet subnet = systemCRUD.getSubnet(ip.getSubnetUUID()); if (ip.getIpAddress() == null) ip.setIpAddress(subnet.getLowAddr()); - if (!ip.getIpAddress().equals(subnet.getGatewayIP())) + if (!ip.getIpAddress().equals(subnet.getGatewayIP())) { subnet.allocateIP(ip.getIpAddress()); - else + } + else { subnet.setGatewayIPAllocated(); + } subnet.addPort(input); } INeutronNetworkCRUD networkIf = NeutronCRUDInterfaces.getINeutronNetworkCRUD(this); @@ -249,10 +251,12 @@ public class NeutronPortInterface implements INeutronPortCRUD { while (fixedIPIterator.hasNext()) { Neutron_IPs ip = fixedIPIterator.next(); NeutronSubnet subnet = systemCRUD.getSubnet(ip.getSubnetUUID()); - if (!ip.getIpAddress().equals(subnet.getGatewayIP())) + if (!ip.getIpAddress().equals(subnet.getGatewayIP())) { subnet.releaseIP(ip.getIpAddress()); - else + } + else { subnet.resetGatewayIPAllocated(); + } subnet.removePort(port); } return true;