VOL-535: Introduce field in Sadis configuration for the uplink port of the OLT
Have replaced the older port field (it was not used by any app, can be re-introduced later if needed)
with uplinkPort

Change-Id: I48366557ff00e02dacc0af8685867a325d11dd83
diff --git a/api/pom.xml b/api/pom.xml
index 0d5e2ca..9e6da34 100755
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <artifactId>sadis</artifactId>
         <groupId>org.opencord</groupId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>2.0.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
diff --git a/api/src/main/java/org/opencord/sadis/SubscriberAndDeviceInformation.java b/api/src/main/java/org/opencord/sadis/SubscriberAndDeviceInformation.java
index 80ca685..6b64ce7 100644
--- a/api/src/main/java/org/opencord/sadis/SubscriberAndDeviceInformation.java
+++ b/api/src/main/java/org/opencord/sadis/SubscriberAndDeviceInformation.java
@@ -38,8 +38,8 @@
     @JsonProperty(value = "nasPortId")
     String nasPortId;
 
-    @JsonProperty(value = "port")
-    int port = -1;
+    @JsonProperty(value = "uplinkPort")
+    int uplinkPort = -1;
 
     @JsonProperty(value = "slot")
     int slot = -1;
@@ -94,12 +94,12 @@
         this.nasPortId = nasPortId;
     }
 
-    public final int port() {
-        return this.port;
+    public final int uplinkPort() {
+        return this.uplinkPort;
     }
 
-    public final void setPort(final int port) {
-        this.port = port;
+    public final void setUplinkPort(final int uplinkPort) {
+        this.uplinkPort = uplinkPort;
     }
 
     public final int slot() {
@@ -163,7 +163,7 @@
         result = prime * result + (this.hardwareIdentifier == null ? 0 : this.hardwareIdentifier.hashCode());
         result = prime * result + (this.id == null ? 0 : this.id.hashCode());
         result = prime * result + (this.nasPortId == null ? 0 : this.nasPortId.hashCode());
-        result = prime * result + this.port;
+        result = prime * result + this.uplinkPort;
         result = prime * result + (this.sTag == null ? 0 : this.sTag.hashCode());
         result = prime * result + this.slot;
         result = prime * result + (this.ipAddress == null ? 0 : this.ipAddress.hashCode());
@@ -232,7 +232,7 @@
         } else if (!this.ipAddress.equals(other.ipAddress())) {
             return false;
         }
-        if (this.port != other.port) {
+        if (this.uplinkPort != other.uplinkPort) {
             return false;
         }
         if (this.sTag == null) {
@@ -279,8 +279,8 @@
         buf.append(this.sTag);
         buf.append(",nasPortId:");
         buf.append(this.nasPortId);
-        buf.append(",port:");
-        buf.append(this.port);
+        buf.append(",uplinkPort:");
+        buf.append(this.uplinkPort);
         buf.append(",slot:");
         buf.append(this.slot);
         buf.append(",hardwareIdentifier:");
diff --git a/app/pom.xml b/app/pom.xml
index fd8f60e..add1101 100755
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>org.opencord</groupId>
         <artifactId>sadis</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>2.0.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -32,7 +32,7 @@
 
     <properties>
         <web.context>/onos/sadis</web.context>
-        <api.version>1.2.0-SNAPSHOT</api.version>
+        <api.version>2.0.0-SNAPSHOT</api.version>
         <api.title>Subscriber And Device Information REST API</api.title>
         <api.description>Subscriber And Device Information REST API</api.description>
         <api.package>org.onosproject.sadis.rest</api.package>
diff --git a/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationCodec.java b/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationCodec.java
index af3a71f..e5dd02b 100644
--- a/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationCodec.java
+++ b/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationCodec.java
@@ -28,7 +28,7 @@
                                     .put("cTag", (entry.cTag() == null) ? "" : entry.cTag().toString())
                                     .put("sTag", (entry.sTag() == null) ? "" : entry.sTag().toString())
                                     .put("nasPortId", entry.nasPortId())
-                                    .put("port", entry.port())
+                                    .put("uplinkPort", entry.uplinkPort())
                                     .put("slot", entry.slot())
                                     .put("hardwareIdentifier", (entry.hardwareIdentifier() == null) ? "" :
                                           entry.hardwareIdentifier().toString())
diff --git a/app/src/test/java/org/opencord/sadis/impl/SadisManagerTest.java b/app/src/test/java/org/opencord/sadis/impl/SadisManagerTest.java
index 693b30e..4111995 100644
--- a/app/src/test/java/org/opencord/sadis/impl/SadisManagerTest.java
+++ b/app/src/test/java/org/opencord/sadis/impl/SadisManagerTest.java
@@ -211,7 +211,7 @@
             }
             info.setNasPortId(nasPortId);
             if (port != -1) {
-                info.setPort(port);
+                info.setUplinkPort(port);
             }
             if (slot != -1) {
                 info.setSlot(slot);
@@ -270,7 +270,7 @@
             } else if (!this.ipAddress().equals(other.ipAddress())) {
                 return false;
             }
-            if (this.port() != other.port()) {
+            if (this.uplinkPort() != other.uplinkPort()) {
                 return false;
             }
             if (this.sTag() == null) {
diff --git a/app/src/test/resources/3 b/app/src/test/resources/3
index a25567f..a7fead8 100644
--- a/app/src/test/resources/3
+++ b/app/src/test/resources/3
@@ -3,7 +3,7 @@
       "cTag": 7,
       "sTag": 8,
       "nasPortId": "1/1/2",
-      "port": 130,
+      "uplinkPort": 130,
       "slot": 7,
       "hardwareIdentifier": "ff:aa:dd:cc:bb:ee",
       "ipAddress":"30.30.30.30",
diff --git a/app/src/test/resources/4 b/app/src/test/resources/4
index 2a8ee5c..19f00f8 100644
--- a/app/src/test/resources/4
+++ b/app/src/test/resources/4
@@ -3,7 +3,7 @@
       "cTag": 2,
       "sTag": 1,
       "nasPortId": "1/1/2",
-      "port": 132,
+      "uplinkPort": 132,
       "slot": 1,
       "hardwareIdentifier": "ff:cc:dd:aa:ee:bb",
       "ipAddress":"15.15.15.15",
diff --git a/app/src/test/resources/LocalConfig.json b/app/src/test/resources/LocalConfig.json
index d76de2b..d72de31 100644
--- a/app/src/test/resources/LocalConfig.json
+++ b/app/src/test/resources/LocalConfig.json
@@ -15,7 +15,7 @@
 			"cTag": 2,
 			"sTag": 2,
 			"nasPortId": "1/1/2",
-			"port": 125,
+			"uplinkPort": 125,
 			"slot": 3,
 			"hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
 			"ipAddress":"10.10.10.10",
@@ -29,7 +29,7 @@
 			"cTag": 4,
 			"sTag": 4,
 			"nasPortId": "1/1/2",
-			"port": 129,
+			"uplinkPort": 129,
 			"slot": 4,
 			"hardwareIdentifier": "aa:bb:cc:dd:ee:ff",
 			"ipAddress":"1.1.1.1",
diff --git a/pom.xml b/pom.xml
index 9f0b097..23572b3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
     <groupId>org.opencord</groupId>
     <artifactId>sadis</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>