Merge "Config save support for networkconfiguration.neutron"
[controller.git] / opendaylight / networkconfiguration / neutron / implementation / src / main / java / org / opendaylight / controller / networkconfig / neutron / implementation / Activator.java
index 4202856774b81a19403a0de2f193c8aa24bf185e..351496abb3052c406260191bc80cf77f8db32266 100644 (file)
@@ -10,11 +10,12 @@ package org.opendaylight.controller.networkconfig.neutron.implementation;
 
 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.networkconfig.neutron.INeutronFloatingIPCRUD;
 import org.opendaylight.controller.networkconfig.neutron.INeutronNetworkCRUD;
 import org.opendaylight.controller.networkconfig.neutron.INeutronPortCRUD;
@@ -32,6 +33,7 @@ public class Activator extends ComponentActivatorAbstractBase {
      * ComponentActivatorAbstractBase.
      *
      */
+    @Override
     public void init() {
 
     }
@@ -41,6 +43,7 @@ public class Activator extends ComponentActivatorAbstractBase {
      * cleanup done by ComponentActivatorAbstractBase
      *
      */
+    @Override
     public void destroy() {
 
     }
@@ -54,6 +57,7 @@ public class Activator extends ComponentActivatorAbstractBase {
      * instantiated in order to get an fully working implementation
      * Object
      */
+    @Override
     public Object[] getImplementations() {
         Object[] res = { NeutronFloatingIPInterface.class,
                 NeutronRouterInterface.class,
@@ -76,11 +80,13 @@ public class Activator extends ComponentActivatorAbstractBase {
      * 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)
@@ -91,7 +97,8 @@ public class Activator extends ComponentActivatorAbstractBase {
         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)
@@ -102,7 +109,8 @@ public class Activator extends ComponentActivatorAbstractBase {
         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)
@@ -113,7 +121,8 @@ public class Activator extends ComponentActivatorAbstractBase {
         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)
@@ -124,7 +133,8 @@ public class Activator extends ComponentActivatorAbstractBase {
         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)