tom

Added back-pipe for role assertion issues.

package org.onlab.onos.net.device;
import org.onlab.onos.net.DeviceId;
import org.onlab.onos.net.MastershipRole;
import org.onlab.onos.net.provider.ProviderService;
import java.util.List;
......@@ -45,4 +46,13 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> {
*/
void portStatusChanged(DeviceId deviceId, PortDescription portDescription);
/**
* Notifies the core about the providers inability to assert the specified
* mastership role on the device.
*
* @param deviceId identity of the device
* @param role mastership role being asserted
*/
void unableToAssertRole(DeviceId deviceId, MastershipRole role);
}
......
......@@ -224,6 +224,11 @@ public class DeviceManager
post(event);
}
}
@Override
public void unableToAssertRole(DeviceId deviceId, MastershipRole role) {
// FIXME: implement response to this notification
}
}
// Posts the specified event to the local event dispatcher.
......
......@@ -20,6 +20,7 @@ import org.junit.Test;
import org.onlab.onos.net.DefaultDevice;
import org.onlab.onos.net.Device;
import org.onlab.onos.net.DeviceId;
import org.onlab.onos.net.MastershipRole;
import org.onlab.onos.net.device.DeviceDescription;
import org.onlab.onos.net.device.DeviceProvider;
import org.onlab.onos.net.device.DeviceProviderRegistry;
......@@ -181,6 +182,11 @@ public class OpenFlowDeviceProviderTest {
descr = portDescription;
}
@Override
public void unableToAssertRole(DeviceId deviceId, MastershipRole role) {
// FIXME: add fixture core when tests are done on this
}
}
}
......