Fix Northbound API annotations. 71/4371/1
authorSuchi Raman <suchi.raman@plexxi.com>
Sat, 18 Jan 2014 15:51:25 +0000 (10:51 -0500)
committerSuchi Raman <suchi.raman@plexxi.com>
Sat, 18 Jan 2014 15:51:25 +0000 (10:51 -0500)
Signed-off-by: Suchi Raman <suchi.raman@plexxi.com>
affinity/api/src/main/java/org/opendaylight/affinity/affinity/AffinityLink.java
scripts/affinity.py

index 5731c7e8932be68a618580529398a39a2f291f8f..028127ad403e37a7208cabaac012b13eb289e51a 100644 (file)
@@ -95,7 +95,7 @@ public class AffinityLink implements Cloneable, Serializable {
     }
 
     /* Get the waypoint address */
-    @JsonIgnore
+    @XmlElement(name="waypoint")
     public AffinityAttribute getWaypoint() {
        return attrlist.get(AffinityAttributeType.SET_PATH_REDIRECT);
     }
@@ -135,7 +135,7 @@ public class AffinityLink implements Cloneable, Serializable {
     }
 
     /* tbd requires nb method. */
-    @JsonIgnore
+    @XmlElement(name="tapList")
     public List<InetAddress> getTapList() {
         // Check if a tap attribute is already available on this link. 
         SetTap tap = (SetTap) attrlist.get(AffinityAttributeType.SET_TAP);
@@ -145,6 +145,7 @@ public class AffinityLink implements Cloneable, Serializable {
         return null;
     }
     
+    @XmlElement(name="deny")
     public boolean isDeny() {
         return attrlist.containsKey(AffinityAttributeType.SET_DENY);
     }
@@ -160,6 +161,11 @@ public class AffinityLink implements Cloneable, Serializable {
         attrlist.remove(AffinityAttributeType.SET_DENY);
     }
 
+    @XmlElement(name="isolate")
+    public boolean isIsolate() {
+        return attrlist.containsKey(AffinityAttributeType.SET_PATH_ISOLATE);
+    }
+
     // Mark this with "isolate"
     public void setIsolate() {
         SetPathIsolate iso = new SetPathIsolate();
@@ -169,9 +175,11 @@ public class AffinityLink implements Cloneable, Serializable {
         attrlist.remove(AffinityAttributeType.SET_PATH_ISOLATE);
     }
 
+    @XmlElement(name="fromGroup")
     public AffinityGroup getFromGroup() {
        return this.fromGroup;
     }
+    @XmlElement(name="toGroup")
     public AffinityGroup getToGroup() {
        return this.toGroup;
     }
index 353ab19e98f00f6561017a588b7ab2ff889954b4..b1cb9aba2980e634c8f88da818dd93bbd01a0504 100644 (file)
@@ -58,10 +58,6 @@ def get_affinity_link(linkname):
     for key in affyLinkCfg:
         print "%10s : %s" % (key, affyLinkCfg[key])
 
-    
-
-#     
-
 def client_ws_example():
     # Create two affinity groups
     print "create web servers group"
@@ -154,7 +150,6 @@ def set_attr():
     set_waypoint_address('inflows', '10.0.0.2')
     set_tap('inflows', '10.0.0.6')
     set_tap('inflows', '10.0.0.4')
-
     get_affinity_link('inflows')
     
     # Change a few affinity attributes and get the new link configuration.