Renamed SDN-IP packages and classes.
The code use to use the name 'BgpRoute' in a number of places, which is not
descriptive and doesn't map to how we talk about SDN-IP (we always call it
SDN-IP in all other documents/presentations).
Details of changes are as follows:
net.onrc.onos.apps.bgproute -> net.onrc.onos.apps.sdnip
BgpRoute.java -> SdnIp.java
IBgpRouteService.java -> ISdnIpService.java
created new package for web classes: net.onrc.onos.apps.sdnip.web
BgpRouteResource.java -> IncomingRequestResource.java
BgpRouteResourceSynch.java -> OutgoingRequestResource.java
BgpRouteWebRoutable.java -> SdnIpWebRoutable.java
Change-Id: Ie6b1cbe4e95736d4cbd53b9f4def7cc3e0b46132
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/BgpPeer.java b/src/main/java/net/onrc/onos/apps/sdnip/BgpPeer.java
new file mode 100644
index 0000000..9c93d9e
--- /dev/null
+++ b/src/main/java/net/onrc/onos/apps/sdnip/BgpPeer.java
@@ -0,0 +1,47 @@
+package net.onrc.onos.apps.sdnip;
+
+import java.net.InetAddress;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+import com.google.common.net.InetAddresses;
+
+/**
+ * Configuration details for a BGP peer. It contains the peer's IP address and
+ * an interface name which maps to the interface they are attached at.
+ */
+public class BgpPeer {
+ private final String interfaceName;
+ private final InetAddress ipAddress;
+
+ /**
+ * Class constructor, taking the interface name and IP address of the peer.
+ *
+ * @param interfaceName the String name of the interface which can be used
+ * to look up the interface this peer is attached at
+ * @param ipAddress the IP address of the peer as a String
+ */
+ public BgpPeer(@JsonProperty("interface") String interfaceName,
+ @JsonProperty("ipAddress") String ipAddress) {
+ this.interfaceName = interfaceName;
+ this.ipAddress = InetAddresses.forString(ipAddress);
+ }
+
+ /**
+ * Gets the interface name.
+ *
+ * @return the interface name as a String
+ */
+ public String getInterfaceName() {
+ return interfaceName;
+ }
+
+ /**
+ * Gets the IP address of the peer.
+ *
+ * @return the IP address as an {@link InetAddress} object
+ */
+ public InetAddress getIpAddress() {
+ return ipAddress;
+ }
+}