Updated SDN-IP to use Ip4Address and Ip4Prefix instead of IpAddress and
IpPrefix, because so far we haven't implemented IPv6.
Also, some of the BGP-related attributes (e.g., BGP Speaker ID)
are IPv4 by definition.
The following components are updated:
* BGP implementation
* Router component and relevant state (e.g., RouteEntry)
Other components (e.g., configuration) will continue to use
the more generic IpAddress and IpPrefix.
Change-Id: I1936ca9871fd5a9709cb4f2c2850d78ebc1472c4
diff --git a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java
index 2ea5f17..6798670 100644
--- a/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java
+++ b/apps/sdnip/src/test/java/org/onlab/onos/sdnip/RouterTestWithAsyncArp.java
@@ -58,7 +58,9 @@
import org.onlab.onos.sdnip.config.SdnIpConfigService;
import org.onlab.packet.Ethernet;
import org.onlab.packet.IpAddress;
+import org.onlab.packet.Ip4Address;
import org.onlab.packet.IpPrefix;
+import org.onlab.packet.Ip4Prefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
@@ -191,8 +193,8 @@
// Construct a route entry
RouteEntry routeEntry = new RouteEntry(
- IpPrefix.valueOf("1.1.1.0/24"),
- IpAddress.valueOf("192.168.10.1"));
+ Ip4Prefix.valueOf("1.1.1.0/24"),
+ Ip4Address.valueOf("192.168.10.1"));
// Construct a route intent
MultiPointToSinglePointIntent intent = staticIntentBuilder();
@@ -243,8 +245,8 @@
// Construct the existing route entry
RouteEntry routeEntry = new RouteEntry(
- IpPrefix.valueOf("1.1.1.0/24"),
- IpAddress.valueOf("192.168.10.1"));
+ Ip4Prefix.valueOf("1.1.1.0/24"),
+ Ip4Address.valueOf("192.168.10.1"));
// Construct the existing MultiPointToSinglePointIntent intent
MultiPointToSinglePointIntent intent = staticIntentBuilder();
@@ -256,8 +258,8 @@
// Start to construct a new route entry and new intent
RouteEntry routeEntryUpdate = new RouteEntry(
- IpPrefix.valueOf("1.1.1.0/24"),
- IpAddress.valueOf("192.168.20.1"));
+ Ip4Prefix.valueOf("1.1.1.0/24"),
+ Ip4Address.valueOf("192.168.20.1"));
// Construct a new MultiPointToSinglePointIntent intent
TrafficSelector.Builder selectorBuilderNew =
@@ -323,8 +325,8 @@
// Construct the existing route entry
RouteEntry routeEntry = new RouteEntry(
- IpPrefix.valueOf("1.1.1.0/24"),
- IpAddress.valueOf("192.168.10.1"));
+ Ip4Prefix.valueOf("1.1.1.0/24"),
+ Ip4Address.valueOf("192.168.10.1"));
// Construct the existing MultiPointToSinglePointIntent intent
MultiPointToSinglePointIntent intent = staticIntentBuilder();
@@ -401,8 +403,8 @@
MultiPointToSinglePointIntent intent)
throws TestUtilsException {
- ConcurrentHashMap<IpPrefix, MultiPointToSinglePointIntent>
- pushedRouteIntents = new ConcurrentHashMap<>();
+ ConcurrentHashMap<Ip4Prefix, MultiPointToSinglePointIntent>
+ pushedRouteIntents = new ConcurrentHashMap<>();
pushedRouteIntents.put(routeEntry.prefix(), intent);
TestUtils.setField(router, "pushedRouteIntents", pushedRouteIntents);
}