X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2FNeutronSubnet.java;h=1f10b395137c498b3e542e974545132332e84be4;hp=840029006be5b16a4d394bae0d6daa0b5efd65a5;hb=c222e37f2a0f0f3f6266242fbea2d3b018f4e6e3;hpb=5c05558190ade9321f973ac5a7e17a820a9d2e9a diff --git a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java index 840029006b..1f10b39513 100644 --- a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java +++ b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet.java @@ -75,7 +75,7 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable, */ List myPorts; - boolean gatewayIPAssigned; + Boolean gatewayIPAssigned; public NeutronSubnet() { myPorts = new ArrayList(); @@ -299,7 +299,7 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable, try { SubnetUtils util = new SubnetUtils(cidr); SubnetInfo info = util.getInfo(); - if (gatewayIP == null) { + if (gatewayIP == null || ("").equals(gatewayIP)) { gatewayIP = info.getLowAddress(); } if (allocationPools.size() < 1) { @@ -460,6 +460,10 @@ public class NeutronSubnet extends ConfigurationObject implements Serializable, gatewayIPAssigned = false; } + public Boolean getGatewayIPAllocated() { + return gatewayIPAssigned; + } + @Override public String toString() { return "NeutronSubnet [subnetUUID=" + subnetUUID + ", networkUUID=" + networkUUID + ", name=" + name