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