blob: 29f6c045e3ea931abbdcc2f8bc42de6ea5b8ec59 [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;
Jonathan Hartac60c082014-09-23 08:55:17 -07007import org.onlab.packet.IpAddress;
8import org.onlab.packet.MacAddress;
tom89b63c52014-09-16 09:19:51 -07009
10/**
11 * Service for administering the inventory of end-station hosts.
12 */
13public interface HostAdminService {
14
15 /**
16 * Removes the end-station host with the specified identifier.
17 *
18 * @param hostId host identifier
19 */
20 void removeHost(HostId hostId);
21
Jonathan Hartac60c082014-09-23 08:55:17 -070022 /**
23 * Binds an IP address and optional MAC address to the given connection
24 * point.
25 * <p/>
26 * This method will overwrite any previously held address information for
27 * the connection point.
28 *
29 * @param ip the IP address to bind to the connection point. This parameter
30 * is mandatory and cannot be null.
31 * @param mac the optional MAC address to bind to the connection point. Can
32 * be set to null if no MAC address needs to be bound.
33 * @param connectPoint the connection point to bind the addresses to
34 */
35 void bindAddressesToPort(IpAddress ip, MacAddress mac, ConnectPoint connectPoint);
36
37 /**
38 * Removes all address information for the given connection point.
39 *
40 * @param connectPoint the connection point to remove address information
41 */
42 void unbindAddressesFromPort(ConnectPoint connectPoint);
43
44 /**
45 * Returns the addresses information for all connection points.
46 *
47 * @return the set of address bindings for all connection points
48 */
49 Set<PortAddresses> getAddressBindings();
50
51 /**
52 * Retrieves the addresses that have been bound to the given connection
53 * point.
54 *
55 * @param connectPoint the connection point to retrieve address bindings
56 * for
57 * @return addresses bound to the port
58 */
59 PortAddresses getAddressBindingsForPort(ConnectPoint connectPoint);
tom89b63c52014-09-16 09:19:51 -070060}