Showing
3 changed files
with
21 additions
and
0 deletions
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; | ||
4 | import org.onlab.onos.net.provider.ProviderService; | 5 | import org.onlab.onos.net.provider.ProviderService; |
5 | 6 | ||
6 | import java.util.List; | 7 | import java.util.List; |
... | @@ -45,4 +46,13 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> { | ... | @@ -45,4 +46,13 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> { |
45 | */ | 46 | */ |
46 | void portStatusChanged(DeviceId deviceId, PortDescription portDescription); | 47 | void portStatusChanged(DeviceId deviceId, PortDescription portDescription); |
47 | 48 | ||
49 | + /** | ||
50 | + * Notifies the core about the providers inability to assert the specified | ||
51 | + * mastership role on the device. | ||
52 | + * | ||
53 | + * @param deviceId identity of the device | ||
54 | + * @param role mastership role being asserted | ||
55 | + */ | ||
56 | + void unableToAssertRole(DeviceId deviceId, MastershipRole role); | ||
57 | + | ||
48 | } | 58 | } | ... | ... |
... | @@ -224,6 +224,11 @@ public class DeviceManager | ... | @@ -224,6 +224,11 @@ public class DeviceManager |
224 | post(event); | 224 | post(event); |
225 | } | 225 | } |
226 | } | 226 | } |
227 | + | ||
228 | + @Override | ||
229 | + public void unableToAssertRole(DeviceId deviceId, MastershipRole role) { | ||
230 | + // FIXME: implement response to this notification | ||
231 | + } | ||
227 | } | 232 | } |
228 | 233 | ||
229 | // Posts the specified event to the local event dispatcher. | 234 | // Posts the specified event to the local event dispatcher. | ... | ... |
... | @@ -20,6 +20,7 @@ import org.junit.Test; | ... | @@ -20,6 +20,7 @@ import org.junit.Test; |
20 | import org.onlab.onos.net.DefaultDevice; | 20 | import org.onlab.onos.net.DefaultDevice; |
21 | import org.onlab.onos.net.Device; | 21 | import org.onlab.onos.net.Device; |
22 | import org.onlab.onos.net.DeviceId; | 22 | import org.onlab.onos.net.DeviceId; |
23 | +import org.onlab.onos.net.MastershipRole; | ||
23 | import org.onlab.onos.net.device.DeviceDescription; | 24 | import org.onlab.onos.net.device.DeviceDescription; |
24 | import org.onlab.onos.net.device.DeviceProvider; | 25 | import org.onlab.onos.net.device.DeviceProvider; |
25 | import org.onlab.onos.net.device.DeviceProviderRegistry; | 26 | import org.onlab.onos.net.device.DeviceProviderRegistry; |
... | @@ -181,6 +182,11 @@ public class OpenFlowDeviceProviderTest { | ... | @@ -181,6 +182,11 @@ public class OpenFlowDeviceProviderTest { |
181 | descr = portDescription; | 182 | descr = portDescription; |
182 | } | 183 | } |
183 | 184 | ||
185 | + @Override | ||
186 | + public void unableToAssertRole(DeviceId deviceId, MastershipRole role) { | ||
187 | + // FIXME: add fixture core when tests are done on this | ||
188 | + } | ||
189 | + | ||
184 | } | 190 | } |
185 | } | 191 | } |
186 | 192 | ... | ... |
-
Please register or login to post a comment