Remove next hop location from resolved route
The next hop location should be obtained from host service
Change-Id: I8652e6b8b1367097ffbfcb1651538c34819f67d6
diff --git a/apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java b/apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java
index 828827d..1795e1e 100644
--- a/apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java
+++ b/apps/route-service/api/src/main/java/org/onosproject/routeservice/ResolvedRoute.java
@@ -29,6 +29,7 @@
/**
* Represents a route with the next hop MAC address resolved.
*/
+// TODO Remove location from ResolvedRoute
public class ResolvedRoute {
private final Route route;
@@ -42,7 +43,9 @@
* @param route input route
* @param nextHopMac next hop MAC address
* @param location connect point where the next hop connects to
+ * @deprecated in 1.11 ("Loon")
*/
+ @Deprecated
public ResolvedRoute(Route route, MacAddress nextHopMac, ConnectPoint location) {
this(route, nextHopMac, VlanId.NONE, location);
}
@@ -54,7 +57,9 @@
* @param nextHopMac next hop MAC address
* @param nextHopVlan next hop VLAN ID
* @param location connect point where the next hop connects to
+ * @deprecated in 1.11 ("Loon")
*/
+ @Deprecated
public ResolvedRoute(Route route, MacAddress nextHopMac, VlanId nextHopVlan,
ConnectPoint location) {
this.route = route;
@@ -63,6 +68,31 @@
this.location = location;
}
+
+ /**
+ * Creates a new resolved route.
+ *
+ * @param route input route
+ * @param nextHopMac next hop MAC address
+ */
+ public ResolvedRoute(Route route, MacAddress nextHopMac) {
+ this(route, nextHopMac, VlanId.NONE);
+ }
+
+ /**
+ * Creates a new resolved route.
+ *
+ * @param route input route
+ * @param nextHopMac next hop MAC address
+ * @param nextHopVlan next hop VLAN ID
+ */
+ public ResolvedRoute(Route route, MacAddress nextHopMac, VlanId nextHopVlan) {
+ this.route = route;
+ this.nextHopMac = nextHopMac;
+ this.nextHopVlan = nextHopVlan;
+ this.location = null;
+ }
+
/**
* Returns the original route.
*
@@ -112,7 +142,9 @@
* Returns the next hop location.
*
* @return connect point where the next hop attaches to
+ * @deprecated in 1.11 ("Loon")
*/
+ @Deprecated
public ConnectPoint location() {
return location;
}