import java.util.Hashtable;
import java.util.Dictionary;
+
import org.apache.felix.dm.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
import org.opendaylight.controller.clustering.services.IClusterContainerServices;
+import org.opendaylight.controller.configuration.IConfigurationContainerAware;
+import org.opendaylight.controller.configuration.IConfigurationContainerService;
import org.opendaylight.controller.networkconfig.neutron.INeutronFloatingIPCRUD;
import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkCRUD;
import org.opendaylight.controller.networkconfig.neutron.INeutronPortCRUD;
* ComponentActivatorAbstractBase.
*
*/
+ @Override
public void init() {
}
* cleanup done by ComponentActivatorAbstractBase
*
*/
+ @Override
public void destroy() {
}
* instantiated in order to get an fully working implementation
* Object
*/
+ @Override
public Object[] getImplementations() {
Object[] res = { NeutronFloatingIPInterface.class,
NeutronRouterInterface.class,
* also optional per-container different behavior if needed, usually
* should not be the case though.
*/
+ @Override
public void configureInstance(Component c, Object imp, String containerName) {
if (imp.equals(NeutronFloatingIPInterface.class)) {
// export the service
c.setInterface(
- new String[] { INeutronFloatingIPCRUD.class.getName() }, null);
+ new String[] { INeutronFloatingIPCRUD.class.getName(),
+ IConfigurationContainerAware.class.getName()}, null);
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("salListenerName", "neutron");
c.add(createContainerServiceDependency(containerName)
.setService(IClusterContainerServices.class)
.setCallbacks("setClusterContainerService",
"unsetClusterContainerService").setRequired(true));
+ c.add(createContainerServiceDependency(containerName).setService(
+ IConfigurationContainerService.class).setCallbacks(
+ "setConfigurationContainerService",
+ "unsetConfigurationContainerService").setRequired(true));
}
if (imp.equals(NeutronRouterInterface.class)) {
// export the service
c.setInterface(
- new String[] { INeutronRouterCRUD.class.getName() }, null);
+ new String[] { INeutronRouterCRUD.class.getName(),
+ IConfigurationContainerAware.class.getName()}, null);
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("salListenerName", "neutron");
c.add(createContainerServiceDependency(containerName)
.setService(IClusterContainerServices.class)
.setCallbacks("setClusterContainerService",
"unsetClusterContainerService").setRequired(true));
+ c.add(createContainerServiceDependency(containerName).setService(
+ IConfigurationContainerService.class).setCallbacks(
+ "setConfigurationContainerService",
+ "unsetConfigurationContainerService").setRequired(true));
}
if (imp.equals(NeutronPortInterface.class)) {
// export the service
c.setInterface(
- new String[] { INeutronPortCRUD.class.getName() }, null);
+ new String[] { INeutronPortCRUD.class.getName(),
+ IConfigurationContainerAware.class.getName()}, null);
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("salListenerName", "neutron");
c.add(createContainerServiceDependency(containerName)
.setService(IClusterContainerServices.class)
.setCallbacks("setClusterContainerService",
"unsetClusterContainerService").setRequired(true));
+ c.add(createContainerServiceDependency(containerName).setService(
+ IConfigurationContainerService.class).setCallbacks(
+ "setConfigurationContainerService",
+ "unsetConfigurationContainerService").setRequired(true));
}
if (imp.equals(NeutronSubnetInterface.class)) {
// export the service
c.setInterface(
- new String[] { INeutronSubnetCRUD.class.getName() }, null);
+ new String[] { INeutronSubnetCRUD.class.getName(),
+ IConfigurationContainerAware.class.getName()}, null);
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("salListenerName", "neutron");
c.add(createContainerServiceDependency(containerName)
.setService(IClusterContainerServices.class)
.setCallbacks("setClusterContainerService",
"unsetClusterContainerService").setRequired(true));
+ c.add(createContainerServiceDependency(containerName).setService(
+ IConfigurationContainerService.class).setCallbacks(
+ "setConfigurationContainerService",
+ "unsetConfigurationContainerService").setRequired(true));
}
if (imp.equals(NeutronNetworkInterface.class)) {
// export the service
c.setInterface(
- new String[] { INeutronNetworkCRUD.class.getName() }, null);
+ new String[] { INeutronNetworkCRUD.class.getName(),
+ IConfigurationContainerAware.class.getName()}, null);
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("salListenerName", "neutron");
c.add(createContainerServiceDependency(containerName)
.setService(IClusterContainerServices.class)
.setCallbacks("setClusterContainerService",
"unsetClusterContainerService").setRequired(true));
+ c.add(createContainerServiceDependency(containerName).setService(
+ IConfigurationContainerService.class).setCallbacks(
+ "setConfigurationContainerService",
+ "unsetConfigurationContainerService").setRequired(true));
}
}
}