import org.apache.felix.dm.Component;
import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
+import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConfigurationService;
import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConnectionService;
import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbInventoryListener;
import org.opendaylight.ovsdb.compatibility.plugin.impl.ConfigurationServiceImpl;
import org.opendaylight.ovsdb.compatibility.plugin.impl.ConnectionServiceImpl;
import org.opendaylight.ovsdb.compatibility.plugin.impl.InventoryServiceImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Activator for ovsdb plugin compatibility layer
*
*/
public class Activator extends ComponentActivatorAbstractBase {
- protected static final Logger logger = LoggerFactory
- .getLogger(Activator.class);
/**
* Function called when the activator starts just after some initializations
*/
@Override
public void init() {
+ Node.NodeIDType.registerIDType("OVS", String.class);
}
/**
*/
@Override
public void destroy() {
+ Node.NodeIDType.unRegisterIDType("OVS");
}
@Override
public Object[] getGlobalImplementations() {
- Object[] res = { ConnectionServiceImpl.class, ConfigurationServiceImpl.class, InventoryServiceImpl.class };
- return res;
+ return new Object[]{ ConnectionServiceImpl.class, ConfigurationServiceImpl.class, InventoryServiceImpl.class };
}
@Override
public void configureGlobalInstance(Component c, Object imp){
if (imp.equals(ConfigurationServiceImpl.class)) {
// export the service to be used by SAL
- Dictionary<String, Object> props = new Hashtable<String, Object>();
+ Dictionary<String, Object> props = new Hashtable<>();
c.setInterface(new String[] { OvsdbConfigurationService.class.getName()}, props);
c.add(createServiceDependency()
.setService(org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService.class)
if (imp.equals(ConnectionServiceImpl.class)) {
// export the service to be used by SAL
- Dictionary<String, Object> props = new Hashtable<String, Object>();
+ Dictionary<String, Object> props = new Hashtable<>();
c.setInterface(
new String[] {OvsdbConnectionService.class.getName()}, props);
c.add(createServiceDependency()