Node created when device connects is created with empty Node list 59/20659/1
authorMartin Bobak <mbobak@cisco.com>
Mon, 18 May 2015 16:11:35 +0000 (18:11 +0200)
committerMartin Bobak <mbobak@cisco.com>
Mon, 18 May 2015 16:11:35 +0000 (18:11 +0200)
Change-Id: I1f44dffb9406e7d31783cac75baa4d5f6cec007f
Signed-off-by: Martin Bobak <mbobak@cisco.com>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceManagerImpl.java

index ec12e6ab45070ec49b961abbafaf883301af3209..8daec910f0a12fc93084cfc8cd779f05bc3f6d2e 100644 (file)
@@ -128,7 +128,10 @@ public class DeviceManagerImpl implements DeviceManager, AutoCloseable {
         hashedWheelTimer = new HashedWheelTimer(TICK_DURATION, TimeUnit.MILLISECONDS, 500);
         /* merge empty nodes to oper DS to predict any problems with missing parent for Node */
         final WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
-        tx.merge(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Nodes.class), new NodesBuilder().build());
+
+        final NodesBuilder nodesBuilder = new NodesBuilder();
+        nodesBuilder.setNode(Collections.<Node>emptyList());
+        tx.merge(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Nodes.class), nodesBuilder.build());
         tx.submit();
 
         this.messageIntelligenceAgency = messageIntelligenceAgency;