@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public class NeutronSubnet extends ConfigurationObject implements Serializable {
+public class NeutronSubnet extends ConfigurationObject implements Serializable, INeutronObject {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
*/
List<NeutronPort> myPorts;
- boolean gatewayIPAssigned;
+ Boolean gatewayIPAssigned;
public NeutronSubnet() {
myPorts = new ArrayList<NeutronPort>();
public String getID() { return subnetUUID; }
+ public void setID(String id) { this.subnetUUID = id; }
+
public String getSubnetUUID() {
return subnetUUID;
}
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