*/
List<NeutronPort> myPorts;
- boolean gatewayIPAssigned;
+ Boolean gatewayIPAssigned;
public NeutronSubnet() {
myPorts = new ArrayList<NeutronPort>();
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) {
gatewayIPAssigned = false;
}
+ public Boolean getGatewayIPAllocated() {
+ return gatewayIPAssigned;
+ }
+
@Override
public String toString() {
return "NeutronSubnet [subnetUUID=" + subnetUUID + ", networkUUID=" + networkUUID + ", name=" + name