blob: 5401646aa83e63b13ba694950b694fefa5e8cbad [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.device;
2
tomd3097b02014-08-26 10:40:29 -07003import org.onlab.onos.net.DeviceId;
tomc1a38d32014-08-25 23:01:32 -07004import org.onlab.onos.net.provider.ProviderService;
tom0eb04ca2014-08-25 14:34:51 -07005
6import java.util.List;
7
8/**
9 * Service through which device providers can inject device information into
10 * the core.
11 */
tomd7356722014-08-26 01:07:39 -070012public interface DeviceProviderService extends ProviderService<DeviceProvider> {
tom0eb04ca2014-08-25 14:34:51 -070013
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 */
tomd1c06492014-09-03 11:07:58 -070021 void deviceConnected(DeviceId deviceId, DeviceDescription deviceDescription);
tom0eb04ca2014-08-25 14:34:51 -070022
23 /**
24 * Signals the core that a device has disconnected or is no longer reachable.
25 *
tomd3097b02014-08-26 10:40:29 -070026 * @param deviceId identity of the device to be removed
tom0eb04ca2014-08-25 14:34:51 -070027 */
tomd3097b02014-08-26 10:40:29 -070028 void deviceDisconnected(DeviceId deviceId);
tom0eb04ca2014-08-25 14:34:51 -070029
30 /**
31 * Sends information about all ports of a device. It is up to the core to
32 * determine what has changed.
tomd3097b02014-08-26 10:40:29 -070033 * <p/>
tom0eb04ca2014-08-25 14:34:51 -070034 *
tom32f66842014-08-27 19:27:47 -070035 * @param deviceId identity of the device
36 * @param portDescriptions list of device ports
tom0eb04ca2014-08-25 14:34:51 -070037 */
tom32f66842014-08-27 19:27:47 -070038 void updatePorts(DeviceId deviceId, List<PortDescription> portDescriptions);
tom0eb04ca2014-08-25 14:34:51 -070039
40 /**
41 * Used to notify the core about port status change of a single port.
42 *
tom32f66842014-08-27 19:27:47 -070043 * @param deviceId identity of the device
44 * @param portDescription description of the port that changed
tom0eb04ca2014-08-25 14:34:51 -070045 */
tom32f66842014-08-27 19:27:47 -070046 void portStatusChanged(DeviceId deviceId, PortDescription portDescription);
tom0eb04ca2014-08-25 14:34:51 -070047
48}