Fix to remove camel case for Northbound API 99/999/3
authorPramila Singh <pramisin@cisco.com>
Mon, 26 Aug 2013 16:50:34 +0000 (09:50 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 26 Aug 2013 21:00:42 +0000 (21:00 +0000)
Change-Id: I2d13e9d53b0d73504c15d32a57207110d70afb3a
Signed-off-by: Pramila Singh <pramisin@cisco.com>
15 files changed:
opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIT.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Actions.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Bandwidth.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Buffers.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Capabilities.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Config.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Description.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ForwardingMode.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Latency.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/MacAddress.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Name.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/State.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Tables.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Tier.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/TimeStamp.java

index dfc4b4978ae2114d0a2c6815e79b37ed5c7c41bf..b4c3e1e028183b75cf35b0b122b4c014db4ddd4a 100644 (file)
@@ -208,29 +208,29 @@ public class NorthboundIT {
         if (timestamp == null || timestampName == null) {
             Assert.assertFalse(properties.has("timeStamp"));
         } else {
         if (timestamp == null || timestampName == null) {
             Assert.assertFalse(properties.has("timeStamp"));
         } else {
-            Assert.assertEquals(timestamp, (Integer) properties.getJSONObject("timeStamp").getInt("timestamp"));
-            Assert.assertEquals(timestampName, properties.getJSONObject("timeStamp").getString("timestampName"));
+            Assert.assertEquals(timestamp, (Integer) properties.getJSONObject("timeStamp").getInt("value"));
+            Assert.assertEquals(timestampName, properties.getJSONObject("timeStamp").getString("name"));
         }
         if (actionsValue == null) {
             Assert.assertFalse(properties.has("actions"));
         } else {
         }
         if (actionsValue == null) {
             Assert.assertFalse(properties.has("actions"));
         } else {
-            Assert.assertEquals(actionsValue, (Integer) properties.getJSONObject("actions").getInt("actionsValue"));
+            Assert.assertEquals(actionsValue, (Integer) properties.getJSONObject("actions").getInt("value"));
         }
         if (capabilitiesValue == null) {
             Assert.assertFalse(properties.has("capabilities"));
         } else {
             Assert.assertEquals(capabilitiesValue,
         }
         if (capabilitiesValue == null) {
             Assert.assertFalse(properties.has("capabilities"));
         } else {
             Assert.assertEquals(capabilitiesValue,
-                    (Integer) properties.getJSONObject("capabilities").getInt("capabilitiesValue"));
+                    (Integer) properties.getJSONObject("capabilities").getInt("value"));
         }
         if (tablesValue == null) {
             Assert.assertFalse(properties.has("tables"));
         } else {
         }
         if (tablesValue == null) {
             Assert.assertFalse(properties.has("tables"));
         } else {
-            Assert.assertEquals(tablesValue, (Integer) properties.getJSONObject("tables").getInt("tablesValue"));
+            Assert.assertEquals(tablesValue, (Integer) properties.getJSONObject("tables").getInt("value"));
         }
         if (buffersValue == null) {
             Assert.assertFalse(properties.has("buffers"));
         } else {
         }
         if (buffersValue == null) {
             Assert.assertFalse(properties.has("buffers"));
         } else {
-            Assert.assertEquals(buffersValue, (Integer) properties.getJSONObject("buffers").getInt("buffersValue"));
+            Assert.assertEquals(buffersValue, (Integer) properties.getJSONObject("buffers").getInt("value"));
         }
     }
 
         }
     }
 
