Bug 3173 - group flows rendering fix. 91/20891/1
authorTomas Cechvala <tcechval@cisco.com>
Thu, 21 May 2015 06:58:42 +0000 (08:58 +0200)
committerTomas Cechvala <tcechval@cisco.com>
Thu, 21 May 2015 12:51:25 +0000 (14:51 +0200)
Fixed issue with missing group flows in POC. No need to reset connection between
ovs switches and controller anymore.

Signed-off-by: Tomas Cechvala <tcechval@cisco.com>
renderers/ofoverlay/src/main/java/org/opendaylight/groupbasedpolicy/renderer/ofoverlay/flow/GroupTable.java

index 3c7ab98a790127d9da841af440d2501256d9180f..bdeacb86333c27d2e48eb523265811af6f74b82f 100644 (file)
@@ -79,7 +79,7 @@ public class GroupTable extends OfTable {
         ReadOnlyTransaction t = ctx.getDataBroker().newReadOnlyTransaction();
         InstanceIdentifier<Node> niid = createNodePath(nodeId);
         Optional<Node> r =
-                t.read(LogicalDatastoreType.CONFIGURATION, niid).get();
+                t.read(LogicalDatastoreType.OPERATIONAL, niid).get();
         if (!r.isPresent())
             return;
         FlowCapableNode fcn = r.get().getAugmentation(FlowCapableNode.class);
@@ -158,7 +158,7 @@ public class GroupTable extends OfTable {
                                     .build());
                     wrote = true;
                     wt.merge(LogicalDatastoreType.CONFIGURATION,
-                            giid, gb.build());
+                            giid, gb.build(), true);
                 }
             }
         }