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/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",