@@ -249,18 +249,18 @@ public class NorthboundIT {
         if (state == null) {
             Assert.assertFalse(properties.has("state"));
         } else {
         if (state == null) {
             Assert.assertFalse(properties.has("state"));
         } else {
-            Assert.assertEquals(state, (Integer) properties.getJSONObject("state").getInt("stateValue"));
+            Assert.assertEquals(state, (Integer) properties.getJSONObject("state").getInt("value"));
         }
         if (capabilities == null) {
             Assert.assertFalse(properties.has("capabilities"));
         } else {
             Assert.assertEquals(capabilities,
         }
         if (capabilities == null) {
             Assert.assertFalse(properties.has("capabilities"));
         } else {
             Assert.assertEquals(capabilities,
-                    (Integer) properties.getJSONObject("capabilities").getInt("capabilitiesValue"));
+                    (Integer) properties.getJSONObject("capabilities").getInt("value"));
         }
         if (bandwidth == null) {
             Assert.assertFalse(properties.has("bandwidth"));
         } else {
         }
         if (bandwidth == null) {
             Assert.assertFalse(properties.has("bandwidth"));
         } else {
-            Assert.assertEquals(bandwidth, (Integer) properties.getJSONObject("bandwidth").getInt("bandwidthValue"));
+            Assert.assertEquals(bandwidth, (Integer) properties.getJSONObject("bandwidth").getInt("value"));
         }
 
     }
         }
 
     }
@@ -499,8 +499,8 @@ public class NorthboundIT {
         json = new JSONObject(jt);
         node = getJsonInstance(json, "nodeProperties", nodeId_1);
         Assert.assertNotNull(node);
         json = new JSONObject(jt);
         node = getJsonInstance(json, "nodeProperties", nodeId_1);
         Assert.assertNotNull(node);
-        Assert.assertEquals(1001, node.getJSONObject("properties").getJSONObject("tier").getInt("tierValue"));
-        Assert.assertEquals("node1", node.getJSONObject("properties").getJSONObject("description").getString("descriptionValue"));
+        Assert.assertEquals(1001, node.getJSONObject("properties").getJSONObject("tier").getInt("value"));
+        Assert.assertEquals("node1", node.getJSONObject("properties").getJSONObject("description").getString("value"));
 
         // Test delete nodeConnector property
         // Delete state property of nodeconnector1
 
         // Test delete nodeConnector property
         // Delete state property of nodeconnector1
@@ -1091,9 +1091,9 @@ public class NorthboundIT {
                 Assert.assertEquals(tailNode.getString("@type"),nodeType);
                 Assert.assertEquals(tailNode.getString("@type"), nodeConnType);
                 Assert.assertEquals(tailNC.getLong("@id"), tailNC1_nodeConnId);
                 Assert.assertEquals(tailNode.getString("@type"),nodeType);
                 Assert.assertEquals(tailNode.getString("@type"), nodeConnType);
                 Assert.assertEquals(tailNC.getLong("@id"), tailNC1_nodeConnId);
-                Assert.assertEquals(bandw.getLong("bandwidthValue"), bw_1);
-                Assert.assertTrue((short) stt.getInt("stateValue") == state_1);
-                Assert.assertEquals(ltc.getLong("latencyValue"), lat_1);
+                Assert.assertEquals(bandw.getLong("value"), bw_1);
+                Assert.assertTrue((short) stt.getInt("value") == state_1);
+                Assert.assertEquals(ltc.getLong("value"), lat_1);
             } else if (headNC.getInt("@id") == headNC2_nodeConnId) {
                 Assert.assertEquals(headNode.getString("@type"),nodeType);
                 Assert.assertEquals(headNode.getLong("@id"), headNC2_nodeId);
             } else if (headNC.getInt("@id") == headNC2_nodeConnId) {
                 Assert.assertEquals(headNode.getString("@type"),nodeType);
                 Assert.assertEquals(headNode.getLong("@id"), headNC2_nodeId);
@@ -1102,9 +1102,9 @@ public class NorthboundIT {
                 Assert.assertTrue(tailNode.getInt("@id") == tailNC2_nodeId);
                 Assert.assertEquals(tailNC.getString("@type"), nodeConnType);
                 Assert.assertEquals(tailNC.getLong("@id"), tailNC2_nodeConnId);
                 Assert.assertTrue(tailNode.getInt("@id") == tailNC2_nodeId);
                 Assert.assertEquals(tailNC.getString("@type"), nodeConnType);
                 Assert.assertEquals(tailNC.getLong("@id"), tailNC2_nodeConnId);
-                Assert.assertEquals(bandw.getLong("bandwidthValue"), bw_2);
-                Assert.assertTrue((short) stt.getInt("stateValue") == state_2);
-                Assert.assertEquals(ltc.getLong("latencyValue"), lat_2);
+                Assert.assertEquals(bandw.getLong("value"), bw_2);
+                Assert.assertTrue((short) stt.getInt("value") == state_2);
+                Assert.assertEquals(ltc.getLong("value"), lat_2);
             }
         }
 
             }
         }
 
