Introduced a new API to match on auxLocations in getConnectedHosts
Change-Id: I3df5493898bd389a5dfe631053f5ce51c076c106
diff --git a/core/api/src/main/java/org/onosproject/net/host/HostService.java b/core/api/src/main/java/org/onosproject/net/host/HostService.java
index 349f6db..12da84c 100644
--- a/core/api/src/main/java/org/onosproject/net/host/HostService.java
+++ b/core/api/src/main/java/org/onosproject/net/host/HostService.java
@@ -89,6 +89,17 @@
Set<Host> getConnectedHosts(ConnectPoint connectPoint);
/**
+ * Returns the set of host that attach to the specified connect point.
+ *
+ * @param connectPoint connect point
+ * @param matchAuxLocations true to match on the auxLocations, false to match on locations of the hosts
+ * @return set of hosts connected to the connection point
+ */
+ default Set<Host> getConnectedHosts(ConnectPoint connectPoint, boolean matchAuxLocations) {
+ return getConnectedHosts(connectPoint);
+ }
+
+ /**
* Returns the set of hosts that attach to the specified device.
*
* @param deviceId device identifier
diff --git a/core/api/src/main/java/org/onosproject/net/host/HostStore.java b/core/api/src/main/java/org/onosproject/net/host/HostStore.java
index b6b27b5..2bad087 100644
--- a/core/api/src/main/java/org/onosproject/net/host/HostStore.java
+++ b/core/api/src/main/java/org/onosproject/net/host/HostStore.java
@@ -135,6 +135,17 @@
Set<Host> getConnectedHosts(ConnectPoint connectPoint);
/**
+ * Returns the set of host that attach to the specified connect point.
+ *
+ * @param connectPoint connect point
+ * @param matchAuxLocations true to match on the auxLocations, false to match on locations of the hosts
+ * @return set of hosts connected to the connection point
+ */
+ default Set<Host> getConnectedHosts(ConnectPoint connectPoint, boolean matchAuxLocations) {
+ return getConnectedHosts(connectPoint);
+ }
+
+ /**
* Returns the set of hosts that attach to the specified device.
*
* @param deviceId infrastructure device identifier