Carry location of next hop in ResolvedRoute
Change-Id: I64ca6ecc5cfcffc3ed19621053b0ee266c4093ea
diff --git a/apps/routing/src/main/java/org/onosproject/routing/impl/SingleSwitchFibInstaller.java b/apps/routing/src/main/java/org/onosproject/routing/impl/SingleSwitchFibInstaller.java
index c036d8c..a295a14 100644
--- a/apps/routing/src/main/java/org/onosproject/routing/impl/SingleSwitchFibInstaller.java
+++ b/apps/routing/src/main/java/org/onosproject/routing/impl/SingleSwitchFibInstaller.java
@@ -215,7 +215,7 @@
//clean up the routes.
for (Map.Entry<IpPrefix, IpAddress> routes: prefixToNextHop.entrySet()) {
- deleteRoute(new ResolvedRoute(routes.getKey(), null, null));
+ deleteRoute(new ResolvedRoute(routes.getKey(), null, null, null));
}
//clean up the filtering objective for interfaces.
diff --git a/apps/routing/src/test/java/org/onosproject/routing/impl/SingleSwitchFibInstallerTest.java b/apps/routing/src/test/java/org/onosproject/routing/impl/SingleSwitchFibInstallerTest.java
index 2621c9d..2b60f91 100644
--- a/apps/routing/src/test/java/org/onosproject/routing/impl/SingleSwitchFibInstallerTest.java
+++ b/apps/routing/src/test/java/org/onosproject/routing/impl/SingleSwitchFibInstallerTest.java
@@ -279,7 +279,7 @@
*/
@Test
public void testRouteAdd() {
- ResolvedRoute resolvedRoute = new ResolvedRoute(PREFIX1, NEXT_HOP1, MAC1);
+ ResolvedRoute resolvedRoute = new ResolvedRoute(PREFIX1, NEXT_HOP1, MAC1, SW1_ETH1);
// Create the next objective
NextObjective nextObjective = createNextObjective(MAC1, MAC1, SW1_ETH1.port(), VlanId.NONE, true);
@@ -305,7 +305,7 @@
*/
@Test
public void testRouteAddWithVlan() {
- ResolvedRoute route = new ResolvedRoute(PREFIX1, NEXT_HOP2, MAC2);
+ ResolvedRoute route = new ResolvedRoute(PREFIX1, NEXT_HOP2, MAC2, SW1_ETH2);
// Create the next objective
NextObjective nextObjective = createNextObjective(MAC2, MAC2, SW1_ETH2.port(), VLAN1, true);
@@ -335,7 +335,7 @@
testRouteAdd();
reset(flowObjectiveService);
- ResolvedRoute route = new ResolvedRoute(PREFIX1, NEXT_HOP2, MAC2);
+ ResolvedRoute route = new ResolvedRoute(PREFIX1, NEXT_HOP2, MAC2, SW1_ETH2);
// Create the next objective
NextObjective nextObjective = createNextObjective(MAC2, MAC2, SW1_ETH2.port(), VLAN1, true);
@@ -365,7 +365,7 @@
testRouteAdd();
// Construct the existing route
- ResolvedRoute route = new ResolvedRoute(PREFIX1, null, null);
+ ResolvedRoute route = new ResolvedRoute(PREFIX1, null, null, null);
// Create the flow objective
reset(flowObjectiveService);