Allowing edge-links to be created with (inherit) the target host annotations.
This will permit edge-links to be treated as projectable entities based on the annotations of the target hosts.
Change-Id: I336f0959639f4d84ade2cf44b65bf6bb2f241d6e
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java b/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
index 7bafeda..9024cfe 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
@@ -81,6 +81,8 @@
/**
* Creates a an edge link, to the specified end-station.
*
+ * The edge link inherits the target host annotations.
+ *
* @param host host
* @param isIngress true to indicate host-to-network direction; false
* for network-to-host direction
@@ -90,7 +92,7 @@
checkNotNull(host, "Host cannot be null");
return new DefaultEdgeLink(ProviderId.NONE,
new ConnectPoint(host.id(), PortNumber.P0),
- host.location(), isIngress);
+ host.location(), isIngress, host.annotations());
}
}