tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.device; |
| 2 | |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 3 | import org.onlab.onos.net.MastershipRole; |
tom | c1a38d3 | 2014-08-25 23:01:32 -0700 | [diff] [blame] | 4 | import org.onlab.onos.net.provider.ProviderService; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 5 | |
| 6 | import java.util.List; |
| 7 | |
| 8 | /** |
| 9 | * Service through which device providers can inject device information into |
| 10 | * the core. |
| 11 | */ |
| 12 | public interface DeviceProviderService extends ProviderService { |
| 13 | |
| 14 | // TODO: define suspend and remove actions on the mezzanine administrative API |
| 15 | |
| 16 | /** |
| 17 | * Signals the core that a device has connected or has been detected somehow. |
| 18 | * |
| 19 | * @param deviceDescription information about network device |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 20 | * @return mastership role chosen by the provider service |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 21 | */ |
tom | e33cc1a | 2014-08-25 21:59:41 -0700 | [diff] [blame] | 22 | MastershipRole deviceConnected(DeviceDescription deviceDescription); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 23 | |
| 24 | /** |
| 25 | * Signals the core that a device has disconnected or is no longer reachable. |
| 26 | * |
| 27 | * @param deviceDescription device to be removed |
| 28 | */ |
| 29 | void deviceDisconnected(DeviceDescription deviceDescription); |
| 30 | |
| 31 | /** |
| 32 | * Sends information about all ports of a device. It is up to the core to |
| 33 | * determine what has changed. |
| 34 | * |
| 35 | * @param ports list of device ports |
| 36 | */ |
| 37 | void updatePorts(List<PortDescription> ports); |
| 38 | |
| 39 | /** |
| 40 | * Used to notify the core about port status change of a single port. |
| 41 | * |
| 42 | * @param port description of the port that changed |
| 43 | */ |
| 44 | void portStatusChanged(PortDescription port); |
| 45 | |
| 46 | } |