L2gateway: Added yang, APIs,Transcriber for L2gateway.
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / NeutronFloatingIP.java
index 42feb6aa36bc7f90a06b84b0ca13b6efd68b5aef..cf03a40e672cc349c109ae4d95ca5d214099755c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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,
@@ -20,15 +20,12 @@ import javax.xml.bind.annotation.XmlRootElement;
 @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;
 
@@ -41,9 +38,6 @@ public class NeutronFloatingIP implements Serializable {
     @XmlElement (name = "floating_ip_address")
     String floatingIPAddress;
 
-    @XmlElement (name = "tenant_id")
-    String tenantUUID;
-
     @XmlElement (name="router_id")
     String routerUUID;
 
@@ -53,14 +47,14 @@ public class NeutronFloatingIP implements Serializable {
     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() {
@@ -99,12 +93,14 @@ public class NeutronFloatingIP implements Serializable {
         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) {
@@ -135,7 +131,7 @@ public class NeutronFloatingIP implements Serializable {
         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());
@@ -150,7 +146,7 @@ public class NeutronFloatingIP implements Serializable {
                 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());
@@ -165,17 +161,14 @@ public class NeutronFloatingIP implements Serializable {
     @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() {
-    }
 }