tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.host; |
| 2 | |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 3 | import org.onlab.onos.net.ConnectPoint; |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 4 | import org.onlab.onos.net.HostId; |
| 5 | |
| 6 | /** |
| 7 | * Service for administering the inventory of end-station hosts. |
| 8 | */ |
| 9 | public interface HostAdminService { |
| 10 | |
| 11 | /** |
| 12 | * Removes the end-station host with the specified identifier. |
| 13 | * |
| 14 | * @param hostId host identifier |
| 15 | */ |
| 16 | void removeHost(HostId hostId); |
| 17 | |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 18 | /** |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 19 | * Binds IP and MAC addresses to the given connection point. |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 20 | * <p/> |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 21 | * The addresses are added to the set of addresses already bound to the |
| 22 | * connection point. If any of the fields in addresses is null, no change |
| 23 | * is made to the corresponding addresses in the store. |
| 24 | * {@link #unbindAddressesFromPort(PortAddresses)} must be use to unbind |
| 25 | * addresses that have previously been bound. |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 26 | * |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 27 | * @param addresses address object containing addresses to add and the port |
| 28 | * to add them to |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 29 | */ |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 30 | void bindAddressesToPort(PortAddresses addresses); |
| 31 | |
| 32 | /** |
| 33 | * Removes the addresses contained in the given PortAddresses object from |
| 34 | * the set of addresses bound to the port. |
| 35 | * |
| 36 | * @param portAddresses set of addresses to remove and port to remove them |
| 37 | * from |
| 38 | */ |
| 39 | void unbindAddressesFromPort(PortAddresses portAddresses); |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 40 | |
| 41 | /** |
| 42 | * Removes all address information for the given connection point. |
| 43 | * |
| 44 | * @param connectPoint the connection point to remove address information |
| 45 | */ |
Jonathan Hart | 09585c6 | 2014-09-23 16:58:04 -0700 | [diff] [blame] | 46 | void clearAddresses(ConnectPoint connectPoint); |
Jonathan Hart | ac60c08 | 2014-09-23 08:55:17 -0700 | [diff] [blame] | 47 | |
tom | 89b63c5 | 2014-09-16 09:19:51 -0700 | [diff] [blame] | 48 | } |