index 135a67dcd1cbfdd83a00f5695ab2d18e4833fc9d..c26800890bb933d4dd5702dda513bcdec4b37e5f 100644 (file)
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 public class Actions extends Property {
         private static final long serialVersionUID = 1L;
 @XmlRootElement
 public class Actions extends Property {
         private static final long serialVersionUID = 1L;
-    @XmlElement
+    @XmlElement(name="value")
     private int actionsValue;
 
     public enum ActionType {
     private int actionsValue;
 
     public enum ActionType {
@@ -69,6 +69,7 @@ public class Actions extends Property {
         this.actionsValue = 0;
     }
 
         this.actionsValue = 0;
     }
 
+    @Override
     public Actions clone() {
         return new Actions(this.actionsValue);
     }
     public Actions clone() {
         return new Actions(this.actionsValue);
     }
index 8048cf882c6c9eec22883b9f3c823b23d8c72149..1282d5ef9c2c18259077390a32a4d6840c8ac068 100644 (file)
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 public class Bandwidth extends Property {
     private static final long serialVersionUID = 1L;
 
 public class Bandwidth extends Property {
     private static final long serialVersionUID = 1L;
 
-    @XmlElement
+    @XmlElement(name="value")
     protected long bandwidthValue;
 
     public static final long BWUNK = 0;
     protected long bandwidthValue;
 
     public static final long BWUNK = 0;
@@ -71,6 +71,7 @@ public class Bandwidth extends Property {
         super(name);
     }
 
         super(name);
     }
 
+    @Override
     public Bandwidth clone() {
         return new Bandwidth(this.bandwidthValue);
     }
     public Bandwidth clone() {
         return new Bandwidth(this.bandwidthValue);
     }
index 99089d9096c9db1e0c37391e790322b093db5f47..6d7369d72bb6f25480cc2d40f359b240eeaed8f8 100644 (file)
@@ -22,7 +22,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 public class Buffers extends Property {
         private static final long serialVersionUID = 1L;
 @XmlRootElement
 public class Buffers extends Property {
         private static final long serialVersionUID = 1L;
-    @XmlElement
+    @XmlElement(name="value")
     private int buffersValue;
 
     public static final String BuffersPropName = "buffers";
     private int buffersValue;
 
     public static final String BuffersPropName = "buffers";
@@ -46,6 +46,7 @@ public class Buffers extends Property {
         this.buffersValue = 0;
     }
 
         this.buffersValue = 0;
     }
 
+    @Override
     public Buffers clone() {
         return new Buffers(this.buffersValue);
     }
     public Buffers clone() {
         return new Buffers(this.buffersValue);
     }
index fb121d7b9a48aa4c4c21b626de4f6baf5d661444..7867b93a683d48f565b65cf03ba3a710b7fe3e5c 100644 (file)
@@ -22,7 +22,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 public class Capabilities extends Property {
         private static final long serialVersionUID = 1L;
 @XmlRootElement
 public class Capabilities extends Property {
         private static final long serialVersionUID = 1L;
-    @XmlElement
+    @XmlElement(name="value")
     private int capabilitiesValue;
 
     public enum CapabilitiesType {
     private int capabilitiesValue;
 
     public enum CapabilitiesType {
@@ -63,6 +63,7 @@ public class Capabilities extends Property {
         this.capabilitiesValue = 0;
     }
 
         this.capabilitiesValue = 0;
     }
 
+    @Override
     public Capabilities clone() {
         return new Capabilities(this.capabilitiesValue);
     }
     public Capabilities clone() {
         return new Capabilities(this.capabilitiesValue);
     }
index bae984eaec00f4f9524e4e0db719c8e2ec74e4e3..ef6efc58211577fb9799509c1d998949a44364dc 100644 (file)
@@ -19,7 +19,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Config extends Property {
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Config extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private short configValue;
 
     public static final short ADMIN_DOWN = 0;
     private short configValue;
 
     public static final short ADMIN_DOWN = 0;
@@ -40,6 +40,7 @@ public class Config extends Property {
         this.configValue = config;
     }
 
         this.configValue = config;
     }
 
+    @Override
     public Config clone() {
         return new Config(this.configValue);
     }
     public Config clone() {
         return new Config(this.configValue);
     }
index 92cd5b12e49bfe770dd8a2ed93a5baa518f3194d..6915404e24ab43af15299c1469695101b53a6984 100644 (file)
@@ -9,7 +9,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Description extends Property {
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Description extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private String descriptionValue;
     public static final String propertyName = "description";
 
     private String descriptionValue;
     public static final String propertyName = "description";
 
@@ -26,6 +26,7 @@ public class Description extends Property {
         this.descriptionValue = description;
     }
 
         this.descriptionValue = description;
     }
 
+    @Override
     public Description clone() {
         return new Description(this.descriptionValue);
     }
     public Description clone() {
         return new Description(this.descriptionValue);
     }
index c28eb13d55666c29085e3812e87384004a492667..a1d4ff9db735476fa593f0fe2f2c577b13b9d473 100644 (file)
@@ -9,7 +9,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 @SuppressWarnings("serial")
 public class ForwardingMode extends Property {
 @XmlRootElement
 @SuppressWarnings("serial")
 public class ForwardingMode extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private final int modeValue;
     public static final int REACTIVE_FORWARDING = 0;
     public static final int PROACTIVE_FORWARDING = 1;
     private final int modeValue;
     public static final int REACTIVE_FORWARDING = 0;
     public static final int PROACTIVE_FORWARDING = 1;
index 818002a21e042f87da32f5e14573e1b502ffc328..a0ba47b29d2458aadcffa90e115f0c1a218602e6 100644 (file)
@@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 public class Latency extends Property {
     private static final long serialVersionUID = 1L;
 
 public class Latency extends Property {
     private static final long serialVersionUID = 1L;
 
-    @XmlElement
+    @XmlElement(name="value")
     private long latencyValue;
 
     public static final long LATENCYUNK = 0;
     private long latencyValue;
 
     public static final long LATENCYUNK = 0;
@@ -61,6 +61,7 @@ public class Latency extends Property {
         this.latencyValue = (long) latency;
     }
 
         this.latencyValue = (long) latency;
     }
 
+    @Override
     public Latency clone() {
         return new Latency(this.latencyValue);
     }
     public Latency clone() {
         return new Latency(this.latencyValue);
     }
index 4470e17e82bc2b77109a4ca39b9acc741c7a1515..27e74e08008094759bda6bc5c6c846f40eef262c 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.controller.sal.utils.HexEncode;
 @XmlAccessorType(XmlAccessType.NONE)
 public class MacAddress extends Property implements Cloneable {
     private static final long serialVersionUID = 1L;
 @XmlAccessorType(XmlAccessType.NONE)
 public class MacAddress extends Property implements Cloneable {
     private static final long serialVersionUID = 1L;
-    @XmlElement(name="macAddress")
+    @XmlElement(name="value")
     private final String address;
     public static final String name = "macAddress";
 
     private final String address;
     public static final String name = "macAddress";
 
index ddb663f5901fe8aa45ab2318a8e86615ae3de05d..d35610add0f6b2df7101dd6e3422f6252d272e4e 100644 (file)
@@ -18,7 +18,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Name extends Property {
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Name extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private String nameValue;
     public static final String NamePropName = "name";
 
     private String nameValue;
     public static final String NamePropName = "name";
 
@@ -35,6 +35,7 @@ public class Name extends Property {
         this.nameValue = name;
     }
 
         this.nameValue = name;
     }
 
+    @Override
     public Name clone() {
         return new Name(this.nameValue);
     }
     public Name clone() {
         return new Name(this.nameValue);
     }
index ba67e0d8213454e76d3fc8fc9760177745e0bec9..058adb63e2156172879dbf7b6d512f7258d2a725 100644 (file)
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 @SuppressWarnings("serial")
 public class State extends Property {
 @XmlRootElement
 @SuppressWarnings("serial")
 public class State extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private short stateValue;
 
     public static final short EDGE_DOWN = 0;
     private short stateValue;
 
     public static final short EDGE_DOWN = 0;
@@ -41,6 +41,7 @@ public class State extends Property {
         this.stateValue = state;
     }
 
         this.stateValue = state;
     }
 
+    @Override
     public State clone() {
         return new State(this.stateValue);
     }
     public State clone() {
         return new State(this.stateValue);
     }
index 156a0b8ee0225a3b719b7019976c6bc4556a55ba..bd50cf9be067aea6b842e7c9d1e3d8da1b9c746b 100644 (file)
@@ -22,7 +22,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 public class Tables extends Property {
         private static final long serialVersionUID = 1L;
 @XmlRootElement
 public class Tables extends Property {
         private static final long serialVersionUID = 1L;
-    @XmlElement
+    @XmlElement(name="value")
     private byte tablesValue;
 
     public static final String TablesPropName = "tables";
     private byte tablesValue;
 
     public static final String TablesPropName = "tables";
@@ -45,6 +45,7 @@ public class Tables extends Property {
         this.tablesValue = 0;
     }
 
         this.tablesValue = 0;
     }
 
+    @Override
     public Tables clone() {
         return new Tables(this.tablesValue);
     }
     public Tables clone() {
         return new Tables(this.tablesValue);
     }
index ed4d02b2457da40b210ce05d77cebd76e55d6fac..6756a8213547b1851c1457432827f8934e8b1979 100644 (file)
@@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Tier extends Property {
 @XmlRootElement
 @SuppressWarnings("serial")
 public class Tier extends Property {
-    @XmlElement
+    @XmlElement(name="value")
     private int tierValue;
     public static final String TierPropName = "tier";
 
     private int tierValue;
     public static final String TierPropName = "tier";
 
@@ -37,6 +37,7 @@ public class Tier extends Property {
         this.tierValue = 0;
     }
 
         this.tierValue = 0;
     }
 
+    @Override
     public Tier clone() {
         return new Tier(this.tierValue);
     }
     public Tier clone() {
         return new Tier(this.tierValue);
     }
index a15b3fa9cd10166b3179e163c80b5de7f50170ba..b38ec8582b17db2d765a35c9df4d3b888ed96228 100644 (file)
@@ -25,9 +25,9 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement
 public class TimeStamp extends Property {
     private static final long serialVersionUID = 1L;
 @XmlRootElement
 public class TimeStamp extends Property {
     private static final long serialVersionUID = 1L;
-    @XmlElement
+    @XmlElement(name = "value")
     private long timestamp;
     private long timestamp;
-    @XmlElement
+    @XmlElement(name = "name")
     private String timestampName;
 
     public static final String TimeStampPropName = "timeStamp";
     private String timestampName;
 
     public static final String TimeStampPropName = "timeStamp";
@@ -57,6 +57,7 @@ public class TimeStamp extends Property {
         this.timestampName = null;
     }
 
         this.timestampName = null;
     }
 
+    @Override
     public TimeStamp clone() {
         return new TimeStamp(this.timestamp, this.timestampName);
     }
     public TimeStamp clone() {
         return new TimeStamp(this.timestamp, this.timestampName);
     }