/*
- * Copyright IBM Corporation, 2013. All rights reserved.
+ * Copyright (c) 2013, 2015 IBM Corporation and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-public class NeutronFloatingIP implements Serializable {
+public class NeutronFloatingIP extends NeutronObject implements Serializable, INeutronObject {
private static final long serialVersionUID = 1L;
// See OpenStack Network API v2.0 Reference for description of
// annotated attributes
- @XmlElement (name = "id")
- String floatingIPUUID;
-
@XmlElement (name = "floating_network_id")
String floatingNetworkUUID;
@XmlElement (name = "floating_ip_address")
String floatingIPAddress;
- @XmlElement (name = "tenant_id")
- String tenantUUID;
-
@XmlElement (name="router_id")
String routerUUID;
public NeutronFloatingIP() {
}
- public String getID() { return floatingIPUUID; }
-
+ // @deprecated use getID()
public String getFloatingIPUUID() {
- return floatingIPUUID;
+ return getID();
}
- public void setFloatingIPUUID(String floatingIPUUID) {
- this.floatingIPUUID = floatingIPUUID;
+ // @deprecated use setID()
+ public void setFloatingIPUUID(String uuid) {
+ setID(uuid);
}
public String getFloatingNetworkUUID() {
this.floatingIPAddress = floatingIPAddress;
}
+ @Deprecated
public String getTenantUUID() {
- return tenantUUID;
+ return getTenantID();
}
- public void setTenantUUID(String tenantUUID) {
- this.tenantUUID = tenantUUID;
+ @Deprecated
+ public void setTenantUUID(String tenantID) {
+ setTenantID(tenantID);
}
public void setRouterUUID(String routerUUID) {
while (i.hasNext()) {
String s = i.next();
if (s.equals("id")) {
- ans.setFloatingIPUUID(this.getFloatingIPUUID());
+ ans.setID(this.getID());
}
if (s.equals("floating_network_id")) {
ans.setFloatingNetworkUUID(this.getFloatingNetworkUUID());
ans.setFloatingIPAddress(this.getFloatingIPAddress());
}
if (s.equals("tenant_id")) {
- ans.setTenantUUID(this.getTenantUUID());
+ ans.setTenantID(this.getTenantID());
}
if (s.equals("router_id")) {
ans.setRouterUUID(this.getRouterUUID());
@Override
public String toString() {
return "NeutronFloatingIP{" +
- "fipUUID='" + floatingIPUUID + '\'' +
+ "fipUUID='" + uuid + '\'' +
", fipFloatingNetworkId='" + floatingNetworkUUID + '\'' +
", fipPortUUID='" + portUUID + '\'' +
", fipFixedIPAddress='" + fixedIPAddress + '\'' +
", fipFloatingIPAddress=" + floatingIPAddress +
- ", fipTenantId='" + tenantUUID + '\'' +
+ ", fipTenantId='" + tenantID + '\'' +
", fipRouterId='" + routerUUID + '\'' +
", fipStatus='" + status + '\'' +
'}';
}
-
- public void initDefaults() {
- }
}