blob: 645f7290115949009e66a6bd66268f19d6ba120d [file] [log] [blame]
tom89b63c52014-09-16 09:19:51 -07001package org.onlab.onos.net.host;
2
Jonathan Hartac60c082014-09-23 08:55:17 -07003import java.util.Set;
4
5import org.onlab.onos.net.ConnectPoint;
tom89b63c52014-09-16 09:19:51 -07006import org.onlab.onos.net.HostId;
7
8/**
9 * Service for administering the inventory of end-station hosts.
10 */
11public interface HostAdminService {
12
13 /**
14 * Removes the end-station host with the specified identifier.
15 *
16 * @param hostId host identifier
17 */
18 void removeHost(HostId hostId);
19
Jonathan Hartac60c082014-09-23 08:55:17 -070020 /**
Jonathan Hart09585c62014-09-23 16:58:04 -070021 * Binds IP and MAC addresses to the given connection point.
Jonathan Hartac60c082014-09-23 08:55:17 -070022 * <p/>
Jonathan Hart09585c62014-09-23 16:58:04 -070023 * The addresses are added to the set of addresses already bound to the
24 * connection point. If any of the fields in addresses is null, no change
25 * is made to the corresponding addresses in the store.
26 * {@link #unbindAddressesFromPort(PortAddresses)} must be use to unbind
27 * addresses that have previously been bound.
Jonathan Hartac60c082014-09-23 08:55:17 -070028 *
Jonathan Hart09585c62014-09-23 16:58:04 -070029 * @param addresses address object containing addresses to add and the port
30 * to add them to
Jonathan Hartac60c082014-09-23 08:55:17 -070031 */
Jonathan Hart09585c62014-09-23 16:58:04 -070032 void bindAddressesToPort(PortAddresses addresses);
33
34 /**
35 * Removes the addresses contained in the given PortAddresses object from
36 * the set of addresses bound to the port.
37 *
38 * @param portAddresses set of addresses to remove and port to remove them
39 * from
40 */
41 void unbindAddressesFromPort(PortAddresses portAddresses);
Jonathan Hartac60c082014-09-23 08:55:17 -070042
43 /**
44 * Removes all address information for the given connection point.
45 *
46 * @param connectPoint the connection point to remove address information
47 */
Jonathan Hart09585c62014-09-23 16:58:04 -070048 void clearAddresses(ConnectPoint connectPoint);
Jonathan Hartac60c082014-09-23 08:55:17 -070049
50 /**
51 * Returns the addresses information for all connection points.
52 *
53 * @return the set of address bindings for all connection points
54 */
55 Set<PortAddresses> getAddressBindings();
56
57 /**
58 * Retrieves the addresses that have been bound to the given connection
59 * point.
60 *
61 * @param connectPoint the connection point to retrieve address bindings
62 * for
63 * @return addresses bound to the port
64 */
65 PortAddresses getAddressBindingsForPort(ConnectPoint connectPoint);
tom89b63c52014-09-16 09:19:51 -070066}