Bug 319: Fixed two-phase commit verification of data. 34/4734/4
authorTony Tkacik <ttkacik@cisco.com>
Fri, 24 Jan 2014 18:30:53 +0000 (19:30 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 25 Jan 2014 20:03:09 +0000 (20:03 +0000)
Change-Id: I0183b2543d8842e485ad118badd14055035a44b0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DOMCodecBug01Test.java
opendaylight/md-sal/sal-dom-broker/pom.xml
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/impl/SchemaAwareDataStoreAdapter.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataOperations.xtend [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/yangtools/yang/util/YangDataOperations.xtend with 94% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangDataUtils.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/yangtools/yang/util/YangDataUtils.java with 95% similarity]
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/util/YangSchemaUtils.java [moved from opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/yangtools/yang/util/YangSchemaUtils.java with 99% similarity]

index 56fbb9a..ee0b356 100644 (file)
@@ -224,7 +224,7 @@ public class DOMCodecBug01Test extends AbstractDataServiceTest {
         @Override
         public Void call() {
             try {
-                //startSyncObject.wait();
+                //startSyncObj          ect.wait();
                 //Thread.sleep(500);
                 createFlow();
                 createFlow2();
index eba096c..57ad058 100644 (file)
                             org.opendaylight.controller.sal.dom.broker,
                             org.opendaylight.controller.sal.dom.broker.impl,
                             org.opendaylight.controller.sal.dom.broker.osgi,
+                            org.opendaylight.controller.sal.dom.broker.util,
                             org.opendaylight.controller.config.yang.md.sal.dom.impl,
                             org.opendaylight.controller.config.yang.md.sal.dom.statistics,
                             org.opendaylight.yangtools.yang.util
index 039bd5d..0120231 100644 (file)
@@ -11,6 +11,7 @@ import org.opendaylight.controller.md.sal.common.api.data.DataReader;
 import org.opendaylight.controller.md.sal.common.impl.AbstractDataModification;
 import org.opendaylight.controller.md.sal.common.impl.util.AbstractLockableDelegator;
 import org.opendaylight.controller.sal.core.api.data.DataStore;
+import org.opendaylight.controller.sal.dom.broker.util.YangSchemaUtils;
 import org.opendaylight.yangtools.yang.model.api.SchemaServiceListener;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
@@ -20,8 +21,7 @@ import org.opendaylight.yangtools.yang.data.api.Node;
 import org.opendaylight.yangtools.yang.data.impl.CompositeNodeTOImpl;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.util.YangDataOperations;
-import org.opendaylight.yangtools.yang.util.YangSchemaUtils;
+import org.opendaylight.controller.sal.dom.broker.util.YangDataOperations;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1,4 +1,4 @@
-package org.opendaylight.yangtools.yang.util
+package org.opendaylight.controller.sal.dom.broker.util
 
 import org.opendaylight.yangtools.yang.data.api.CompositeNode
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode
@@ -14,14 +14,13 @@ import java.util.List
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode
 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode
 import java.util.Collections
-import static extension org.opendaylight.yangtools.yang.util.YangDataUtils.*;
 import java.util.HashSet
 import org.opendaylight.yangtools.yang.common.QName
+import static extension org.opendaylight.controller.sal.dom.broker.util.YangDataUtils.*;
 
 class YangDataOperations {
 
     static def CompositeNode merge(DataSchemaNode schema, CompositeNode stored, CompositeNode modified, boolean config) {
-        checkConfigurational(schema, config);
         if (stored === null) {
             return modified;
         }
@@ -42,7 +41,7 @@ class YangDataOperations {
         List<Node<?>> modified, boolean configurational) {
         checkArgument(original.size === 1);
         checkArgument(modified.size === 1);
-        checkConfigurational(node, configurational);
+        
         return modified;
     }
 
@@ -61,7 +60,7 @@ class YangDataOperations {
 
     private static dispatch def Iterable<? extends Node<?>> mergeMultiple(ListSchemaNode node, List<Node<?>> original,
         List<Node<?>> modified, boolean configurational) {
-        checkConfigurational(node,configurational);
+        
         if(node.keyDefinition === null || node.keyDefinition.empty) {
             return modified;
         }