blob: 40ffc3e2786af23f5fdae3b59ffa8862d42e426e [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.device;
2
tome33cc1a2014-08-25 21:59:41 -07003import org.onlab.onos.net.MastershipRole;
4import org.onlab.onos.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 */
12public 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
tome33cc1a2014-08-25 21:59:41 -070020 * @return mastership role chosen by the provider service
tom0eb04ca2014-08-25 14:34:51 -070021 */
tome33cc1a2014-08-25 21:59:41 -070022 MastershipRole deviceConnected(DeviceDescription deviceDescription);
tom0eb04ca2014-08-25 14:34:51 -070023
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}