Merge "VOL-543: Provision for specifying urls where subscriber id is not at the end"
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..d765be6
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.opencord.org
+port=29418
+project=sadis.git
+defaultremote=origin
diff --git a/api/pom.xml b/api/pom.xml
index 0d5e2ca..a00220d 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.1.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..82fbe8b 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.1.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>
@@ -92,6 +92,11 @@
<version>${onos.version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -99,6 +104,7 @@
<plugin>
<groupId>org.onosproject</groupId>
<artifactId>onos-maven-plugin</artifactId>
+ <version>1.11</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
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..0a60f18 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
- ~ limitations under the License.
+ ~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -22,25 +22,23 @@
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-dependencies</artifactId>
- <version>1.10.9</version>
+ <version>1.13.1</version>
<relativePath></relativePath>
</parent>
<groupId>org.opencord</groupId>
<artifactId>sadis</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <onos.version>1.10.9</onos.version>
+ <onos.version>1.13.1</onos.version>
<onos.app.name>org.opencord.sadis</onos.app.name>
<onos.app.category>Utility</onos.app.category>
<onos.app.title>Subscriber and Access Device Information Service</onos.app.title>
<onos.app.origin>Open Networking Laboratory</onos.app.origin>
<onos.app.url>http://opencord.org</onos.app.url>
- <onos.app.readme>https://gerrit.opencord.org/gitweb?p=igmp.git;f=README.md;hb=HEAD</onos.app.readme>
- <onos.app.requires></onos.app.requires>
</properties>
<modules>