protocol plugin stub node type
[controller.git] / opendaylight / protocol_plugins / stub / src / main / java / org / opendaylight / controller / protocol_plugins / stub / internal / Activator.java
index cf93fb0a37fb1381716934da2220d6df7eba456c..580dabba35a6b0ccfbe591f8cc3e288013e600ec 100644 (file)
@@ -8,6 +8,7 @@ import org.apache.felix.dm.Component;
 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
 import org.opendaylight.controller.sal.core.IContainerListener;
 import org.opendaylight.controller.sal.core.Node;
+import org.opendaylight.controller.sal.core.NodeConnector;
 import org.opendaylight.controller.sal.discovery.IDiscoveryService;
 import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
 import org.opendaylight.controller.sal.inventory.IPluginInInventoryService;
@@ -38,6 +39,8 @@ public class Activator extends ComponentActivatorAbstractBase {
      * 
      */
     public void init() {
+        Node.NodeIDType.registerIDType("STUB", Integer.class);
+        NodeConnector.NodeConnectorIDType.registerIDType("STUB", Integer.class, "STUB");
     }
 
     /**
@@ -46,6 +49,8 @@ public class Activator extends ComponentActivatorAbstractBase {
      * 
      */
     public void destroy() {
+        Node.NodeIDType.unRegisterIDType("STUB");
+        NodeConnector.NodeConnectorIDType.unRegisterIDType("STUB");
     }
 
     /**
@@ -83,7 +88,7 @@ public class Activator extends ComponentActivatorAbstractBase {
             Dictionary<String, Object> props = new Hashtable<String, Object>();
             // Set the protocolPluginType property which will be used
             // by SAL
-            props.put("protocolPluginType", Node.NodeIDType.OPENFLOW);
+            props.put("protocolPluginType", "STUB");
             c.setInterface(IPluginInReadService.class.getName(), props);
         }
 
@@ -92,7 +97,7 @@ public class Activator extends ComponentActivatorAbstractBase {
             Dictionary<String, Object> props = new Hashtable<String, Object>();
             // Set the protocolPluginType property which will be used
             // by SAL
-            props.put("protocolPluginType", Node.NodeIDType.OPENFLOW);
+            props.put("protocolPluginType", "STUB");
             c.setInterface(IPluginInInventoryService.class.getName(), props);
         }
     }