Added NodeRef to UpdatedNode to allow correct catching of notification 08/2608/2
authorEd Warnicke <eaw@cisco.com>
Mon, 11 Nov 2013 12:05:07 +0000 (06:05 -0600)
committerMichal Rehak <mirehak@cisco.com>
Tue, 12 Nov 2013 19:31:44 +0000 (20:31 +0100)
by inventory-manager.

changed IT paxexam container into forked

Change-Id: Ib9ce7aa1a4407da4d0d4ff83c10fca4e0fce4fbc
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin-it/pom.xml
openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/SalIntegrationTest.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/SalRegistrationManager.java

index bf4252e04ac3c3977d764e7a787d2bf313820405..67f67b90f6456529359def0de0c8406bcb52f651 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
-            <artifactId>pax-exam-container-native</artifactId>
+            <artifactId>pax-exam-container-forked</artifactId>
             <version>${exam.version}</version>
             <scope>test</scope>
         </dependency>
index 27ed94cf042e16a2811bd6022ae438570d2a226a..5ad7dcfaffc69dc8b1217bf215d0ac6392783bbf 100644 (file)
@@ -111,34 +111,35 @@ public class SalIntegrationTest {
      */
     @Configuration
     public Option[] config() {
-        return options(systemProperty("osgi.console").value("2401"), mavenBundle("org.slf4j", "slf4j-api")
-                .versionAsInProject(), mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(),
+        return options(systemProperty("osgi.console").value("2401"),
+                mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(), 
+                mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(),
                 mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(),
                 mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(),
-                mavenBundle("org.opendaylight.yangtools.thirdparty", "xtend-lib-osgi").versionAsInProject(),
-                mavenBundle("com.google.guava", "guava").versionAsInProject(),
-                mavenBundle("org.javassist", "javassist").versionAsInProject(),
+                
                 mavenBundle("org.apache.felix", "org.apache.felix.dependencymanager").versionAsInProject(),
-                mavenBundle("org.apache.commons", "commons-lang3").versionAsInProject(),
-
-                mavenBundle(ODL, "sal").versionAsInProject(), mavenBundle(ODL, "sal.connection").versionAsInProject(),
-
-                mdSalCoreBundles(), bindingAwareSalBundles(), baseModelBundles(), flowCapableModelBundles(),
-                configMinumumBundles(),
-
-                mavenBundle("org.opendaylight.controller.thirdparty", "org.openflow.openflowj").versionAsInProject(),
 
                 mavenBundle(OFLIBRARY, "openflow-protocol-impl").versionAsInProject(),
                 mavenBundle(OFLIBRARY, "openflow-protocol-api").versionAsInProject(),
                 mavenBundle(OFLIBRARY, "openflow-protocol-spi").versionAsInProject(),
 
-                mavenBundle(NETTY, "netty-handler").versionAsInProject(), mavenBundle(NETTY, "netty-buffer")
-                        .versionAsInProject(), mavenBundle(NETTY, "netty-common").versionAsInProject(),
-                mavenBundle(NETTY, "netty-transport").versionAsInProject(), mavenBundle(NETTY, "netty-codec")
-                        .versionAsInProject(),
+                mavenBundle(ODL, "sal").versionAsInProject(), 
+                mavenBundle(ODL, "sal.connection").versionAsInProject(),
+                mdSalCoreBundles(), baseModelBundles(), flowCapableModelBundles(),
+                configMinumumBundles(),
+
+                bindingAwareSalBundles(), 
+
+                mavenBundle(NETTY, "netty-handler").versionAsInProject(), 
+                mavenBundle(NETTY, "netty-buffer").versionAsInProject(), 
+                mavenBundle(NETTY, "netty-common").versionAsInProject(),
+                mavenBundle(NETTY, "netty-transport").versionAsInProject(), 
+                mavenBundle(NETTY, "netty-codec").versionAsInProject(),
 
                 mavenBundle(OFLIBRARY, "simple-client").versionAsInProject().start(),
-                mavenBundle(OFPLUGIN, "openflowplugin").versionAsInProject(), junitBundles());
+                mavenBundle(OFPLUGIN, "openflowplugin").versionAsInProject(), junitBundles(),
+                mavenBundle("org.opendaylight.controller.thirdparty", "org.openflow.openflowj").versionAsInProject()
+                );
     }
 
     private static class TestInventoryListener implements OpendaylightInventoryListener {
index 2368fab2f898cfef8cbc797dcd053c094c4a970c..8851a16c01080948eaff1638c76906f9e0682173 100644 (file)
@@ -1,6 +1,5 @@
 package org.opendaylight.openflowplugin.openflow.md.core.sal;
 
-import java.io.Console;
 import java.math.BigInteger;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
@@ -78,6 +77,10 @@ public class SalRegistrationManager implements SessionListener, SwitchInventory
     private NodeUpdated nodeAdded(ModelDrivenSwitch sw, GetFeaturesOutput features) {
         NodeUpdatedBuilder builder = new NodeUpdatedBuilder();
         builder.setId(sw.getNodeId());
+        builder.setNodeRef(new NodeRef(InstanceIdentifier.builder()
+                .node(Nodes.class)
+                .node(Node.class, new NodeKey(builder.getId()))
+                .toInstance()));
         return builder.build();
     }