Fixing Activator to get InventoryService register with ConfigurationService properly. 18/8918/2
authorMadhu Venugopal <mavenugo@gmail.com>
Fri, 11 Jul 2014 00:06:36 +0000 (17:06 -0700)
committerMadhu Venugopal <mavenugo@gmail.com>
Fri, 11 Jul 2014 00:39:24 +0000 (17:39 -0700)
Change-Id: Ic3785f2c74820208859015ce1b8f9663265869b0
Signed-off-by: Madhu Venugopal <mavenugo@gmail.com>
distribution/opendaylight/pom.xml
plugin/src/main/java/org/opendaylight/ovsdb/plugin/Activator.java
plugin/src/main/java/org/opendaylight/ovsdb/plugin/InventoryService.java
plugin/src/main/java/org/opendaylight/ovsdb/plugin/NodeDB.java

index 54095f632609902f419bc2cc44e499cf2345b1a9..84b880de882061152dc881e8673fd808bebd31d5 100755 (executable)
@@ -43,6 +43,11 @@ see https://git.opendaylight.org/gerrit/#/c/390/
       <artifactId>openflowplugin</artifactId>
       <version>0.0.3-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.openflowplugin</groupId>
+      <artifactId>openflowplugin-api</artifactId>
+      <version>0.0.3-SNAPSHOT</version>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.openflowplugin</groupId>
       <artifactId>openflowplugin-controller-config</artifactId>
index 96e8102abb80073d0e5bfe5888e5ef995e85c6eb..6207331484e0d97a96b9eedf236c17e994e3c92a 100644 (file)
@@ -124,9 +124,8 @@ public class Activator extends ComponentActivatorAbstractBase {
                     .setRequired(true));
             c.add(createServiceDependency()
                     .setService(OVSDBConfigService.class)
-                    .setCallbacks("setConfigService", "unsetConfigService")
+                    .setCallbacks("setConfigurationService", "unsetConfigurationService")
                     .setRequired(false));
-
         }
 
         if (imp.equals(NodeFactory.class)) {
index 4c92c0be51f9c665d8ff4f66bd6792dd096ba926..0240c7a484727313ab47a785848b21ae6998477e 100644 (file)
@@ -196,13 +196,19 @@ public class InventoryService implements IPluginInInventoryService, InventorySer
         }
     }
 
-    private void handleOpenVSwitchSpecialCase(Node node, String databaseName, String tableName, UUID uuid) {
+    private void handleOpenVSwitchSpecialCase(final Node node, final String databaseName, final String tableName, final UUID uuid) {
         if (OvsVswitchdSchemaConstants.shouldConfigureController(databaseName, tableName)) {
-            try {
-                if (configurationService != null) configurationService.setOFController(node, uuid.toString());
-            } catch (InterruptedException | ExecutionException e) {
-                e.printStackTrace();
-            }
+            Runnable updateControllerRunnable = new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        if (configurationService != null) configurationService.setOFController(node, uuid.toString());
+                    } catch (InterruptedException | ExecutionException e) {
+                        e.printStackTrace();
+                    }
+                }
+            };
+            executor.execute(updateControllerRunnable);
         }
     }
 
index 59dc3a9fd12e666515a540c4f4448da46969bed9..7e70173028f9ed0eb9d7b916bc096c79045501e8 100644 (file)
@@ -72,7 +72,7 @@ public class NodeDB {
                     Collection<Column> columns = row.getColumns();
                     System.out.print("\t\t"+uuid+ "==");
                     for (Column column : columns) {
-                        if (column.getData() != null) System.out.print(column.getSchema().getName()+" : "+ column.getData());
+                        if (column.getData() != null) System.out.print(column.getSchema().getName()+" : "+ column.getData()+" ");
                     }
                     System.out.println("");
                 }