Updated SDN-IP config to support 64-bit port numbers.
Fixes ONOS-776.
(cherry-picked from master)
Change-Id: I0629a140835cd3277eb362c1909b5b806c6fcec0
diff --git a/apps/config/src/main/java/org/onosproject/config/AddressEntry.java b/apps/config/src/main/java/org/onosproject/config/AddressEntry.java
index 67707aa..e1fe288 100644
--- a/apps/config/src/main/java/org/onosproject/config/AddressEntry.java
+++ b/apps/config/src/main/java/org/onosproject/config/AddressEntry.java
@@ -15,16 +15,16 @@
*/
package org.onosproject.config;
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
/**
* Represents a set of addresses bound to a port.
*/
public class AddressEntry {
private String dpid;
- private short portNumber;
+ private long portNumber;
private List<String> ipAddresses;
private String macAddress;
@@ -37,12 +37,12 @@
this.dpid = strDpid;
}
- public short getPortNumber() {
+ public long getPortNumber() {
return portNumber;
}
@JsonProperty("port")
- public void setPortNumber(short portNumber) {
+ public void setPortNumber(long portNumber) {
this.portNumber = portNumber;
}
diff --git a/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpPeer.java b/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpPeer.java
index b0f9003..5d89075 100644
--- a/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpPeer.java
+++ b/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpPeer.java
@@ -15,15 +15,14 @@
*/
package org.onosproject.sdnip.config;
-import java.util.Objects;
-
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.MoreObjects;
+import org.onlab.packet.IpAddress;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.PortNumber;
-import org.onlab.packet.IpAddress;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Configuration details for a BGP peer.
@@ -40,7 +39,7 @@
* @param ipAddress the IP address of the peer as a String
*/
public BgpPeer(@JsonProperty("attachmentDpid") String dpid,
- @JsonProperty("attachmentPort") int port,
+ @JsonProperty("attachmentPort") long port,
@JsonProperty("ipAddress") String ipAddress) {
this.connectPoint = new ConnectPoint(
DeviceId.deviceId(SdnIpConfigurationReader.dpidToUri(dpid)),
diff --git a/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpSpeaker.java b/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpSpeaker.java
index ba5e834..6e89b1f 100644
--- a/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpSpeaker.java
+++ b/apps/sdnip/src/main/java/org/onosproject/sdnip/config/BgpSpeaker.java
@@ -15,17 +15,16 @@
*/
package org.onosproject.sdnip.config;
-import java.util.List;
-import java.util.Objects;
-
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.PortNumber;
-import org.onlab.packet.MacAddress;
-
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.MoreObjects;
+import org.onlab.packet.MacAddress;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.PortNumber;
+
+import java.util.List;
+import java.util.Objects;
/**
* Represents a BGP daemon in SDN network.
@@ -58,7 +57,7 @@
@JsonCreator
public BgpSpeaker(@JsonProperty("name") String name,
@JsonProperty("attachmentDpid") String attachmentDpid,
- @JsonProperty("attachmentPort") int attachmentPort,
+ @JsonProperty("attachmentPort") long attachmentPort,
@JsonProperty("macAddress") String macAddress) {
this.name = name;