X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fhosttracker%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2FIfIptoHost.java;h=e70a6e18650c9c39d09553e94c8f53a584addc22;hb=d6e3e28bf86638685e55289d6cd9cb749838a75e;hp=2451e196f2eaf962a32d8cc53db9b0983b206bcc;hpb=24c4c5d9720b0036b3587821207d96b37b783548;p=controller.git diff --git a/opendaylight/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IfIptoHost.java b/opendaylight/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IfIptoHost.java index 2451e196f2..e70a6e1865 100644 --- a/opendaylight/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IfIptoHost.java +++ b/opendaylight/hosttracker/api/src/main/java/org/opendaylight/controller/hosttracker/IfIptoHost.java @@ -32,47 +32,100 @@ public interface IfIptoHost { * statically through Northbound APIs. If a binding is unknown, then an ARP * request is initiated immediately to discover the host. * - * @param networkAddress - * IP Address of the Host encapsulated in class InetAddress + * @param id + * IP address and Mac Address combination encapsulated in IHostId + * interface * @return {@link org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector} * Class that contains the Host info such as its MAC address, Switch * ID, port, VLAN. If Host is not found, returns NULL */ - public HostNodeConnector hostFind(InetAddress networkAddress); + public HostNodeConnector hostFind(IHostId id); + + /** + * Applications call this interface methods to determine IP address to MAC + * binding and its connectivity to an OpenFlow switch in term of Node, Port, + * and VLAN. These bindings are learned dynamically as well as can be added + * statically through Northbound APIs. If a binding is unknown, then an ARP + * request is initiated immediately to discover the host. + * + * @param addr + * IP address of the host + * @return {@link org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector} + * Class that contains the Host info such as its MAC address, Switch + * ID, port, VLAN. If Host is not found, returns NULL + */ + public HostNodeConnector hostFind(InetAddress addr); /** * Checks the local Host Database to see if a Host has been learned for a - * given IP address. + * given IP address and Mac combination using the HostId. * - * @param networkAddress - * IP Address of the Host encapsulated in class InetAddress + * @param id + * IP address and Mac Address combination encapsulated in IHostId + * interface + * @return {@link org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector} + * Class that contains the Host info such as its MAC address, Switch + * ID, port, VLAN. If Host is not found, returns NULL + * + */ + public HostNodeConnector hostQuery(IHostId id); + + /** + * Checks the local Host Database to see if a Host has been learned for a + * given IP address and Mac combination using the HostId. + * + * @param addr + * IP address of the Host * @return {@link org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector} * Class that contains the Host info such as its MAC address, Switch * ID, port, VLAN. If Host is not found, returns NULL * */ - public HostNodeConnector hostQuery(InetAddress networkAddress); + public HostNodeConnector hostQuery(InetAddress addr); /** - * Initiates an immediate discovery of the Host for a given IP address. This + * Initiates an immediate discovery of the Host for a given Host id. This * provides for the calling applications to block on the host discovery. * - * @param networkAddress - * IP address encapsulated in InetAddress class + * @param id + * IP address and Mac Address combination encapsulated in IHostId + * interface + * @return Future + * {@link org.opendaylight.controller.hosttracker.HostTrackerCallable} + */ + public Future discoverHost(IHostId id); + + /** + * Initiates an immediate discovery of the Host for a given Host id. This + * provides for the calling applications to block on the host discovery. + * + * @param addr + * IP address of the host * @return Future * {@link org.opendaylight.controller.hosttracker.HostTrackerCallable} */ - public Future discoverHost(InetAddress networkAddress); + public Future discoverHost(InetAddress addr); /** * Returns the Network Hierarchy for a given Host. This API is typically * used by applications like Hadoop for Rack Awareness functionality. * - * @param IP - * address of the Host encapsulated in InetAddress class + * @param id + * IP address and Mac Address combination encapsulated in IHostId + * interface * @return List of String ArrayList containing the Hierarchies. */ - public List> getHostNetworkHierarchy(InetAddress hostAddress); + public List> getHostNetworkHierarchy(IHostId id); + + /** + * Returns the Network Hierarchy for a given Host. This API is typically + * used by applications like Hadoop for Rack Awareness functionality. + * + * @param addr + * IP address of the host + * @return List of String ArrayList containing the Hierarchies. + */ + public List> getHostNetworkHierarchy(InetAddress addr); /** * Returns all the the Hosts either learned dynamically or added statically @@ -124,8 +177,7 @@ public interface IfIptoHost { * @return The status object as described in {@code Status} indicating the * result of this action. */ - public Status addStaticHost(String networkAddress, String dataLayerAddress, - NodeConnector nc, String vlan); + public Status addStaticHost(String networkAddress, String dataLayerAddress, NodeConnector nc, String vlan); /** * Allows the deletion of statically learned Host @@ -135,4 +187,14 @@ public interface IfIptoHost { * result of this action. */ public Status removeStaticHost(String networkAddress); + + /** + * Allows the deletion of statically learned Host + * + * @param networkAddress + * @param macAddress + * @return The status object as described in {@code Status} indicating the + * result of this action. + */ + public Status removeStaticHostUsingIPAndMac(String networkAddress, String macAddress); }