Jonathan Hart

Updated SDN-IP config to support 64-bit port numbers.

Fixes ONOS-776.

(cherry-picked from master)

Change-Id: I0629a140835cd3277eb362c1909b5b806c6fcec0
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
15 */ 15 */
16 package org.onosproject.config; 16 package org.onosproject.config;
17 17
18 -import java.util.List;
19 -
20 import com.fasterxml.jackson.annotation.JsonProperty; 18 import com.fasterxml.jackson.annotation.JsonProperty;
21 19
20 +import java.util.List;
21 +
22 /** 22 /**
23 * Represents a set of addresses bound to a port. 23 * Represents a set of addresses bound to a port.
24 */ 24 */
25 public class AddressEntry { 25 public class AddressEntry {
26 private String dpid; 26 private String dpid;
27 - private short portNumber; 27 + private long portNumber;
28 private List<String> ipAddresses; 28 private List<String> ipAddresses;
29 private String macAddress; 29 private String macAddress;
30 30
...@@ -37,12 +37,12 @@ public class AddressEntry { ...@@ -37,12 +37,12 @@ public class AddressEntry {
37 this.dpid = strDpid; 37 this.dpid = strDpid;
38 } 38 }
39 39
40 - public short getPortNumber() { 40 + public long getPortNumber() {
41 return portNumber; 41 return portNumber;
42 } 42 }
43 43
44 @JsonProperty("port") 44 @JsonProperty("port")
45 - public void setPortNumber(short portNumber) { 45 + public void setPortNumber(long portNumber) {
46 this.portNumber = portNumber; 46 this.portNumber = portNumber;
47 } 47 }
48 48
......
...@@ -15,15 +15,14 @@ ...@@ -15,15 +15,14 @@
15 */ 15 */
16 package org.onosproject.sdnip.config; 16 package org.onosproject.sdnip.config;
17 17
18 -import java.util.Objects; 18 +import com.fasterxml.jackson.annotation.JsonProperty;
19 - 19 +import com.google.common.base.MoreObjects;
20 +import org.onlab.packet.IpAddress;
20 import org.onosproject.net.ConnectPoint; 21 import org.onosproject.net.ConnectPoint;
21 import org.onosproject.net.DeviceId; 22 import org.onosproject.net.DeviceId;
22 import org.onosproject.net.PortNumber; 23 import org.onosproject.net.PortNumber;
23 -import org.onlab.packet.IpAddress;
24 24
25 -import com.fasterxml.jackson.annotation.JsonProperty; 25 +import java.util.Objects;
26 -import com.google.common.base.MoreObjects;
27 26
28 /** 27 /**
29 * Configuration details for a BGP peer. 28 * Configuration details for a BGP peer.
...@@ -40,7 +39,7 @@ public class BgpPeer { ...@@ -40,7 +39,7 @@ public class BgpPeer {
40 * @param ipAddress the IP address of the peer as a String 39 * @param ipAddress the IP address of the peer as a String
41 */ 40 */
42 public BgpPeer(@JsonProperty("attachmentDpid") String dpid, 41 public BgpPeer(@JsonProperty("attachmentDpid") String dpid,
43 - @JsonProperty("attachmentPort") int port, 42 + @JsonProperty("attachmentPort") long port,
44 @JsonProperty("ipAddress") String ipAddress) { 43 @JsonProperty("ipAddress") String ipAddress) {
45 this.connectPoint = new ConnectPoint( 44 this.connectPoint = new ConnectPoint(
46 DeviceId.deviceId(SdnIpConfigurationReader.dpidToUri(dpid)), 45 DeviceId.deviceId(SdnIpConfigurationReader.dpidToUri(dpid)),
......
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
15 */ 15 */
16 package org.onosproject.sdnip.config; 16 package org.onosproject.sdnip.config;
17 17
18 -import java.util.List; 18 +import com.fasterxml.jackson.annotation.JsonCreator;
19 -import java.util.Objects; 19 +import com.fasterxml.jackson.annotation.JsonProperty;
20 - 20 +import com.google.common.base.MoreObjects;
21 +import org.onlab.packet.MacAddress;
21 import org.onosproject.net.ConnectPoint; 22 import org.onosproject.net.ConnectPoint;
22 import org.onosproject.net.DeviceId; 23 import org.onosproject.net.DeviceId;
23 import org.onosproject.net.PortNumber; 24 import org.onosproject.net.PortNumber;
24 -import org.onlab.packet.MacAddress;
25 25
26 -import com.fasterxml.jackson.annotation.JsonCreator; 26 +import java.util.List;
27 -import com.fasterxml.jackson.annotation.JsonProperty; 27 +import java.util.Objects;
28 -import com.google.common.base.MoreObjects;
29 28
30 /** 29 /**
31 * Represents a BGP daemon in SDN network. 30 * Represents a BGP daemon in SDN network.
...@@ -58,7 +57,7 @@ public class BgpSpeaker { ...@@ -58,7 +57,7 @@ public class BgpSpeaker {
58 @JsonCreator 57 @JsonCreator
59 public BgpSpeaker(@JsonProperty("name") String name, 58 public BgpSpeaker(@JsonProperty("name") String name,
60 @JsonProperty("attachmentDpid") String attachmentDpid, 59 @JsonProperty("attachmentDpid") String attachmentDpid,
61 - @JsonProperty("attachmentPort") int attachmentPort, 60 + @JsonProperty("attachmentPort") long attachmentPort,
62 @JsonProperty("macAddress") String macAddress) { 61 @JsonProperty("macAddress") String macAddress) {
63 62
64 this.name = name; 63 this.name = name;
......