tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.device; |
| 2 | |
tom | d3097b0 | 2014-08-26 10:40:29 -0700 | [diff] [blame] | 3 | import org.onlab.onos.net.DeviceId; |
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 | */ |
tom | d735672 | 2014-08-26 01:07:39 -0700 | [diff] [blame] | 12 | public interface DeviceProviderService extends ProviderService<DeviceProvider> { |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 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 |
| 20 | */ |
tom | d1c0649 | 2014-09-03 11:07:58 -0700 | [diff] [blame] | 21 | void deviceConnected(DeviceId deviceId, DeviceDescription deviceDescription); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Signals the core that a device has disconnected or is no longer reachable. |
| 25 | * |
tom | d3097b0 | 2014-08-26 10:40:29 -0700 | [diff] [blame] | 26 | * @param deviceId identity of the device to be removed |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 27 | */ |
tom | d3097b0 | 2014-08-26 10:40:29 -0700 | [diff] [blame] | 28 | void deviceDisconnected(DeviceId deviceId); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * Sends information about all ports of a device. It is up to the core to |
| 32 | * determine what has changed. |
tom | d3097b0 | 2014-08-26 10:40:29 -0700 | [diff] [blame] | 33 | * <p/> |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 34 | * |
tom | 32f6684 | 2014-08-27 19:27:47 -0700 | [diff] [blame] | 35 | * @param deviceId identity of the device |
| 36 | * @param portDescriptions list of device ports |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 37 | */ |
tom | 32f6684 | 2014-08-27 19:27:47 -0700 | [diff] [blame] | 38 | void updatePorts(DeviceId deviceId, List<PortDescription> portDescriptions); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
| 41 | * Used to notify the core about port status change of a single port. |
| 42 | * |
tom | 32f6684 | 2014-08-27 19:27:47 -0700 | [diff] [blame] | 43 | * @param deviceId identity of the device |
| 44 | * @param portDescription description of the port that changed |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 45 | */ |
tom | 32f6684 | 2014-08-27 19:27:47 -0700 | [diff] [blame] | 46 | void portStatusChanged(DeviceId deviceId, PortDescription portDescription); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 47 | |
| 48 | } |