use of org.onosproject.net.driver.DriverEvent in project onos by opennetworkinglab.
the class DriverRegistryManager method unregisterProvider.
@Override
public void unregisterProvider(DriverProvider provider) {
provider.getDrivers().forEach(driver -> {
removeDriver(driver);
driverByKey.remove(key(driver.manufacturer(), driver.hwVersion(), driver.swVersion()));
post(new DriverEvent(DRIVER_REDUCED, driver));
});
providers.remove(provider);
checkRequiredDrivers();
}
use of org.onosproject.net.driver.DriverEvent in project onos by opennetworkinglab.
the class DriverRegistryManager method registerProvider.
@Override
public void registerProvider(DriverProvider provider) {
provider.getDrivers().forEach(driver -> {
Driver d = addDriver(driver);
driverByKey.put(key(driver.manufacturer(), driver.hwVersion(), driver.swVersion()), d);
d.behaviours().forEach(b -> {
Class<? extends Behaviour> implementation = d.implementation(b);
classes.put(b.getName(), b);
classes.put(implementation.getName(), implementation);
});
post(new DriverEvent(DRIVER_ENHANCED, driver));
});
providers.add(provider);
checkRequiredDrivers();
}
Aggregations