tom

Changed deviceConnected signature.

1 package org.onlab.onos.net.device; 1 package org.onlab.onos.net.device;
2 2
3 import org.onlab.onos.net.DeviceId; 3 import org.onlab.onos.net.DeviceId;
4 -import org.onlab.onos.net.MastershipRole;
5 import org.onlab.onos.net.provider.ProviderService; 4 import org.onlab.onos.net.provider.ProviderService;
6 5
7 import java.util.List; 6 import java.util.List;
...@@ -18,9 +17,8 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> { ...@@ -18,9 +17,8 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> {
18 * Signals the core that a device has connected or has been detected somehow. 17 * Signals the core that a device has connected or has been detected somehow.
19 * 18 *
20 * @param deviceDescription information about network device 19 * @param deviceDescription information about network device
21 - * @return mastership role chosen by the provider service
22 */ 20 */
23 - MastershipRole deviceConnected(DeviceId deviceId, DeviceDescription deviceDescription); 21 + void deviceConnected(DeviceId deviceId, DeviceDescription deviceDescription);
24 22
25 /** 23 /**
26 * Signals the core that a device has disconnected or is no longer reachable. 24 * Signals the core that a device has disconnected or is no longer reachable.
......
...@@ -120,13 +120,12 @@ public class SimpleDeviceManager ...@@ -120,13 +120,12 @@ public class SimpleDeviceManager
120 } 120 }
121 121
122 @Override 122 @Override
123 - public MastershipRole deviceConnected(DeviceId deviceId, DeviceDescription deviceDescription) { 123 + public void deviceConnected(DeviceId deviceId, DeviceDescription deviceDescription) {
124 checkNotNull(deviceId, DEVICE_ID_NULL); 124 checkNotNull(deviceId, DEVICE_ID_NULL);
125 checkNotNull(deviceDescription, DEVICE_DESCRIPTION_NULL); 125 checkNotNull(deviceDescription, DEVICE_DESCRIPTION_NULL);
126 log.info("Device {} connected: {}", deviceId, deviceDescription); 126 log.info("Device {} connected: {}", deviceId, deviceDescription);
127 DeviceEvent event = store.createOrUpdateDevice(deviceId, deviceDescription); 127 DeviceEvent event = store.createOrUpdateDevice(deviceId, deviceDescription);
128 post(event); 128 post(event);
129 - return MastershipRole.MASTER;
130 } 129 }
131 130
132 @Override 131 @Override
......