Merge "Bug 1112: Update toaster to use async best practices"
authorTony Tkacik <ttkacik@cisco.com>
Wed, 9 Jul 2014 08:46:11 +0000 (08:46 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 9 Jul 2014 08:46:11 +0000 (08:46 +0000)
85 files changed:
opendaylight/commons/opendaylight/pom.xml
opendaylight/distribution/opendaylight/src/main/resources/configuration/config.ini
opendaylight/md-sal/model/model-flow-base/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/flow/types/port/rev130925/PortNumberBuilder.java [new file with mode: 0644]
opendaylight/md-sal/model/model-flow-service/src/main/yang/node-errors.yang
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractForwardedDataBroker.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractWriteTransaction.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingToNormalizedNodeCodec.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/connect/dom/BindingIndependentConnector.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/WriteTransactionTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/RuntimeCodeGeneratorTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/compat/MultipleAugmentationPutsTest.java [moved from opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/MultipleAugmentationPutsTest.java with 99% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/compat/UnionSerializationTest.java [moved from opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/UnionSerializationTest.java with 97% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/compat/package-info.java [moved from opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/RpcRegistrationNullPointer.java with 72% similarity]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingTestContext.java
opendaylight/md-sal/sal-binding-dom-it/pom.xml
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/md/sal/binding/data/ConcurrentImplicitCreateTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/md/sal/binding/data/ListProcessingAndOrderingTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/md/sal/binding/data/WildcardedDataChangeListenerTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DOMCodecBug01Test.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DOMCodecBug02Test.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DOMCodecBug03Test.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DeleteNestedAugmentationListenParentTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/FlagsSerializationTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/PutAugmentationTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentListenAugmentTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentReadChildTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/package-info.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/BrokerIntegrationTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/ChangeOriginatedInDomBrokerTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/CrossBrokerMountPointTest.java
opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/connect/dom/DOMRpcServiceTestBugfix560.java
opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncDataChangeEvent.java
opendaylight/md-sal/sal-inmemory-datastore/pom.xml
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/DOMImmutableDataChangeEvent.java
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/ResolveDataChangeEventsTask.java
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/AbstractDataChangeListenerTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java [new file with mode: 0644]
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DefaultDataChangeListenerTestSuite.java [new file with mode: 0644]
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/RootScopeSubtreeTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeBaseTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeOneTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeSubtreeTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/schema/mapping/NetconfMessageTransformer.java
opendaylight/md-sal/sal-netconf-connector/src/test/java/org/opendaylight/controller/sal/connect/netconf/NetconfToNotificationTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-netconf-connector/src/test/resources/notification-payload.xml [new file with mode: 0644]
opendaylight/md-sal/sal-netconf-connector/src/test/resources/schemas/user-notification.yang [new file with mode: 0644]
opendaylight/md-sal/sal-protocolbuffer-encoding/README-FIRST
opendaylight/md-sal/sal-protocolbuffer-encoding/run.sh
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java [deleted file]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java [deleted file]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/util/EncoderDecoderUtil.java
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/common/SimpleNormalizedNodeMessage.java [moved from opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/common/SimpleNormalizedNodeMessage.java with 58% similarity]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/datachange/notification/DataChangeListenerMessages.java [moved from opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/datachange/notification/DataChangeListenerMessages.java with 50% similarity]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessages.java [new file with mode: 0644]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessages.java [moved from opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/shard/ShardManagerMessages.java with 51% similarity]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessages.java [new file with mode: 0644]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessages.java [moved from opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionMessages.java with 51% similarity]
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/DataChangeListener.proto
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ListenerRegistration.proto
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardManager.proto
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardTransaction.proto
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardTransactionChain.proto
opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/SimpleNormalizedNode.proto
opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/NormalizedNodeXmlConverterTest.java
opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/protobuff/messages/ShardManagerMessagesTest.java [moved from opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ShardManagerMessagesTest.java with 88% similarity]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/gson/JsonParser.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeReader.java [moved from opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonReader.java with 86% similarity]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeProvider.java
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeReader.java [moved from opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlReader.java with 88% similarity]
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/MultipleEqualNamesForDataNodesTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/equal-data-node-names/equal-name-data-for-container.json [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/equal-data-node-names/equal-name-data-for-container.xml [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/equal-data-node-names/equal-name-data-for-leaf.json [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/equal-data-node-names/equal-name-data-for-leaf.xml [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/equal-data-node-names/yang/equal-data-node-names.yang [new file with mode: 0644]
opendaylight/md-sal/sal-rest-connector/src/test/resources/json-to-cnsn/empty-data1.json
opendaylight/md-sal/sal-rest-connector/src/test/resources/multiple-nodes/multiple-nodes.yang [new file with mode: 0644]
opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-mdsal-list-test.yang [new file with mode: 0644]
opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-sal-test-store.yang [moved from opendaylight/md-sal/sal-binding-dom-it/src/main/yang/opendaylight-sal-test-store.yang with 100% similarity]
opendaylight/netconf/netconf-cli/.gitignore [new file with mode: 0644]

index 3aeb2cc..61d7f87 100644 (file)
     <!-- Sonar properties using jacoco to retrieve integration test results -->
     <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
     <sonar.language>java</sonar.language>
-    <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2</sonar.skippedModules>
+    <sonar.skippedModules>org.openflow.openflowj,net.sf.jung2,org.opendaylight.controller.protobuff.messages</sonar.skippedModules>
+    <spifly.version>1.0.0</spifly.version>
+    <spring-osgi.version>1.2.1</spring-osgi.version>
+    <spring-security-karaf.version>3.1.4.RELEASE</spring-security-karaf.version>
+    <spring-security.version>3.1.3.RELEASE</spring-security.version>
+    <spring.version>3.1.3.RELEASE</spring.version>
     <statistics.northbound.version>0.4.2-SNAPSHOT</statistics.northbound.version>
     <statisticsmanager.implementation.version>0.4.2-SNAPSHOT</statisticsmanager.implementation.version>
     <statisticsmanager.version>0.5.1-SNAPSHOT</statisticsmanager.version>
index f05afbb..f4bf483 100644 (file)
@@ -113,8 +113,8 @@ org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
 ovsdb.listenPort=6640
 
 # ovsdb creates Openflow nodes/bridges. This configuration configures the bridge's Openflow version.
-# default Openflow version = 1.0, we also support 1.3.
-ovsdb.of.version=1.3
+# default Openflow version = 1.3, we also support 1.0.
+ovsdb.of.version=1.3
 
 # TLS configuration
 # To enable TLS, set secureChannelEnabled=true and specify the location of controller Java KeyStore and TrustStore files.
diff --git a/opendaylight/md-sal/model/model-flow-base/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/flow/types/port/rev130925/PortNumberBuilder.java b/opendaylight/md-sal/model/model-flow-base/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/flow/types/port/rev130925/PortNumberBuilder.java
new file mode 100644 (file)
index 0000000..ff78a74
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.CommonPort.PortNumber;
+
+
+public class PortNumberBuilder {
+
+    public static PortNumber getDefaultInstance(java.lang.String defaultValue) {
+        try {
+            long uint32 = Long.parseLong(defaultValue);
+            return new PortNumber(uint32);
+        } catch(NumberFormatException e){
+            return new PortNumber(defaultValue);
+        }
+    }
+
+}
index a8eec26..69db856 100644 (file)
@@ -73,7 +73,6 @@ module node-error {
             uses tr:transaction-metadata;
             uses flow:base-node-error-notification;
             uses flow:node-error-reference;
-            uses flow:node-error-reference;
         }
 
     notification group-mod-error-notification {
index 35b186d..8e28639 100644 (file)
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
index b109f89..58d78a8 100644 (file)
@@ -187,7 +187,7 @@ public abstract class AbstractForwardedDataBroker implements Delegator<DOMDataBr
 
         private Map<InstanceIdentifier<?>, DataObject> createdCache;
         private Map<InstanceIdentifier<?>, DataObject> updatedCache;
-        private Map<InstanceIdentifier<?>, ? extends DataObject> originalCache;
+        private Map<InstanceIdentifier<?>, DataObject> originalCache;
         private Set<InstanceIdentifier<?>> removedCache;
         private Optional<DataObject> originalDataCache;
         private Optional<DataObject> updatedDataCache;
@@ -225,7 +225,7 @@ public abstract class AbstractForwardedDataBroker implements Delegator<DOMDataBr
         }
 
         @Override
-        public Map<InstanceIdentifier<?>, ? extends DataObject> getOriginalData() {
+        public Map<InstanceIdentifier<?>, DataObject> getOriginalData() {
             if (originalCache == null) {
                 originalCache = Collections.unmodifiableMap(toBinding(domEvent.getOriginalData()));
             }
index 5ce6687..9eceeb1 100644 (file)
@@ -7,18 +7,23 @@
  */
 package org.opendaylight.controller.md.sal.binding.impl;
 
+import java.util.Collections;
 import java.util.Map.Entry;
 
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Optional;
+import com.google.common.collect.Iterables;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
@@ -38,15 +43,76 @@ public class AbstractWriteTransaction<T extends DOMDataWriteTransaction> extends
 
     protected final void doPut(final LogicalDatastoreType store,
             final InstanceIdentifier<?> path, final DataObject data) {
-        final Entry<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, NormalizedNode<?, ?>> normalized = getCodec()
+       final Entry<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, NormalizedNode<?, ?>> normalized = getCodec()
                 .toNormalizedNode(path, data);
+        ensureListParentIfNeeded(store,path,normalized);
         getDelegate().put(store, normalized.getKey(), normalized.getValue());
     }
 
+
+    /**
+     *
+     * Ensures list parent if item is list, otherwise noop.
+     *
+     * <p>
+     * One of properties of binding specification is that it is imposible
+     * to represent list as a whole and thus it is impossible to write
+     * empty variation of MapNode without creating parent node, with
+     * empty list.
+     *
+     * <p>
+     * This actually makes writes such as
+     * <pre>
+     * put("Nodes", new NodesBuilder().build());
+     * put("Nodes/Node[key]", new NodeBuilder().setKey("key").build());
+     * </pre>
+     * To result in three DOM operations:
+     * <pre>
+     * put("/nodes",domNodes);
+     * merge("/nodes/node",domNodeList);
+     * put("/nodes/node/node[key]",domNode);
+     * </pre>
+     *
+     *
+     * In order to allow that to be inserted if necessary, if we know
+     * item is list item, we will try to merge empty MapNode or OrderedNodeMap
+     * to ensure list exists.
+     *
+     * @param store Data Store type
+     * @param path Path to data (Binding Aware)
+     * @param normalized Normalized version of data to be written
+     */
+    private void ensureListParentIfNeeded(final LogicalDatastoreType store, final InstanceIdentifier<?> path,
+            final Entry<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, NormalizedNode<?, ?>> normalized) {
+        if(Identifiable.class.isAssignableFrom(path.getTargetType())) {
+            org.opendaylight.yangtools.yang.data.api.InstanceIdentifier parentMapPath = getParent(normalized.getKey()).get();
+            NormalizedNode<?, ?> emptyParent = getCodec().getDefaultNodeFor(parentMapPath);
+            getDelegate().merge(store, parentMapPath, emptyParent);
+        }
+
+    }
+
+    // FIXME (should be probaly part of InstanceIdentifier)
+    protected static Optional<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier> getParent(
+            final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier child) {
+
+        Iterable<PathArgument> mapEntryItemPath = child.getPathArguments();
+        int parentPathSize = Iterables.size(mapEntryItemPath) - 1;
+        if(parentPathSize > 1) {
+            return Optional.of(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.create(Iterables.limit(mapEntryItemPath,  parentPathSize)));
+        } else if(parentPathSize == 0) {
+            return Optional.of(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.create(Collections.<PathArgument>emptyList()));
+        } else {
+            return Optional.absent();
+        }
+    }
+
     protected final void doMerge(final LogicalDatastoreType store,
             final InstanceIdentifier<?> path, final DataObject data) {
+
         final Entry<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, NormalizedNode<?, ?>> normalized = getCodec()
                 .toNormalizedNode(path, data);
+        ensureListParentIfNeeded(store,path,normalized);
         getDelegate().merge(store, normalized.getKey(), normalized.getValue());
     }
 
index 6b51995..8723fdf 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.md.sal.binding.impl;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
 import java.util.AbstractMap.SimpleEntry;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map.Entry;
@@ -470,4 +471,24 @@ public class BindingToNormalizedNodeCodec implements SchemaContextListener {
             return Optional.absent();
         }
     }
+
+    /**
+     * Returns an default object according to YANG schema for supplied path.
+     *
+     * @param path DOM Path
+     * @return Node with defaults set on.
+     */
+    public NormalizedNode<?, ?> getDefaultNodeFor(final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier path) {
+        Iterator<PathArgument> iterator = path.getPathArguments().iterator();
+        DataNormalizationOperation<?> currentOp = legacyToNormalized.getRootOperation();
+        while (iterator.hasNext()) {
+            PathArgument currentArg = iterator.next();
+            try {
+                currentOp = currentOp.getChild(currentArg);
+            } catch (DataNormalizationException e) {
+                throw new IllegalArgumentException(String.format("Invalid child encountered in path %s", path), e);
+            }
+        }
+        return currentOp.createDefault(path.getLastPathArgument());
+    }
 }
index 00c9f1e..834eb4f 100644 (file)
@@ -82,6 +82,12 @@ class RuntimeCodeGenerator extends AbstractRuntimeCodeGenerator {
                         val rpcMeta = metadata.getRpcMethod(name);
                         val bodyTmp = '''
                         {
+                            if($1 == null) {
+                                throw new IllegalArgumentException("RPC input must not be null and must contain a value for field «rpcMeta.inputRouteGetter.name»");
+                            }
+                            if($1.«rpcMeta.inputRouteGetter.name»() == null) {
+                                throw new IllegalArgumentException("Field «rpcMeta.inputRouteGetter.name» must not be null");
+                            }
                             final «InstanceIdentifier.name» identifier = $1.«rpcMeta.inputRouteGetter.name»()«IF rpcMeta.
                             routeEncapsulated».getValue()«ENDIF»;
                             «supertype.name» instance = («supertype.name») «rpcMeta.context.routingTableField».get(identifier);
index fe8c4a1..6e4b2d8 100644 (file)
@@ -602,7 +602,7 @@ public class BindingIndependentConnector implements //
             final Optional<Class<? extends RpcService>> rpcInterface = mappingService.getRpcServiceClassFor(
                     name.getNamespace().toString(), name.getFormattedRevision());
             if (rpcInterface.isPresent()) {
-                getRpcForwarder(rpcInterface.get(), null).registerToBidningBroker();
+                getRpcForwarder(rpcInterface.get(), null).registerToBindingBroker();
             }
         }
 
@@ -621,6 +621,7 @@ public class BindingIndependentConnector implements //
         private final WeakHashMap<Method, RpcInvocationStrategy> strategiesByMethod = new WeakHashMap<>();
         private final RpcService proxy;
         private ObjectRegistration<?> forwarderRegistration;
+        private boolean registrationInProgress = false;
 
         public DomToBindingRpcForwarder(final Class<? extends RpcService> service) {
             this.rpcServiceType = new WeakReference<Class<? extends RpcService>>(service);
@@ -680,7 +681,8 @@ public class BindingIndependentConnector implements //
          *
          */
         public void registerToDOMBroker() {
-            if(forwarderRegistration == null) {
+            if(!registrationInProgress && forwarderRegistration == null) {
+                registrationInProgress = true;
                 CompositeObjectRegistrationBuilder<DomToBindingRpcForwarder> builder = CompositeObjectRegistration.builderFor(this);
                 try {
                     for (QName rpc : supportedRpcs) {
@@ -690,6 +692,7 @@ public class BindingIndependentConnector implements //
                     LOG.error("Could not forward Rpcs of type {}", rpcServiceType.get(), e);
                 }
                 this.forwarderRegistration = builder.toInstance();
+                registrationInProgress = false;
             }
         }
 
@@ -801,12 +804,15 @@ public class BindingIndependentConnector implements //
          * creating forwarding loop.
          *
          */
-        public void registerToBidningBroker() {
-            if(forwarderRegistration == null) {
+        public void registerToBindingBroker() {
+            if(!registrationInProgress && forwarderRegistration == null) {
                try {
+                   registrationInProgress = true;
                    this.forwarderRegistration = baRpcRegistry.addRpcImplementation((Class)rpcServiceType.get(), proxy);
                } catch (Exception e) {
                    LOG.error("Unable to forward RPCs for {}",rpcServiceType.get(),e);
+               } finally {
+                   registrationInProgress = false;
                }
             }
         }
diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/WriteTransactionTest.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/WriteTransactionTest.java
new file mode 100644 (file)
index 0000000..ad6e1a7
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.binding.impl.test;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.concurrent.ExecutionException;
+
+import org.junit.Test;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.sal.binding.test.AbstractDataServiceTest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+
+public class WriteTransactionTest extends AbstractDataServiceTest {
+
+    private DataBroker dataBroker;
+
+    private static final InstanceIdentifier<Nodes> NODES_PATH = InstanceIdentifier.create(Nodes.class);
+
+    private static final NodeKey NODE_KEY = new NodeKey(new NodeId("foo"));
+
+    private static final InstanceIdentifier<Node> NODE_PATH = NODES_PATH.child(Node.class, NODE_KEY);
+
+    @Override
+    public void setUp() {
+        super.setUp();
+
+        dataBroker = testContext.getDataBroker();
+    }
+
+    @Test
+    public void test() throws InterruptedException, ExecutionException {
+        WriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
+        writeTx.put(LogicalDatastoreType.OPERATIONAL, NODES_PATH, new NodesBuilder().build());
+        writeTx.put(LogicalDatastoreType.OPERATIONAL, NODE_PATH, new NodeBuilder().setKey(NODE_KEY).build());
+        assertEquals(TransactionStatus.COMMITED, writeTx.commit().get().getResult());
+    }
+
+}
index e6cd1aa..9ba6533 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.sal.binding.test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 
@@ -154,6 +155,31 @@ public class RuntimeCodeGeneratorTest {
 
         // We should have call to instance 1
         verify(service[1]).simple(instance_1_input[0]);
+
+        /*
+         * Generated RPC service should throw illegalArgumentException
+         * with message if rpc input is null.
+         */
+        try {
+            product.getInvocationProxy().simple(null);
+            fail("Generated RPC router should throw IllegalArgumentException on null input");
+        } catch (IllegalArgumentException e){
+            assertNotNull(e.getMessage());
+        }
+
+
+        /*
+         * Generated RPC service should throw illegalArgumentException
+         * with message if rpc route is null.
+         */
+        try {
+            SimpleInput withoutValue = new SimpleInputImpl(null);
+            product.getInvocationProxy().simple(withoutValue);
+            fail("Generated RPC router should throw IllegalArgumentException on null value for route");
+        } catch (IllegalArgumentException e){
+            assertNotNull(e.getMessage());
+        }
+
     }
 
     private InstanceIdentifier<?>[][] identifiers(final int serviceSize, final int instancesPerService) {
@@ -5,11 +5,9 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.controller.sal.binding.test.bugfix;
-
-public class RpcRegistrationNullPointer {
-
-
-
-
-}
+/**
+ *
+ * Test suite targeting legacy Data APIs
+ *
+ */
+package org.opendaylight.controller.sal.binding.test.compat;
\ No newline at end of file
index 1ea5638..8ba709a 100644 (file)
@@ -17,7 +17,9 @@ import java.util.concurrent.Future;
 
 import javassist.ClassPool;
 
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.impl.ForwardedBackwardsCompatibleDataBroker;
+import org.opendaylight.controller.md.sal.binding.impl.ForwardedBindingDataBroker;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.controller.md.sal.dom.broker.impl.DOMDataBrokerImpl;
@@ -112,6 +114,8 @@ public class BindingTestContext implements AutoCloseable {
 
     private final MockSchemaService mockSchemaService = new MockSchemaService();
 
+    private DataBroker dataBroker;
+
 
 
     public DOMDataBroker getDomAsyncDataBroker() {
@@ -150,6 +154,12 @@ public class BindingTestContext implements AutoCloseable {
         biDataLegacyBroker = biDataImpl;
     }
 
+    public void startNewDataBroker() {
+        checkState(executor != null, "Executor needs to be set");
+        checkState(newDOMDataBroker != null, "DOM Data Broker must be set");
+        dataBroker = new ForwardedBindingDataBroker(newDOMDataBroker, mappingServiceImpl, mockSchemaService);
+    }
+
     public void startNewDomDataBroker() {
         checkState(executor != null, "Executor needs to be set");
         InMemoryDOMDataStore operStore = new InMemoryDOMDataStore("OPER", executor);
@@ -312,11 +322,12 @@ public class BindingTestContext implements AutoCloseable {
 
     public void start() {
         startNewDomDataBroker();
+
         startDomBroker();
         startDomMountPoint();
         startBindingToDomMappingService();
+        startNewDataBroker();
         startNewBindingDataBroker();
-
         startBindingNotificationBroker();
         startBindingBroker();
 
@@ -418,5 +429,9 @@ public class BindingTestContext implements AutoCloseable {
         return biMountImpl;
     }
 
+    public DataBroker getDataBroker() {
+        return dataBroker;
+    }
+
 
 }
index 46971ca..42d5cff 100644 (file)
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.opendaylight.yangtools</groupId>
-        <artifactId>yang-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>generate-sources</goal>
-            </goals>
-            <configuration>
-              <codeGenerators>
-                <generator>
-                  <codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
-                  <outputBaseDir>${salGeneratorPath}</outputBaseDir>
-                </generator>
-              </codeGenerators>
-              <inspectDependencies>true</inspectDependencies>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
   <scm>
index c5dbdce..aefc53b 100644 (file)
@@ -25,6 +25,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
+/*
+ * FIXME: THis test should be moved to sal-binding-broker and rewriten
+ * to use new DataBroker API
+ */
+@SuppressWarnings("deprecation")
 public class ConcurrentImplicitCreateTest extends AbstractDataServiceTest {
 
     private static final NodeKey NODE_FOO_KEY = new NodeKey(new NodeId("foo"));
index 667887a..cd68559 100644 (file)
@@ -50,12 +50,10 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ * FIXME: THis test should be moved to sal-binding-broker and rewriten
+ * to use new DataBroker API
  */
+@SuppressWarnings("deprecation")
 public class ListProcessingAndOrderingTest extends AbstractDataServiceTest {
 
     private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier DOM_UNORDERED_LIST_PATH = org.opendaylight.yangtools.yang.data.api.InstanceIdentifier
@@ -171,7 +169,6 @@ public class ListProcessingAndOrderingTest extends AbstractDataServiceTest {
         assertEquals(TransactionStatus.COMMITED,result.getResult());
     }
 
-    @SuppressWarnings("deprecation")
     private void assertXmlRepresentation(final InstanceIdentifier<?> containerPath, final String... childNameValues) {
 
         org.opendaylight.yangtools.yang.data.api.InstanceIdentifier domPath = testContext.getBindingToDomMappingService().toDataDom(containerPath);
index 6b4cc57..2b51713 100644 (file)
@@ -43,12 +43,10 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import com.google.common.util.concurrent.SettableFuture;
 
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
+ * FIXME: THis test should be moved to compat test-suite and rewriten
+ * to use sal-test-model
  */
+@SuppressWarnings("deprecation")
 public class WildcardedDataChangeListenerTest extends AbstractDataServiceTest {
 
     private static final NodeKey NODE_0_KEY = new NodeKey(new NodeId("test:0"));
index 4719352..0c767f6 100644 (file)
@@ -14,7 +14,6 @@ import static org.junit.Assert.assertNull;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -49,49 +48,29 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanIdBuilder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
 
-import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
 
+@SuppressWarnings("deprecation")
 public class DOMCodecBug01Test extends AbstractDataServiceTest {
 
-    private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
-    private static final QName FLOW_ID_QNAME = QName.create(Flow.QNAME, "id");
-    private static final QName FLOW_NODE_QNAME = QName.create(Flow.QNAME, "node");
     private static final long FLOW_ID = 1234;
     private static final String NODE_ID = "node:1";
 
     private static final NodeKey NODE_KEY = new NodeKey(new NodeId(NODE_ID));
 
-    private static final Map<QName, Object> NODE_KEY_BI = Collections.<QName, Object> singletonMap(NODE_ID_QNAME,
-            NODE_ID);
-
     private static final InstanceIdentifier<Node> NODE_INSTANCE_ID_BA = InstanceIdentifier.builder(Nodes.class) //
             .child(Node.class, NODE_KEY).toInstance();
 
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier NODE_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Nodes.QNAME) //
-            .nodeWithKey(Node.QNAME, NODE_KEY_BI) //
-            .toInstance();
     private static final NodeRef NODE_REF = new NodeRef(NODE_INSTANCE_ID_BA);
 
     private static final FlowKey FLOW_KEY = new FlowKey(FLOW_ID, NODE_REF);
 
-    private static final Map<QName, Object> FLOW_KEY_BI = //
-    ImmutableMap.<QName, Object> of(FLOW_ID_QNAME, FLOW_ID, FLOW_NODE_QNAME, NODE_INSTANCE_ID_BI);
-
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier FLOW_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Flows.QNAME) //
-            .nodeWithKey(Flow.QNAME, FLOW_KEY_BI) //
-            .toInstance();
     private static final InstanceIdentifier<? extends DataObject> FLOW_INSTANCE_ID_BA = //
     InstanceIdentifier.builder(Flows.class) //
             .child(Flow.class, FLOW_KEY) //
index bc6f567..75d4861 100644 (file)
@@ -11,7 +11,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 import java.util.Collections;
-import java.util.Map;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -22,47 +21,21 @@ import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
 import org.opendaylight.controller.sal.binding.test.AbstractDataServiceTest;
 import org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodesBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
 
+@SuppressWarnings("deprecation")
 public class DOMCodecBug02Test extends AbstractDataServiceTest {
 
-    private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
-    private static final String NODE_ID = "node:1";
-
-    private static final NodeKey NODE_KEY = new NodeKey(new NodeId(NODE_ID));
-
-    private static final Map<QName, Object> NODE_KEY_BI = Collections.<QName, Object> singletonMap(NODE_ID_QNAME,
-            NODE_ID);
-
     private static final InstanceIdentifier<Nodes> NODES_INSTANCE_ID_BA = InstanceIdentifier.builder(Nodes.class) //
             .toInstance();
 
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier NODES_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Nodes.QNAME) //
-            .toInstance();
-
-    private static final InstanceIdentifier<Node> NODE_INSTANCE_ID_BA = InstanceIdentifier.builder(Nodes.class) //
-            .child(Node.class, NODE_KEY).toInstance();
-
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier NODE_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Nodes.QNAME) //
-            .nodeWithKey(Node.QNAME, NODE_KEY_BI) //
-            .toInstance();
-    private static final NodeRef NODE_REF = new NodeRef(NODE_INSTANCE_ID_BA);
-
     /**
      * This test is ignored, till found out better way to test generation of
      * classes without leaking of instances from previous run
index ccbd52f..dd8eaa7 100644 (file)
@@ -46,6 +46,7 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
 
 import com.google.common.util.concurrent.SettableFuture;
 
+@SuppressWarnings("deprecation")
 public class DOMCodecBug03Test extends AbstractDataServiceTest implements DataChangeListener {
 
     private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
index c1eba3e..fb5fd1f 100644 (file)
@@ -24,12 +24,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 import com.google.common.util.concurrent.SettableFuture;
 
+@SuppressWarnings("deprecation")
 public class DeleteNestedAugmentationListenParentTest extends AbstractDataServiceTest {
 
     private static final NodeKey NODE_KEY = new NodeKey(new NodeId("foo"));
@@ -38,11 +38,6 @@ public class DeleteNestedAugmentationListenParentTest extends AbstractDataServic
 
     private static final FlowKey FLOW_KEY = new FlowKey(new FlowId("100"));
 
-    private static final InstanceIdentifier<FlowCapableNode> LISTENER_PATH = InstanceIdentifier.builder(Nodes.class) //
-            .child(Node.class)
-            .augmentation(FlowCapableNode.class).build();
-
-
     private static final InstanceIdentifier<FlowCapableNode> NODE_AUGMENT_PATH = InstanceIdentifier.builder(Nodes.class)
             .child(Node.class,NODE_KEY)
             .augmentation(FlowCapableNode.class)
@@ -63,7 +58,7 @@ public class DeleteNestedAugmentationListenParentTest extends AbstractDataServic
 
         final SettableFuture<DataChangeEvent<InstanceIdentifier<?>, DataObject>> event = SettableFuture.create();
 
-        ListenerRegistration<DataChangeListener> listenerReg = baDataService.registerDataChangeListener(FLOW_PATH, new DataChangeListener() {
+        baDataService.registerDataChangeListener(FLOW_PATH, new DataChangeListener() {
 
             @Override
             public void onDataChanged(final DataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
index 30c7af7..7143352 100644 (file)
@@ -14,7 +14,6 @@ import static org.junit.Assert.assertNull;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
@@ -39,7 +38,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instru
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
@@ -54,11 +52,9 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
 
 import com.google.common.collect.ImmutableSet;
 
+@SuppressWarnings("deprecation")
 public class FlagsSerializationTest extends AbstractDataServiceTest {
 
-    private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
-    private static final QName FLOW_ID_QNAME = QName.create(Flow.QNAME, "id");
-    private static final QName FLOW_NODE_QNAME = QName.create(Flow.QNAME, "node");
     private static final String FLOW_ID = "1234";
     private static final short TABLE_ID = (short)0;
     private static final String NODE_ID = "node:1";
@@ -67,27 +63,9 @@ public class FlagsSerializationTest extends AbstractDataServiceTest {
     private static final FlowKey FLOW_KEY = new FlowKey(new FlowId(FLOW_ID));
     private static final TableKey TABLE_KEY = new TableKey(TABLE_ID);
 
-    private static final Map<QName, Object> NODE_KEY_BI = Collections.<QName, Object> singletonMap(NODE_ID_QNAME,
-            NODE_ID);
-
     private static final InstanceIdentifier<Node> NODE_INSTANCE_ID_BA = InstanceIdentifier.builder(Nodes.class) //
             .child(Node.class, NODE_KEY).toInstance();
 
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier NODE_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Nodes.QNAME) //
-            .nodeWithKey(Node.QNAME, NODE_KEY_BI) //
-            .toInstance();
-    private static final NodeRef NODE_REF = new NodeRef(NODE_INSTANCE_ID_BA);
-
-
-
-//    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier FLOW_INSTANCE_ID_BI = //
-//    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-//
-//            .node(Flows.QNAME) //
-//            .nodeWithKey(Flow.QNAME, FLOW_KEY_BI) //
-//            .toInstance();
     private static final InstanceIdentifier<? extends DataObject> FLOW_INSTANCE_ID_BA = //
             NODE_INSTANCE_ID_BA.builder() //
             .augmentation(FlowCapableNode.class)
@@ -113,15 +91,13 @@ public class FlagsSerializationTest extends AbstractDataServiceTest {
         ImmutableSet<String> domAllTrueFlags = ImmutableSet.<String>of("CHECK_OVERLAP","NO_BYT_COUNTS", "NO_PKT_COUNTS", "RESET_COUNTS", "SEND_FLOW_REM");
         testFlags(allTrueFlags,domAllTrueFlags);
 
-        FlowModFlags nullFlags = null;
-        ImmutableSet<String> domNullFlags = null;
         testFlags(null,null);
 
 
 
     }
 
-    private void testFlags(FlowModFlags flagsToTest, ImmutableSet<String> domFlags) throws Exception {
+    private void testFlags(final FlowModFlags flagsToTest, final ImmutableSet<String> domFlags) throws Exception {
         Flow flow = createFlow(flagsToTest);
         assertNotNull(flow);
 
@@ -145,7 +121,7 @@ public class FlagsSerializationTest extends AbstractDataServiceTest {
 
     }
 
-    private Flow createFlow(FlowModFlags flagsToTest) throws Exception {
+    private Flow createFlow(final FlowModFlags flagsToTest) throws Exception {
 
         DataModificationTransaction modification = baDataService.beginTransaction();
 
index 7f16320..33a4399 100644 (file)
@@ -27,7 +27,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.Fl
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnectorBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.flow.node.SupportedActions;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
@@ -45,6 +44,7 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
 
 import com.google.common.util.concurrent.SettableFuture;
 
+@SuppressWarnings("deprecation")
 public class PutAugmentationTest extends AbstractDataServiceTest implements DataChangeListener {
 
     private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
@@ -62,12 +62,6 @@ public class PutAugmentationTest extends AbstractDataServiceTest implements Data
             NODES_INSTANCE_ID_BA.builder() //
             .child(Node.class, NODE_KEY).toInstance();
 
-    private static final InstanceIdentifier<SupportedActions> SUPPORTED_ACTIONS_INSTANCE_ID_BA = //
-            NODES_INSTANCE_ID_BA.builder() //
-            .child(Node.class, NODE_KEY) //
-            .augmentation(FlowCapableNode.class) //
-            .child(SupportedActions.class).toInstance();
-
     private static final InstanceIdentifier<FlowCapableNode> ALL_FLOW_CAPABLE_NODES = //
             NODES_INSTANCE_ID_BA.builder() //
             .child(Node.class) //
@@ -79,15 +73,6 @@ public class PutAugmentationTest extends AbstractDataServiceTest implements Data
             .node(Nodes.QNAME) //
             .nodeWithKey(Node.QNAME, NODE_KEY_BI) //
             .toInstance();
-    private static final QName SUPPORTED_ACTIONS_QNAME = QName.create(FlowCapableNode.QNAME,
-            SupportedActions.QNAME.getLocalName());
-
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier SUPPORTED_ACTIONS_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Nodes.QNAME) //
-            .nodeWithKey(Node.QNAME, NODE_KEY_BI) //
-            .node(SUPPORTED_ACTIONS_QNAME) //
-            .toInstance();
     private static final InstanceIdentifier<FlowCapableNode> FLOW_AUGMENTATION_PATH =
             NODE_INSTANCE_ID_BA.builder() //
             .augmentation(FlowCapableNode.class) //
@@ -231,31 +216,11 @@ public class PutAugmentationTest extends AbstractDataServiceTest implements Data
         assertNull(node);
     }
 
-    private void verifyNodes(final Nodes nodes, final Node original) {
-        assertNotNull(nodes);
-        assertNotNull(nodes.getNode());
-        assertEquals(1, nodes.getNode().size());
-        Node readedNode = nodes.getNode().get(0);
-        assertEquals(original.getId(), readedNode.getId());
-        assertEquals(original.getKey(), readedNode.getKey());
-
-        FlowCapableNode fnu = original.getAugmentation(FlowCapableNode.class);
-        FlowCapableNode readedAugment = readedNode.getAugmentation(FlowCapableNode.class);
-        assertNotNull(fnu);
-        assertEquals(fnu.getDescription(), readedAugment.getDescription());
-        assertEquals(fnu.getSerialNumber(), readedAugment.getSerialNumber());
-
-    }
-
     private void assertBindingIndependentVersion(final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier nodeId) {
         CompositeNode node = biDataService.readOperationalData(nodeId);
         assertNotNull(node);
     }
 
-    private Nodes checkForNodes() {
-        return (Nodes) baDataService.readOperationalData(NODES_INSTANCE_ID_BA);
-    }
-
     @Override
     public void onDataChanged(final DataChangeEvent<InstanceIdentifier<?>, DataObject> change) {
         lastReceivedChangeEvent.set(change);
diff --git a/opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/package-info.java b/opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/package-info.java
new file mode 100644 (file)
index 0000000..84559d5
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+/**
+ * This testsuite test Hydrogen-level API and regression for most of it,
+ *
+ * FIXME: this testsuite needs to be refactored to use new DataBroker API,
+ * moved to sal-binding-broker-impl and uses models only from sal-test-model.
+ *
+ */
+package org.opendaylight.controller.sal.binding.test.bugfix;
\ No newline at end of file
index 6d02268..481a7dd 100644 (file)
@@ -11,16 +11,12 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-
 import java.util.concurrent.Future;
 
-
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
-
 import org.opendaylight.controller.sal.binding.test.AbstractDataServiceTest;
-
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
@@ -31,6 +27,8 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
+// FIXME: Migrate to use new Data Broker APIs
+@SuppressWarnings("deprecation")
 public class BrokerIntegrationTest extends AbstractDataServiceTest {
 
     @Test
@@ -105,14 +103,14 @@ public class BrokerIntegrationTest extends AbstractDataServiceTest {
         assertNull(readedData2);
     }
 
-    private static NodeRef createNodeRef(String string) {
+    private static NodeRef createNodeRef(final String string) {
         NodeKey key = new NodeKey(new NodeId(string));
         InstanceIdentifier<Node> path = InstanceIdentifier.builder(Nodes.class).child(Node.class, key)
                 .toInstance();
         return new NodeRef(path);
     }
 
-    private static Node createNode(String string) {
+    private static Node createNode(final String string) {
         NodeBuilder ret = new NodeBuilder();
         ret.setId(new NodeId(string));
         ret.setKey(new NodeKey(ret.getId()));
index 422b9cc..ae54896 100644 (file)
@@ -45,7 +45,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instru
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
@@ -63,13 +62,14 @@ import org.slf4j.LoggerFactory;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.SettableFuture;
 
+// FIXME: Migrate to use new Data Broker APIs
+@SuppressWarnings("deprecation")
 public class ChangeOriginatedInDomBrokerTest extends AbstractDataServiceTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(ChangeOriginatedInDomBrokerTest.class);
 
     private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
     private static final QName FLOW_ID_QNAME = QName.create(Flow.QNAME, "id");
-    private static final QName FLOW_NODE_QNAME = QName.create(Flow.QNAME, "node");
     private static final QName TABLE_ID_QNAME = QName.create(Table.QNAME, "id");
 
     private static final String NODE_ID = "node:1";
@@ -87,13 +87,6 @@ public class ChangeOriginatedInDomBrokerTest extends AbstractDataServiceTest {
     private static final InstanceIdentifier<Node> NODE_INSTANCE_ID_BA = InstanceIdentifier.builder(Nodes.class) //
             .child(Node.class, NODE_KEY).toInstance();
 
-    private static final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier NODE_INSTANCE_ID_BI = //
-    org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.builder() //
-            .node(Nodes.QNAME) //
-            .nodeWithKey(Node.QNAME, NODE_KEY_BI) //
-            .toInstance();
-    private static final NodeRef NODE_REF = new NodeRef(NODE_INSTANCE_ID_BA);
-
     private static final Map<QName, Object> FLOW_KEY_BI = //
     ImmutableMap.<QName, Object> of(FLOW_ID_QNAME, FLOW_ID.getValue());
 
index 9457051..804fcc9 100644 (file)
@@ -24,15 +24,12 @@ import org.opendaylight.controller.sal.binding.test.util.BindingTestContext;
 import org.opendaylight.controller.sal.core.api.mount.MountProvisionInstance;
 import org.opendaylight.controller.sal.core.api.mount.MountProvisionService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.NodeGroupStatistics;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.group.statistics.GroupStatistics;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
@@ -43,13 +40,10 @@ import org.opendaylight.yangtools.yang.data.impl.ImmutableCompositeNode;
 
 import com.google.common.util.concurrent.MoreExecutors;
 
+@SuppressWarnings("deprecation")
 public class CrossBrokerMountPointTest {
 
     private static final QName NODE_ID_QNAME = QName.create(Node.QNAME, "id");
-    private static final QName FLOW_ID_QNAME = QName.create(Flow.QNAME, "id");
-    private static final QName FLOW_NODE_QNAME = QName.create(Flow.QNAME, "node");
-    private static final QName TABLE_ID_QNAME = QName.create(Table.QNAME, "id");
-
     private static final String NODE_ID = "node:1";
 
     private static final NodeKey NODE_KEY = new NodeKey(new NodeId(NODE_ID));
@@ -83,8 +77,6 @@ public class CrossBrokerMountPointTest {
             .nodeWithKey(QName.create(FlowCapableNode.QNAME, "group"), QName.create(FlowCapableNode.QNAME, "group-id"),
                     0L).node(AUGMENTED_GROUP_STATISTICS).toInstance();
 
-    private static final NodeRef NODE_REF = new NodeRef(NODE_INSTANCE_ID_BA);
-
     private BindingTestContext testContext;
     private MountProviderService bindingMountPointService;
     private MountProvisionService domMountPointService;
@@ -123,13 +115,13 @@ public class CrossBrokerMountPointTest {
         DataReader<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, CompositeNode> simpleReader = new DataReader<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, CompositeNode>() {
 
             @Override
-            public CompositeNode readConfigurationData(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier arg0) {
+            public CompositeNode readConfigurationData(final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier arg0) {
                 return null;
             }
 
 
             @Override
-            public CompositeNode readOperationalData(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier arg0) {
+            public CompositeNode readOperationalData(final org.opendaylight.yangtools.yang.data.api.InstanceIdentifier arg0) {
                 if (arg0.equals(GROUP_STATISTICS_ID_BI)) {
                     ImmutableCompositeNode data = ImmutableCompositeNode
                             .builder()
index 6a6af06..c87b936 100644 (file)
@@ -97,12 +97,15 @@ public class DOMRpcServiceTestBugfix560 {
 
         assertNotNull(moduleStream);
         List<InputStream> rpcModels = Collections.singletonList(moduleStream);
+        @SuppressWarnings("deprecation")
         Set<Module> modules = parser.parseYangModelsFromStreams(rpcModels);
-        schemaContext = parser.resolveSchemaContext(modules);
+        @SuppressWarnings("deprecation")
+        SchemaContext mountSchemaContext = parser.resolveSchemaContext(modules);
+        schemaContext = mountSchemaContext;
     }
 
     private static org.opendaylight.yangtools.yang.data.api.InstanceIdentifier createBINodeIdentifier(
-            NodeId mountNode) {
+            final NodeId mountNode) {
         return org.opendaylight.yangtools.yang.data.api.InstanceIdentifier
                 .builder().node(Nodes.QNAME)
                 .nodeWithKey(Node.QNAME, NODE_ID_QNAME, mountNode.getValue())
@@ -110,13 +113,16 @@ public class DOMRpcServiceTestBugfix560 {
     }
 
     private static InstanceIdentifier<Node> createBANodeIdentifier(
-            NodeId mountNode) {
+            final NodeId mountNode) {
         return InstanceIdentifier.builder(Nodes.class)
                 .child(Node.class, new NodeKey(mountNode)).toInstance();
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void test() throws ExecutionException, InterruptedException {
+        // FIXME: This is made to only make sure instance identifier codec
+        // for path is instantiated.
         testContext.getBindingDataBroker().readOperationalData(BA_MOUNT_ID);
         final MountProvisionInstance mountPoint = domMountPointService
                 .createMountPoint(BI_MOUNT_ID);
@@ -127,7 +133,7 @@ public class DOMRpcServiceTestBugfix560 {
 
             @Override
             public ListenableFuture<RpcResult<CompositeNode>> invokeRpc(
-                    QName rpc, CompositeNode input) {
+                    final QName rpc, final CompositeNode input) {
 
                 return Futures.immediateFuture(Rpcs
                         .<CompositeNode> getRpcResult(true));
index 29c9bae..ac4a0ff 100644 (file)
@@ -101,7 +101,7 @@ public interface AsyncDataChangeEvent<P extends Path<P>, D> extends Immutable {
      *
      * @return map of paths and original state of updated and removed objects.
      */
-    Map<P, ? extends D> getOriginalData();
+    Map<P, D> getOriginalData();
 
     /**
      * Returns an immutable stable view of data state, which captures the state of
index dadef82..9068474 100644 (file)
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>binding-generator-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal-test-model</artifactId>
+      <scope>test</scope>
+      <version>${project.version}</version>
+    </dependency>
   </dependencies>
 
   <build>
index af47974..743ddd1 100644 (file)
@@ -30,7 +30,7 @@ public final class DOMImmutableDataChangeEvent implements
 
     private final NormalizedNode<?, ?> original;
     private final NormalizedNode<?, ?> updated;
-    private final Map<InstanceIdentifier, ? extends NormalizedNode<?, ?>> originalData;
+    private final Map<InstanceIdentifier, NormalizedNode<?, ?>> originalData;
     private final Map<InstanceIdentifier, NormalizedNode<?, ?>> createdData;
     private final Map<InstanceIdentifier, NormalizedNode<?, ?>> updatedData;
     private final Set<InstanceIdentifier> removedPaths;
@@ -67,7 +67,7 @@ public final class DOMImmutableDataChangeEvent implements
     }
 
     @Override
-    public Map<InstanceIdentifier, ? extends NormalizedNode<?, ?>> getOriginalData() {
+    public Map<InstanceIdentifier, NormalizedNode<?, ?>> getOriginalData() {
         return originalData;
     }
 
index 71a3534..b679de5 100644 (file)
@@ -7,12 +7,17 @@
  */
 package org.opendaylight.controller.md.sal.dom.store.impl;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Multimap;
+import static org.opendaylight.controller.md.sal.dom.store.impl.DOMImmutableDataChangeEvent.builder;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
 import org.opendaylight.controller.md.sal.dom.store.impl.DOMImmutableDataChangeEvent.Builder;
 import org.opendaylight.controller.md.sal.dom.store.impl.DOMImmutableDataChangeEvent.SimpleEventFactory;
@@ -32,16 +37,12 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-import static org.opendaylight.controller.md.sal.dom.store.impl.DOMImmutableDataChangeEvent.builder;
+import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Multimap;
 
 /**
  * Resolve Data Change Events based on modifications and listeners
@@ -438,17 +439,19 @@ final class ResolveDataChangeEventsTask implements Callable<Iterable<ChangeListe
         Builder subtree = builder(DataChangeScope.SUBTREE).
                 setBefore(modification.getDataBefore().get()).
                 setAfter(modification.getDataAfter().get());
-
+        boolean oneModified = false;
         for (DataTreeCandidateNode childMod : modification.getChildNodes()) {
             PathArgument childId = childMod.getIdentifier();
             InstanceIdentifier childPath = path.node(childId);
             Collection<ListenerTree.Node> childListeners = getListenerChildrenWildcarded(listeners, childId);
 
+
             switch (childMod.getModificationType()) {
             case WRITE:
             case MERGE:
             case DELETE:
                 one.merge(resolveAnyChangeEvent(childPath, childListeners, childMod));
+                oneModified = true;
                 break;
             case SUBTREE_MODIFIED:
                 subtree.merge(resolveSubtreeChangeEvent(childPath, childListeners, childMod));
@@ -458,11 +461,20 @@ final class ResolveDataChangeEventsTask implements Callable<Iterable<ChangeListe
                 break;
             }
         }
-        DOMImmutableDataChangeEvent oneChangeEvent = one.build();
-        subtree.merge(oneChangeEvent);
+        final DOMImmutableDataChangeEvent oneChangeEvent;
+        if(oneModified) {
+            one.addUpdated(path, modification.getDataBefore().get(), modification.getDataAfter().get());
+            oneChangeEvent = one.build();
+            subtree.merge(oneChangeEvent);
+        } else {
+            oneChangeEvent = null;
+            subtree.addUpdated(path, modification.getDataBefore().get(), modification.getDataAfter().get());
+        }
         DOMImmutableDataChangeEvent subtreeEvent = subtree.build();
         if (!listeners.isEmpty()) {
-            addPartialTask(listeners, oneChangeEvent);
+            if(oneChangeEvent != null) {
+                addPartialTask(listeners, oneChangeEvent);
+            }
             addPartialTask(listeners, subtreeEvent);
         }
         return subtreeEvent;
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/AbstractDataChangeListenerTest.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/AbstractDataChangeListenerTest.java
new file mode 100644 (file)
index 0000000..4d2d078
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.opendaylight.controller.md.sal.dom.store.impl.DatastoreTestTask.WriteTransactionCustomizer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.Top;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.TwoLevelList;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.top.level.list.NestedList;
+import org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifierWithPredicates;
+import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
+import org.opendaylight.yangtools.yang.data.api.schema.OrderedMapNode;
+import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
+import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.CollectionNodeBuilder;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeAttrBuilder;
+import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+
+import com.google.common.util.concurrent.MoreExecutors;
+
+public abstract class AbstractDataChangeListenerTest {
+
+    protected static final InstanceIdentifier TOP_LEVEL = InstanceIdentifier
+            .of(Top.QNAME);
+    private static final QName NAME_QNAME = QName.create(Top.QNAME, "name");
+    protected static final String FOO = "foo";
+    protected static final String BAR = "bar";
+    protected static final String BAZ = "baz";
+
+    private InMemoryDOMDataStore datastore;
+    private SchemaContext schemaContext;
+
+    @Before
+    public final void setup() throws Exception {
+        YangModuleInfo moduleInfo = BindingReflections
+                .getModuleInfo(TwoLevelList.class);
+        ModuleInfoBackedContext context = ModuleInfoBackedContext.create();
+        context.registerModuleInfo(moduleInfo);
+        schemaContext = context.tryToCreateSchemaContext().get();
+        datastore = new InMemoryDOMDataStore("TEST",
+                MoreExecutors.sameThreadExecutor());
+        datastore.onGlobalContextUpdated(schemaContext);
+    }
+
+    public final DatastoreTestTask newTestTask() {
+        return new DatastoreTestTask(datastore).cleanup(DatastoreTestTask
+                .simpleDelete(TOP_LEVEL));
+    }
+
+
+    public static final InstanceIdentifier path(final String topName,
+            final String nestedName) {
+        return path(topName).node(NestedList.QNAME).node(
+                new NodeIdentifierWithPredicates(NestedList.QNAME, NAME_QNAME,
+                        nestedName));
+    }
+
+    public static final InstanceIdentifier path(final String topName) {
+        return TOP_LEVEL.node(TopLevelList.QNAME).node(
+                new NodeIdentifierWithPredicates(TopLevelList.QNAME,
+                        NAME_QNAME, topName));
+    }
+
+    protected static DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> top() {
+        return Builders.containerBuilder().withNodeIdentifier(
+                new NodeIdentifier(Top.QNAME));
+    }
+
+
+
+    protected static void assertEmpty(final Collection<?> set) {
+        Assert.assertTrue(set.isEmpty());
+    }
+
+    protected static void assertEmpty(final Map<?,?> set) {
+        Assert.assertTrue(set.isEmpty());
+    }
+
+    protected static <K> void assertContains(final Collection<K> set, final K... values) {
+        for (K key : values) {
+            Assert.assertTrue(set.contains(key));
+        }
+
+    }
+
+    protected static <K> void assertNotContains(final Collection<K> set, final K... values) {
+        for (K key : values) {
+            Assert.assertFalse(set.contains(key));
+        }
+    }
+
+    protected static <K> void assertContains(final Map<K,?> map, final K... values) {
+        for (K key : values) {
+            Assert.assertTrue(map.containsKey(key));
+        }
+    }
+
+    protected static <K> void assertNotContains(final Map<K,?> map, final K... values) {
+        for (K key : values) {
+            Assert.assertFalse(map.containsKey(key));
+        }
+    }
+
+    protected static CollectionNodeBuilder<MapEntryNode, MapNode> topLevelMap() {
+        return ImmutableNodes.mapNodeBuilder(TopLevelList.QNAME);
+    }
+
+    protected static CollectionNodeBuilder<MapEntryNode, OrderedMapNode> nestedMap() {
+        return Builders.orderedMapBuilder().withNodeIdentifier(new NodeIdentifier(NestedList.QNAME));
+    }
+
+    public static DataContainerNodeBuilder<NodeIdentifierWithPredicates, MapEntryNode> topLevelList(
+            final String key) {
+        return ImmutableNodes.mapEntryBuilder(TopLevelList.QNAME, NAME_QNAME,
+                key);
+    }
+
+    public static DataContainerNodeBuilder<NodeIdentifierWithPredicates, MapEntryNode> nestedList(
+            final String key) {
+        return ImmutableNodes
+                .mapEntryBuilder(NestedList.QNAME, NAME_QNAME, key);
+    }
+
+    public static final WriteTransactionCustomizer writeOneTopMultipleNested(
+            final String topName, final String... nestedName) {
+        CollectionNodeBuilder<MapEntryNode, OrderedMapNode> nestedMapBuilder = nestedMap();
+        for (String nestedItem : nestedName) {
+            nestedMapBuilder.addChild(nestedList(nestedItem).build());
+        }
+
+        final ContainerNode data = top().addChild(
+                topLevelMap().addChild(
+                        topLevelList(topName)
+                                .addChild(nestedMapBuilder.build()).build())
+                        .build()).build();
+
+        return DatastoreTestTask.simpleWrite(TOP_LEVEL, data);
+    }
+
+    public static final  WriteTransactionCustomizer deleteNested(final String topName,
+            final String nestedName) {
+        return DatastoreTestTask.simpleDelete(path(topName, nestedName));
+    }
+}
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DatastoreTestTask.java
new file mode 100644 (file)
index 0000000..8ac93b1
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener;
+import org.opendaylight.controller.sal.core.spi.data.DOMStore;
+import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
+import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
+import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+import com.google.common.base.Preconditions;
+import com.google.common.util.concurrent.SettableFuture;
+
+public class DatastoreTestTask {
+
+    private final DOMStore store;
+    private AsyncDataChangeListener<InstanceIdentifier, NormalizedNode<?, ?>> changeListener;
+
+    private WriteTransactionCustomizer setup;
+    private WriteTransactionCustomizer write;
+    private ReadTransactionVerifier read;
+    private WriteTransactionCustomizer cleanup;
+    private InstanceIdentifier changePath;
+    private DataChangeScope changeScope;
+    private boolean postSetup = false;
+    private final ChangeEventListener internalListener;
+
+    public DatastoreTestTask(final DOMStore datastore) {
+        this.store = datastore;
+        internalListener = new ChangeEventListener();
+    }
+
+    public DatastoreTestTask changeListener(final InstanceIdentifier path, final DataChangeScope scope,
+            final AsyncDataChangeListener<InstanceIdentifier, NormalizedNode<?, ?>> changeListener) {
+        this.changeListener = changeListener;
+        this.changePath = path;
+        this.changeScope = scope;
+        return this;
+    }
+
+    public DatastoreTestTask changeListener(final InstanceIdentifier path, final DataChangeScope scope) {
+        this.changePath = path;
+        this.changeScope = scope;
+        return this;
+    }
+
+    public DatastoreTestTask setup(final WriteTransactionCustomizer setup) {
+        this.setup = setup;
+        return this;
+    }
+
+    public DatastoreTestTask test(final WriteTransactionCustomizer write) {
+        this.write = write;
+        return this;
+    }
+
+    public DatastoreTestTask read(final ReadTransactionVerifier read) {
+        this.read = read;
+        return this;
+    }
+
+    public DatastoreTestTask cleanup(final WriteTransactionCustomizer cleanup) {
+        this.cleanup = cleanup;
+        return this;
+    }
+
+    public void run() throws InterruptedException, ExecutionException {
+        if (setup != null) {
+            execute(setup);
+        }
+        ListenerRegistration<ChangeEventListener> registration = null;
+        if (changePath != null) {
+            registration = store.registerChangeListener(changePath, internalListener, changeScope);
+        }
+
+        Preconditions.checkState(write != null, "Write Transaction must be set.");
+        postSetup = true;
+        execute(write);
+        if (registration != null) {
+            registration.close();
+        }
+        if (changeListener != null) {
+            changeListener.onDataChanged(internalListener.receivedChange.get());
+        }
+        if (read != null) {
+            read.verify(store.newReadOnlyTransaction());
+        }
+        if (cleanup != null) {
+            execute(cleanup);
+        }
+    }
+
+    public Future<AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>>> getChangeEvent() {
+        return internalListener.receivedChange;
+    }
+
+    private void execute(final WriteTransactionCustomizer writeCustomizer) throws InterruptedException,
+            ExecutionException {
+        DOMStoreReadWriteTransaction tx = store.newReadWriteTransaction();
+        writeCustomizer.customize(tx);
+        DOMStoreThreePhaseCommitCohort cohort = tx.ready();
+        assertTrue(cohort.canCommit().get());
+        cohort.preCommit().get();
+        cohort.commit().get();
+    }
+
+    public interface WriteTransactionCustomizer {
+        public void customize(DOMStoreReadWriteTransaction tx);
+    }
+
+    public interface ReadTransactionVerifier {
+        public void verify(DOMStoreReadTransaction tx);
+    }
+
+    private final class ChangeEventListener implements
+            AsyncDataChangeListener<InstanceIdentifier, NormalizedNode<?, ?>> {
+
+        protected final SettableFuture<AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>>> receivedChange = SettableFuture
+                .create();
+
+        @Override
+        public void onDataChanged(final AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change) {
+            if (postSetup) {
+                receivedChange.set(change);
+            }
+        }
+    }
+
+    public static final WriteTransactionCustomizer simpleWrite(final InstanceIdentifier path,
+            final NormalizedNode<?, ?> data) {
+        return new WriteTransactionCustomizer() {
+
+            @Override
+            public void customize(final DOMStoreReadWriteTransaction tx) {
+                tx.write(path, data);
+            }
+        };
+    }
+
+    public static final WriteTransactionCustomizer simpleMerge(final InstanceIdentifier path,
+            final NormalizedNode<?, ?> data) {
+        return new WriteTransactionCustomizer() {
+
+            @Override
+            public void customize(final DOMStoreReadWriteTransaction tx) {
+                tx.merge(path, data);
+            }
+        };
+    }
+
+    public static final WriteTransactionCustomizer simpleDelete(final InstanceIdentifier path) {
+        return new WriteTransactionCustomizer() {
+            @Override
+            public void customize(final DOMStoreReadWriteTransaction tx) {
+                tx.delete(path);
+            }
+        };
+    }
+}
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DefaultDataChangeListenerTestSuite.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/DefaultDataChangeListenerTestSuite.java
new file mode 100644 (file)
index 0000000..54d2043
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import java.util.concurrent.ExecutionException;
+
+import org.junit.Test;
+import org.opendaylight.controller.md.sal.dom.store.impl.DatastoreTestTask.WriteTransactionCustomizer;
+import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
+
+public abstract class DefaultDataChangeListenerTestSuite extends AbstractDataChangeListenerTest {
+
+    protected static final String FOO_SIBLING = "foo-sibling";
+
+    abstract protected void customizeTask(DatastoreTestTask task);
+
+    @Test
+    public final void putTopLevelOneNested() throws InterruptedException, ExecutionException {
+
+        DatastoreTestTask task = newTestTask().test(writeOneTopMultipleNested(FOO, BAR));
+        customizeTask(task);
+        task.run();
+        putTopLevelOneNested(task);
+    }
+
+    @Test
+    public final void existingTopWriteSibling() throws InterruptedException, ExecutionException {
+        DatastoreTestTask task = newTestTask().setup(writeOneTopMultipleNested(FOO)).test(
+                new WriteTransactionCustomizer() {
+                    @Override
+                    public void customize(final DOMStoreReadWriteTransaction tx) {
+                        tx.write(path(FOO_SIBLING), topLevelList(FOO_SIBLING).build());
+                    }
+                });
+        customizeTask(task);
+        task.run();
+        existingTopWriteSibling(task);
+    }
+
+    protected abstract void existingTopWriteSibling(DatastoreTestTask task) throws InterruptedException, ExecutionException;
+
+
+    @Test
+    public final void existingTopWriteTwoNested() throws InterruptedException, ExecutionException {
+        DatastoreTestTask task = newTestTask().setup(writeOneTopMultipleNested(FOO)).test(
+                new WriteTransactionCustomizer() {
+                    @Override
+                    public void customize(final DOMStoreReadWriteTransaction tx) {
+                        tx.write(path(FOO,BAR), nestedList(BAR).build());
+                        tx.write(path(FOO,BAZ), nestedList(BAZ).build());
+                    }
+                });
+        customizeTask(task);
+        task.run();
+        existingTopWriteTwoNested(task);
+    }
+
+    protected abstract void existingTopWriteTwoNested(DatastoreTestTask task) throws InterruptedException, ExecutionException;
+
+
+    @Test
+    public final void existingOneNestedWriteAdditionalNested() throws InterruptedException, ExecutionException {
+        DatastoreTestTask task = newTestTask().setup(writeOneTopMultipleNested(FOO, BAR)).test(
+                new WriteTransactionCustomizer() {
+                    @Override
+                    public void customize(final DOMStoreReadWriteTransaction tx) {
+                        tx.write(path(FOO,BAZ), nestedList(BAZ).build());
+                    }
+                });
+        customizeTask(task);
+        task.run();
+        existingOneNestedWriteAdditionalNested(task);
+    }
+
+    protected abstract void existingOneNestedWriteAdditionalNested(DatastoreTestTask task) throws InterruptedException, ExecutionException;
+
+    protected abstract void putTopLevelOneNested(DatastoreTestTask task) throws InterruptedException,
+            ExecutionException;
+
+    @Test
+    public final void replaceTopLevelNestedChanged() throws InterruptedException, ExecutionException {
+        DatastoreTestTask task = newTestTask().setup(writeOneTopMultipleNested(FOO, BAR)).test(
+                writeOneTopMultipleNested(FOO, BAZ));
+        customizeTask(task);
+        task.run();
+        replaceTopLevelNestedChanged(task);
+    }
+
+    protected abstract void replaceTopLevelNestedChanged(DatastoreTestTask task) throws InterruptedException,
+            ExecutionException;
+
+    @Test
+    public final void putTopLevelWithTwoNested() throws InterruptedException, ExecutionException {
+
+        DatastoreTestTask task = newTestTask().test(writeOneTopMultipleNested(FOO, BAR, BAZ));
+        customizeTask(task);
+        task.run();
+        putTopLevelWithTwoNested(task);
+    }
+
+    protected abstract void putTopLevelWithTwoNested(DatastoreTestTask task) throws InterruptedException,
+            ExecutionException;
+
+    @Test
+    public final void twoNestedExistsOneIsDeleted() throws InterruptedException, ExecutionException {
+
+        DatastoreTestTask task = newTestTask().setup(writeOneTopMultipleNested(FOO, BAR, BAZ)).test(
+                deleteNested(FOO, BAZ));
+        customizeTask(task);
+        task.run();
+        twoNestedExistsOneIsDeleted(task);
+    }
+
+    protected abstract void twoNestedExistsOneIsDeleted(DatastoreTestTask task) throws InterruptedException,
+            ExecutionException;
+
+    @Test
+    public final void nestedListExistsRootDeleted() throws InterruptedException, ExecutionException {
+
+        DatastoreTestTask task = newTestTask().cleanup(null).setup(writeOneTopMultipleNested(FOO, BAR, BAZ))
+                .test(DatastoreTestTask.simpleDelete(TOP_LEVEL));
+        customizeTask(task);
+        task.run();
+        nestedListExistsRootDeleted(task);
+    }
+
+    protected abstract void nestedListExistsRootDeleted(DatastoreTestTask task) throws InterruptedException,
+            ExecutionException;
+}
index 369a7da..96369de 100644 (file)
@@ -1,8 +1,18 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.md.sal.dom.store.impl;
 
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.MoreExecutors;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.ExecutionException;
+
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -14,11 +24,9 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
-import java.util.concurrent.ExecutionException;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
 
 
 public class InMemoryDataStoreTest {
@@ -237,7 +245,7 @@ public class InMemoryDataStoreTest {
   /**
    * Reads /test from readTx Read should return container.
    */
-  private static Optional<NormalizedNode<?, ?>> assertTestContainerExists(DOMStoreReadTransaction readTx)
+  private static Optional<NormalizedNode<?, ?>> assertTestContainerExists(final DOMStoreReadTransaction readTx)
       throws InterruptedException, ExecutionException {
 
     ListenableFuture<Optional<NormalizedNode<?, ?>>> writeTxContainer = readTx.read(TestModel.TEST_PATH);
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/RootScopeSubtreeTest.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/RootScopeSubtreeTest.java
new file mode 100644 (file)
index 0000000..ef2a474
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import java.util.concurrent.ExecutionException;
+
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class RootScopeSubtreeTest extends DefaultDataChangeListenerTestSuite {
+
+    @Override
+    protected void customizeTask(final DatastoreTestTask task) {
+        task.changeListener(TOP_LEVEL, DataChangeScope.SUBTREE);
+    }
+
+    @Override
+    public void putTopLevelOneNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), TOP_LEVEL, path(FOO), path(FOO, BAR));
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+    }
+
+    @Override
+    public void replaceTopLevelNestedChanged(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO, BAZ));
+        assertContains(change.getUpdatedData(), TOP_LEVEL, path(FOO));
+        assertContains(change.getRemovedPaths(), path(FOO, BAR));
+    }
+
+    @Override
+    protected void putTopLevelWithTwoNested(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), TOP_LEVEL, path(FOO), path(FOO, BAR), path(FOO, BAZ));
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+    }
+
+    @Override
+    protected void twoNestedExistsOneIsDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertEmpty(change.getCreatedData());
+        assertContains(change.getUpdatedData(), TOP_LEVEL, path(FOO));
+        assertContains(change.getRemovedPaths(), path(FOO, BAZ));
+    }
+
+    @Override
+    protected void nestedListExistsRootDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertEmpty(change.getCreatedData());
+        assertEmpty(change.getUpdatedData());
+        assertContains(change.getRemovedPaths(), TOP_LEVEL, path(FOO), path(FOO, BAR), path(FOO, BAZ));
+    }
+
+    @Override
+    protected void existingOneNestedWriteAdditionalNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO,BAZ));
+        assertNotContains(change.getCreatedData(), path(FOO,BAR));
+        assertContains(change.getUpdatedData(), TOP_LEVEL, path(FOO));
+        assertEmpty(change.getRemovedPaths());
+    }
+
+    @Override
+    protected void existingTopWriteTwoNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO,BAR),path(FOO,BAZ));
+        assertContains(change.getUpdatedData(), TOP_LEVEL, path(FOO));
+        assertNotContains(change.getUpdatedData(), path(FOO,BAR));
+        assertEmpty(change.getRemovedPaths());
+    }
+
+    @Override
+    protected void existingTopWriteSibling(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO_SIBLING));
+        assertContains(change.getUpdatedData(), TOP_LEVEL);
+        assertNotContains(change.getUpdatedData(), path(FOO));
+        assertEmpty(change.getRemovedPaths());
+    }
+}
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeBaseTest.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeBaseTest.java
new file mode 100644 (file)
index 0000000..4c1a860
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class WildcardedScopeBaseTest extends DefaultDataChangeListenerTestSuite {
+
+    private static final InstanceIdentifier TOP_LEVEL_LIST_ALL = TOP_LEVEL.node(TopLevelList.QNAME).node(
+            TopLevelList.QNAME);
+
+    @Override
+    protected void customizeTask(final DatastoreTestTask task) {
+        task.changeListener(TOP_LEVEL_LIST_ALL, DataChangeScope.BASE);
+    }
+
+    @Override
+    public void putTopLevelOneNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertNotNull(change);
+
+        assertNotContains(change.getCreatedData(), TOP_LEVEL);
+        assertContains(change.getCreatedData(), path(FOO), path(FOO, BAR));
+
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+
+    }
+
+    @Override
+    public void replaceTopLevelNestedChanged(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+
+        assertContains(change.getCreatedData(), path(FOO, BAZ));
+        assertContains(change.getUpdatedData(), path(FOO));
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(), path(FOO, BAR));
+
+    }
+
+    @Override
+    protected void putTopLevelWithTwoNested(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+        assertFalse(change.getCreatedData().isEmpty());
+
+        assertContains(change.getCreatedData(), path(FOO), path(FOO, BAR), path(FOO, BAZ));
+        assertNotContains(change.getCreatedData(), TOP_LEVEL);
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+
+    }
+
+    @Override
+    protected void twoNestedExistsOneIsDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        Future<?> future = task.getChangeEvent();
+        /*
+         * Base listener should be notified only and only if actual node changed its state,
+         * since deletion of child, did not result in change of node we are listening
+         * for, we should not be getting data change event
+         * and this means settable future containing receivedDataChangeEvent is not done.
+         *
+         */
+        assertFalse(future.isDone());
+    }
+
+    @Override
+    public void nestedListExistsRootDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertEmpty(change.getCreatedData());
+        assertEmpty(change.getUpdatedData());
+
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(), path(FOO),path(FOO, BAZ),path(FOO,BAR));
+    }
+
+    @Override
+    protected void existingOneNestedWriteAdditionalNested(final DatastoreTestTask task) {
+        Future<?> future = task.getChangeEvent();
+        /*
+         * One listener should be notified only and only if actual node changed its state,
+         * since deletion of nested child (in this case /nested-list/nested-list[foo],
+         * did not result in change of node we are listening
+         * for, we should not be getting data change event
+         * and this means settable future containing receivedDataChangeEvent is not done.
+         *
+         */
+        assertFalse(future.isDone());
+    }
+
+    @Override
+    protected void existingTopWriteTwoNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        Future<?> future = task.getChangeEvent();
+        /*
+         * One listener should be notified only and only if actual node changed its state,
+         * since deletion of nested child (in this case /nested-list/nested-list[foo],
+         * did not result in change of node we are listening
+         * for, we should not be getting data change event
+         * and this means settable future containing receivedDataChangeEvent is not done.
+         *
+         */
+        assertFalse(future.isDone());
+    }
+
+    @Override
+    protected void existingTopWriteSibling(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO_SIBLING));
+        assertNotContains(change.getUpdatedData(), path(FOO), TOP_LEVEL);
+        assertEmpty(change.getRemovedPaths());
+    }
+}
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeOneTest.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeOneTest.java
new file mode 100644 (file)
index 0000000..1f2cb22
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class WildcardedScopeOneTest extends DefaultDataChangeListenerTestSuite {
+
+    private static final InstanceIdentifier TOP_LEVEL_LIST_ALL = TOP_LEVEL.node(TopLevelList.QNAME).node(
+            TopLevelList.QNAME);
+
+    @Override
+    protected void customizeTask(final DatastoreTestTask task) {
+        task.changeListener(TOP_LEVEL_LIST_ALL, DataChangeScope.ONE);
+    }
+
+    @Override
+    public void putTopLevelOneNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertNotNull(change);
+
+        assertNotContains(change.getCreatedData(), TOP_LEVEL);
+        assertContains(change.getCreatedData(), path(FOO), path(FOO, BAR));
+
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+
+    }
+
+    @Override
+    public void replaceTopLevelNestedChanged(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+
+        assertContains(change.getCreatedData(), path(FOO, BAZ));
+        assertContains(change.getUpdatedData(), path(FOO));
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(), path(FOO, BAR));
+
+    }
+
+    @Override
+    protected void putTopLevelWithTwoNested(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+        assertFalse(change.getCreatedData().isEmpty());
+
+        assertContains(change.getCreatedData(), path(FOO), path(FOO, BAR), path(FOO, BAZ));
+        assertNotContains(change.getCreatedData(), TOP_LEVEL);
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+
+    }
+
+    @Override
+    protected void twoNestedExistsOneIsDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        Future<?> future = task.getChangeEvent();
+        /*
+         * One listener should be notified only and only if actual node changed its state,
+         * since deletion of nested child (in this case /nested-list/nested-list[foo],
+         * did not result in change of node we are listening
+         * for, we should not be getting data change event
+         * and this means settable future containing receivedDataChangeEvent is not done.
+         *
+         */
+        assertFalse(future.isDone());
+    }
+
+    @Override
+    public void nestedListExistsRootDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertEmpty(change.getCreatedData());
+        assertEmpty(change.getUpdatedData());
+
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(), path(FOO),path(FOO, BAZ),path(FOO,BAR));
+    }
+
+    @Override
+    protected void existingOneNestedWriteAdditionalNested(final DatastoreTestTask task) {
+        Future<?> future = task.getChangeEvent();
+        /*
+         * One listener should be notified only and only if actual node changed its state,
+         * since deletion of nested child (in this case /nested-list/nested-list[foo],
+         * did not result in change of node we are listening
+         * for, we should not be getting data change event
+         * and this means settable future containing receivedDataChangeEvent is not done.
+         *
+         */
+        assertFalse(future.isDone());
+    }
+
+    @Override
+    protected void existingTopWriteTwoNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        Future<?> future = task.getChangeEvent();
+        /*
+         * One listener should be notified only and only if actual node changed its state,
+         * since deletion of nested child (in this case /nested-list/nested-list[foo],
+         * did not result in change of node we are listening
+         * for, we should not be getting data change event
+         * and this means settable future containing receivedDataChangeEvent is not done.
+         *
+         */
+        assertFalse(future.isDone());
+    }
+
+    @Override
+    protected void existingTopWriteSibling(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO_SIBLING));
+        assertNotContains(change.getUpdatedData(),path(FOO), TOP_LEVEL);
+        assertEmpty(change.getRemovedPaths());
+    }
+}
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeSubtreeTest.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/WildcardedScopeSubtreeTest.java
new file mode 100644 (file)
index 0000000..0102048
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.md.sal.dom.store.impl;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.ExecutionException;
+
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList;
+import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+
+public class WildcardedScopeSubtreeTest extends DefaultDataChangeListenerTestSuite {
+
+    private static final InstanceIdentifier TOP_LEVEL_LIST_ALL = TOP_LEVEL.node(TopLevelList.QNAME).node(
+            TopLevelList.QNAME);
+
+    @Override
+    protected void customizeTask(final DatastoreTestTask task) {
+        task.changeListener(TOP_LEVEL_LIST_ALL, DataChangeScope.SUBTREE);
+    }
+
+    @Override
+    public void putTopLevelOneNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertNotContains(change.getCreatedData(), TOP_LEVEL);
+        assertContains(change.getCreatedData(), path(FOO), path(FOO, BAR));
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+
+    }
+
+    @Override
+    public void replaceTopLevelNestedChanged(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+
+        assertContains(change.getCreatedData(), path(FOO, BAZ));
+        assertContains(change.getUpdatedData(), path(FOO));
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(), path(FOO, BAR));
+
+    }
+
+    @Override
+    protected void putTopLevelWithTwoNested(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+        assertFalse(change.getCreatedData().isEmpty());
+
+        assertContains(change.getCreatedData(), path(FOO), path(FOO, BAR), path(FOO, BAZ));
+        assertNotContains(change.getCreatedData(), TOP_LEVEL);
+        assertEmpty(change.getUpdatedData());
+        assertEmpty(change.getRemovedPaths());
+
+    }
+
+    @Override
+    protected void twoNestedExistsOneIsDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+        assertNotNull(change);
+        assertTrue(change.getCreatedData().isEmpty());
+        assertContains(change.getUpdatedData(), path(FOO));
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(),path(FOO, BAZ));
+    }
+
+    @Override
+    public void nestedListExistsRootDeleted(final DatastoreTestTask task) throws InterruptedException,
+            ExecutionException {
+
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertEmpty(change.getCreatedData());
+        assertEmpty(change.getUpdatedData());
+
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertContains(change.getRemovedPaths(), path(FOO),path(FOO, BAZ),path(FOO,BAR));
+    }
+
+    @Override
+    protected void existingOneNestedWriteAdditionalNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO,BAZ));
+        assertNotContains(change.getCreatedData(), path(FOO,BAR));
+        assertContains(change.getUpdatedData(), path(FOO));
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL);
+        assertEmpty(change.getRemovedPaths());
+    }
+
+    @Override
+    protected void existingTopWriteTwoNested(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO,BAR),path(FOO,BAZ));
+        assertContains(change.getUpdatedData(), path(FOO));
+        assertNotContains(change.getUpdatedData(), TOP_LEVEL, path(FOO,BAR));
+        assertEmpty(change.getRemovedPaths());
+    }
+
+    @Override
+    protected void existingTopWriteSibling(final DatastoreTestTask task) throws InterruptedException, ExecutionException {
+        AsyncDataChangeEvent<InstanceIdentifier, NormalizedNode<?, ?>> change = task.getChangeEvent().get();
+
+        assertContains(change.getCreatedData(), path(FOO_SIBLING));
+        assertNotContains(change.getUpdatedData(), path(FOO), TOP_LEVEL);
+        assertEmpty(change.getRemovedPaths());
+    }
+}
index 21f9447..f9e6239 100644 (file)
@@ -55,7 +55,7 @@ public class NetconfMessageTransformer implements MessageTransformer<NetconfMess
     private static CompositeNode toNotification(final NetconfMessage message, final SchemaContext ctx) {
         final Set<NotificationDefinition> notifications = ctx.getNotifications();
         final Document document = message.getDocument();
-        return XmlDocumentUtils.notificationToDomNodes(document, Optional.fromNullable(notifications));
+        return XmlDocumentUtils.notificationToDomNodes(document, Optional.fromNullable(notifications), ctx);
     }
 
     @Override
diff --git a/opendaylight/md-sal/sal-netconf-connector/src/test/java/org/opendaylight/controller/sal/connect/netconf/NetconfToNotificationTest.java b/opendaylight/md-sal/sal-netconf-connector/src/test/java/org/opendaylight/controller/sal/connect/netconf/NetconfToNotificationTest.java
new file mode 100644 (file)
index 0000000..521a55d
--- /dev/null
@@ -0,0 +1,64 @@
+package org.opendaylight.controller.sal.connect.netconf;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.junit.Before;
+import org.junit.Test;
+import org.opendaylight.controller.netconf.api.NetconfMessage;
+import org.opendaylight.controller.netconf.util.xml.XmlUtil;
+import org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer;
+import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.parser.api.YangContextParser;
+import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
+import org.w3c.dom.Document;
+
+/**
+ * @author Lukas Sedlak <lsedlak@cisco.com>
+ */
+public class NetconfToNotificationTest {
+
+    NetconfMessageTransformer messageTransformer;
+
+    NetconfMessage userNotification;
+
+    @Before
+    public void setup() throws Exception {
+        final List<InputStream> modelsToParse = Collections.singletonList(getClass().getResourceAsStream("/schemas/user-notification.yang"));
+        final YangContextParser parser = new YangParserImpl();
+        final Set<Module> modules = parser.parseYangModelsFromStreams(modelsToParse);
+        assertTrue(!modules.isEmpty());
+        final SchemaContext schemaContext = parser.resolveSchemaContext(modules);
+        assertNotNull(schemaContext);
+
+        messageTransformer = new NetconfMessageTransformer();
+        messageTransformer.onGlobalContextUpdated(schemaContext);
+
+        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+        InputStream notifyPayloadStream = getClass().getResourceAsStream("/notification-payload.xml");
+        assertNotNull(notifyPayloadStream);
+
+        final Document doc = XmlUtil.readXmlToDocument(notifyPayloadStream);
+        assertNotNull(doc);
+        userNotification = new NetconfMessage(doc);
+    }
+
+    @Test
+    public void test() throws Exception {
+        final CompositeNode root = messageTransformer.toNotification(userNotification);
+
+        assertNotNull(root);
+        assertEquals(6, root.size());
+        assertEquals("user-visited-page", root.getKey().getLocalName());
+    }
+}
diff --git a/opendaylight/md-sal/sal-netconf-connector/src/test/resources/notification-payload.xml b/opendaylight/md-sal/sal-netconf-connector/src/test/resources/notification-payload.xml
new file mode 100644 (file)
index 0000000..837fcc1
--- /dev/null
@@ -0,0 +1,14 @@
+<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
+<eventTime>2014-07-08T11:20:48UTC</eventTime>
+<user-visited-page xmlns="org:opendaylight:notification:test:ns:yang:user-notification">
+  <ui:incoming-user xmlns:ui="org:opendaylight:notification:test:ns:yang:user-notification">ui:public-user</ui:incoming-user>
+  <ip-address>172.23.29.104</ip-address>
+  <mac>00:11:00:ff:dd:02</mac>
+  <browser-id>Chrome 35.0.1916.153 m</browser-id>
+  <region>
+    <name>Slovakia</name>
+    <time-zone>UTC/GMT+2</time-zone>
+  </region>
+  <visiting-date>2014-07-08 11:20:48</visiting-date>
+</user-visited-page>
+</notification>
\ No newline at end of file
diff --git a/opendaylight/md-sal/sal-netconf-connector/src/test/resources/schemas/user-notification.yang b/opendaylight/md-sal/sal-netconf-connector/src/test/resources/schemas/user-notification.yang
new file mode 100644 (file)
index 0000000..50d2206
--- /dev/null
@@ -0,0 +1,56 @@
+module user-notification {
+    yang-version 1;
+    namespace "org:opendaylight:notification:test:ns:yang:user-notification";
+    prefix "user";
+
+    organization "Cisco Systems";
+    contact "Lukas Sedlak";
+    description "Test model for testing notifications";
+
+    revision "2014-07-08" {
+        description "Initial revision";
+    }
+
+    identity user-identity {
+        description "Identity of user incoming to Web Page";
+    }
+
+    identity public-user {
+        base user-identity;
+        description "Identity of random public non-registered user";
+    }
+
+    notification user-visited-page {
+        leaf incoming-user {
+            type identityref {
+                base "user-identity";
+            }
+        }
+
+        leaf ip-address {
+            type string;
+        }
+
+        leaf mac {
+            type string;
+        }
+
+        leaf browser-id {
+            type string;
+        }
+
+        container region {
+            leaf name {
+                type string;
+            }
+
+            leaf time-zone {
+                type string;
+            }
+        }
+
+        leaf visiting-date {
+            type string;
+        }
+    }
+}
\ No newline at end of file
index 778d8c6..d0be2cb 100644 (file)
@@ -20,4 +20,9 @@ machine
 
  protoc --proto_path=src/main/resources --java_out=src/main/java src/main/resources/*.proto
 
-5. Run mvn clean install and resolve any trailing spaces issues & build the .jar
+5. Run mvn clean install  & build the .jar
+
+6. !!!WARNING!!! - never edit the generated sources files of protocol buffer
+
+7. !!!NOTE!!! if you are planning to add new .proto file  option java_package should begin with
+   org.opendaylight.controller.protobuff.messages to properly exclude from sonar.
index b14da29..c9e586b 100755 (executable)
 # or run command
 #       protoc --proto_path=src/main/resources --java_out=src/main/java src/main/resources/*.proto
 #
-#5. Run mvn clean install and resolve any trailing spaces issues & build the .jar
+#5. Run mvn clean install & build the .jar
+#
+#6  !!!WARNING!!!! never edit the source files generated
+#
+#7. !!!NOTE!!! if you are planning to add new .proto file  option java_package should begin with
+#   org.opendaylight.controller.protobuff.messages to properly exclude from sonar.
 ########################################################################################################
 
 protoc --proto_path=src/main/resources --java_out=src/main/java src/main/resources/*.proto
 
 echo "Done generating Java source files."
 
+#to remove trailing spaces in the code files
 find src/main/java -type f -name '*.java' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java
deleted file mode 100644 (file)
index 8d82f8b..0000000
+++ /dev/null
@@ -1,746 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: ListenerRegistration.proto
-
-package org.opendaylight.controller.cluster.datastore.registration;
-
-public final class ListenerRegistrationMessages {
-  private ListenerRegistrationMessages() {}
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {}
-
-  public interface CloseOrBuilder extends com.google.protobuf.MessageOrBuilder {
-  }
-  /**
-   * Protobuf type {@code org.opendaylight.controller.mdsal.Close}
-   */
-  public static final class Close extends com.google.protobuf.GeneratedMessage
-      implements CloseOrBuilder {
-    // Use Close.newBuilder() to construct.
-    private Close(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-
-    private Close(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-
-    private static final Close defaultInstance;
-
-    public static Close getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public Close getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-      return this.unknownFields;
-    }
-
-    private Close(com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.class,
-              org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<Close> PARSER =
-        new com.google.protobuf.AbstractParser<Close>() {
-          public Close parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new Close(input, extensionRegistry);
-          }
-        };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<Close> getParserForType() {
-      return PARSER;
-    }
-
-    private void initFields() {}
-
-    private byte memoizedIsInitialized = -1;
-
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
-      getSerializedSize();
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
-
-      size = 0;
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-
-    /**
-     * Protobuf type {@code org.opendaylight.controller.mdsal.Close}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.class,
-                org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.Builder.class);
-      }
-
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_descriptor;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close
-            .getDefaultInstance();
-      }
-
-      public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close build() {
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close result =
-            buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close buildPartial() {
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close result =
-            new org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close(
-                this);
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close other) {
-        if (other == org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close
-            .getDefaultInstance())
-          return this;
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parsedMessage =
-            null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) e
-                  .getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.Close)
-    }
-
-    static {
-      defaultInstance = new Close(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Close)
-  }
-
-  public interface CloseReplyOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
-  }
-  /**
-   * Protobuf type {@code org.opendaylight.controller.mdsal.CloseReply}
-   */
-  public static final class CloseReply extends
-      com.google.protobuf.GeneratedMessage implements CloseReplyOrBuilder {
-    // Use CloseReply.newBuilder() to construct.
-    private CloseReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-
-    private CloseReply(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-
-    private static final CloseReply defaultInstance;
-
-    public static CloseReply getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public CloseReply getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-      return this.unknownFields;
-    }
-
-    private CloseReply(com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.class,
-              org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<CloseReply> PARSER =
-        new com.google.protobuf.AbstractParser<CloseReply>() {
-          public CloseReply parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new CloseReply(input, extensionRegistry);
-          }
-        };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CloseReply> getParserForType() {
-      return PARSER;
-    }
-
-    private void initFields() {}
-
-    private byte memoizedIsInitialized = -1;
-
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
-      getSerializedSize();
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
-
-      size = 0;
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-
-    /**
-     * Protobuf type {@code org.opendaylight.controller.mdsal.CloseReply}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReplyOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.class,
-                org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.Builder.class);
-      }
-
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply
-            .getDefaultInstance();
-      }
-
-      public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply build() {
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply result =
-            buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply buildPartial() {
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply result =
-            new org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply(
-                this);
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply other) {
-        if (other == org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply
-            .getDefaultInstance())
-          return this;
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parsedMessage =
-            null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) e
-                  .getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseReply)
-    }
-
-    static {
-      defaultInstance = new CloseReply(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseReply)
-  }
-
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_Close_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
-    return descriptor;
-  }
-
-  private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
-  static {
-    java.lang.String[] descriptorData =
-        {"\n\032ListenerRegistration.proto\022!org.openda"
-            + "ylight.controller.mdsal\"\007\n\005Close\"\014\n\nClos"
-            + "eReplyBZ\n:org.opendaylight.controller.cl"
-            + "uster.datastore.registrationB\034ListenerRe"
-            + "gistrationMessages"};
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            internal_static_org_opendaylight_controller_mdsal_Close_descriptor =
-                getDescriptor().getMessageTypes().get(0);
-            internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_Close_descriptor,
-                    new java.lang.String[] {});
-            internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor =
-                getDescriptor().getMessageTypes().get(1);
-            internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor,
-                    new java.lang.String[] {});
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-        .internalBuildGeneratedFileFrom(descriptorData,
-            new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner);
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java
deleted file mode 100644 (file)
index 08ddf38..0000000
+++ /dev/null
@@ -1,1647 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: ShardTransactionChain.proto
-
-package org.opendaylight.controller.cluster.datastore.transaction;
-
-public final class ShardTransactionChainMessages {
-  private ShardTransactionChainMessages() {}
-
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {}
-
-  public interface CloseTransactionChainOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
-  }
-  /**
-   * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChain}
-   */
-  public static final class CloseTransactionChain extends
-      com.google.protobuf.GeneratedMessage implements
-      CloseTransactionChainOrBuilder {
-    // Use CloseTransactionChain.newBuilder() to construct.
-    private CloseTransactionChain(
-        com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-
-    private CloseTransactionChain(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-
-    private static final CloseTransactionChain defaultInstance;
-
-    public static CloseTransactionChain getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public CloseTransactionChain getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-      return this.unknownFields;
-    }
-
-    private CloseTransactionChain(com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.class,
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<CloseTransactionChain> PARSER =
-        new com.google.protobuf.AbstractParser<CloseTransactionChain>() {
-          public CloseTransactionChain parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new CloseTransactionChain(input, extensionRegistry);
-          }
-        };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CloseTransactionChain> getParserForType() {
-      return PARSER;
-    }
-
-    private void initFields() {}
-
-    private byte memoizedIsInitialized = -1;
-
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
-      getSerializedSize();
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
-
-      size = 0;
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-
-    /**
-     * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChain}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.class,
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class);
-      }
-
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain
-            .getDefaultInstance();
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain build() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain result =
-            buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain buildPartial() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain result =
-            new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain(
-                this);
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain other) {
-        if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain
-            .getDefaultInstance())
-          return this;
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parsedMessage =
-            null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) e
-                  .getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseTransactionChain)
-    }
-
-    static {
-      defaultInstance = new CloseTransactionChain(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionChain)
-  }
-
-  public interface CloseTransactionChainReplyOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
-  }
-  /**
-   * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChainReply}
-   */
-  public static final class CloseTransactionChainReply extends
-      com.google.protobuf.GeneratedMessage implements
-      CloseTransactionChainReplyOrBuilder {
-    // Use CloseTransactionChainReply.newBuilder() to construct.
-    private CloseTransactionChainReply(
-        com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-
-    private CloseTransactionChainReply(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-
-    private static final CloseTransactionChainReply defaultInstance;
-
-    public static CloseTransactionChainReply getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public CloseTransactionChainReply getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-      return this.unknownFields;
-    }
-
-    private CloseTransactionChainReply(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class,
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<CloseTransactionChainReply> PARSER =
-        new com.google.protobuf.AbstractParser<CloseTransactionChainReply>() {
-          public CloseTransactionChainReply parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new CloseTransactionChainReply(input, extensionRegistry);
-          }
-        };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CloseTransactionChainReply> getParserForType() {
-      return PARSER;
-    }
-
-    private void initFields() {}
-
-    private byte memoizedIsInitialized = -1;
-
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
-      getSerializedSize();
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
-
-      size = 0;
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-
-    /**
-     * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChainReply}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReplyOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class,
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class);
-      }
-
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply
-            .getDefaultInstance();
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply build() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result =
-            buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply buildPartial() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result =
-            new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply(
-                this);
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply other) {
-        if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply
-            .getDefaultInstance())
-          return this;
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parsedMessage =
-            null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) e
-                  .getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseTransactionChainReply)
-    }
-
-    static {
-      defaultInstance = new CloseTransactionChainReply(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionChainReply)
-  }
-
-  public interface CreateTransactionChainOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
-  }
-  /**
-   * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChain}
-   */
-  public static final class CreateTransactionChain extends
-      com.google.protobuf.GeneratedMessage implements
-      CreateTransactionChainOrBuilder {
-    // Use CreateTransactionChain.newBuilder() to construct.
-    private CreateTransactionChain(
-        com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-
-    private CreateTransactionChain(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-
-    private static final CreateTransactionChain defaultInstance;
-
-    public static CreateTransactionChain getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public CreateTransactionChain getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-      return this.unknownFields;
-    }
-
-    private CreateTransactionChain(com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.class,
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<CreateTransactionChain> PARSER =
-        new com.google.protobuf.AbstractParser<CreateTransactionChain>() {
-          public CreateTransactionChain parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new CreateTransactionChain(input, extensionRegistry);
-          }
-        };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CreateTransactionChain> getParserForType() {
-      return PARSER;
-    }
-
-    private void initFields() {}
-
-    private byte memoizedIsInitialized = -1;
-
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
-      getSerializedSize();
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
-
-      size = 0;
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-
-    /**
-     * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChain}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.class,
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.Builder.class);
-      }
-
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain
-            .getDefaultInstance();
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain build() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain result =
-            buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain buildPartial() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain result =
-            new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain(
-                this);
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain other) {
-        if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain
-            .getDefaultInstance())
-          return this;
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parsedMessage =
-            null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) e
-                  .getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CreateTransactionChain)
-    }
-
-    static {
-      defaultInstance = new CreateTransactionChain(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransactionChain)
-  }
-
-  public interface CreateTransactionChainReplyOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
-
-    // required string transactionChainPath = 1;
-    /**
-     * <code>required string transactionChainPath = 1;</code>
-     */
-    boolean hasTransactionChainPath();
-
-    /**
-     * <code>required string transactionChainPath = 1;</code>
-     */
-    java.lang.String getTransactionChainPath();
-
-    /**
-     * <code>required string transactionChainPath = 1;</code>
-     */
-    com.google.protobuf.ByteString getTransactionChainPathBytes();
-  }
-  /**
-   * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChainReply}
-   */
-  public static final class CreateTransactionChainReply extends
-      com.google.protobuf.GeneratedMessage implements
-      CreateTransactionChainReplyOrBuilder {
-    // Use CreateTransactionChainReply.newBuilder() to construct.
-    private CreateTransactionChainReply(
-        com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-
-    private CreateTransactionChainReply(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
-
-    private static final CreateTransactionChainReply defaultInstance;
-
-    public static CreateTransactionChainReply getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public CreateTransactionChainReply getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
-      return this.unknownFields;
-    }
-
-    private CreateTransactionChainReply(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              bitField0_ |= 0x00000001;
-              transactionChainPath_ = input.readBytes();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.class,
-              org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<CreateTransactionChainReply> PARSER =
-        new com.google.protobuf.AbstractParser<CreateTransactionChainReply>() {
-          public CreateTransactionChainReply parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new CreateTransactionChainReply(input, extensionRegistry);
-          }
-        };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<CreateTransactionChainReply> getParserForType() {
-      return PARSER;
-    }
-
-    private int bitField0_;
-    // required string transactionChainPath = 1;
-    public static final int TRANSACTIONCHAINPATH_FIELD_NUMBER = 1;
-    private java.lang.Object transactionChainPath_;
-
-    /**
-     * <code>required string transactionChainPath = 1;</code>
-     */
-    public boolean hasTransactionChainPath() {
-      return ((bitField0_ & 0x00000001) == 0x00000001);
-    }
-
-    /**
-     * <code>required string transactionChainPath = 1;</code>
-     */
-    public java.lang.String getTransactionChainPath() {
-      java.lang.Object ref = transactionChainPath_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs =
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        if (bs.isValidUtf8()) {
-          transactionChainPath_ = s;
-        }
-        return s;
-      }
-    }
-
-    /**
-     * <code>required string transactionChainPath = 1;</code>
-     */
-    public com.google.protobuf.ByteString getTransactionChainPathBytes() {
-      java.lang.Object ref = transactionChainPath_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b =
-            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
-        transactionChainPath_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    private void initFields() {
-      transactionChainPath_ = "";
-    }
-
-    private byte memoizedIsInitialized = -1;
-
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
-
-      if (!hasTransactionChainPath()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
-      getSerializedSize();
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        output.writeBytes(1, getTransactionChainPathBytes());
-      }
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
-
-      size = 0;
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        size +=
-            com.google.protobuf.CodedOutputStream.computeBytesSize(1,
-                getTransactionChainPathBytes());
-      }
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-
-    public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-
-    /**
-     * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChainReply}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReplyOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.class,
-                org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.Builder.class);
-      }
-
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        transactionChainPath_ = "";
-        bitField0_ = (bitField0_ & ~0x00000001);
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply
-            .getDefaultInstance();
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply build() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply result =
-            buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply buildPartial() {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply result =
-            new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply(
-                this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.transactionChainPath_ = transactionChainPath_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply other) {
-        if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply
-            .getDefaultInstance())
-          return this;
-        if (other.hasTransactionChainPath()) {
-          bitField0_ |= 0x00000001;
-          transactionChainPath_ = other.transactionChainPath_;
-          onChanged();
-        }
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        if (!hasTransactionChainPath()) {
-
-          return false;
-        }
-        return true;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parsedMessage =
-            null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) e
-                  .getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private int bitField0_;
-
-      // required string transactionChainPath = 1;
-      private java.lang.Object transactionChainPath_ = "";
-
-      /**
-       * <code>required string transactionChainPath = 1;</code>
-       */
-      public boolean hasTransactionChainPath() {
-        return ((bitField0_ & 0x00000001) == 0x00000001);
-      }
-
-      /**
-       * <code>required string transactionChainPath = 1;</code>
-       */
-      public java.lang.String getTransactionChainPath() {
-        java.lang.Object ref = transactionChainPath_;
-        if (!(ref instanceof java.lang.String)) {
-          java.lang.String s =
-              ((com.google.protobuf.ByteString) ref).toStringUtf8();
-          transactionChainPath_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-
-      /**
-       * <code>required string transactionChainPath = 1;</code>
-       */
-      public com.google.protobuf.ByteString getTransactionChainPathBytes() {
-        java.lang.Object ref = transactionChainPath_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b =
-              com.google.protobuf.ByteString
-                  .copyFromUtf8((java.lang.String) ref);
-          transactionChainPath_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-
-      /**
-       * <code>required string transactionChainPath = 1;</code>
-       */
-      public Builder setTransactionChainPath(java.lang.String value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000001;
-        transactionChainPath_ = value;
-        onChanged();
-        return this;
-      }
-
-      /**
-       * <code>required string transactionChainPath = 1;</code>
-       */
-      public Builder clearTransactionChainPath() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        transactionChainPath_ = getDefaultInstance().getTransactionChainPath();
-        onChanged();
-        return this;
-      }
-
-      /**
-       * <code>required string transactionChainPath = 1;</code>
-       */
-      public Builder setTransactionChainPathBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000001;
-        transactionChainPath_ = value;
-        onChanged();
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CreateTransactionChainReply)
-    }
-
-    static {
-      defaultInstance = new CreateTransactionChainReply(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransactionChainReply)
-  }
-
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable;
-
-  public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
-    return descriptor;
-  }
-
-  private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
-  static {
-    java.lang.String[] descriptorData =
-        {"\n\033ShardTransactionChain.proto\022!org.opend"
-            + "aylight.controller.mdsal\"\027\n\025CloseTransac"
-            + "tionChain\"\034\n\032CloseTransactionChainReply\""
-            + "\030\n\026CreateTransactionChain\";\n\033CreateTrans"
-            + "actionChainReply\022\034\n\024transactionChainPath"
-            + "\030\001 \002(\tBZ\n9org.opendaylight.controller.cl"
-            + "uster.datastore.transactionB\035ShardTransa"
-            + "ctionChainMessages"};
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor =
-                getDescriptor().getMessageTypes().get(0);
-            internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor,
-                    new java.lang.String[] {});
-            internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor =
-                getDescriptor().getMessageTypes().get(1);
-            internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor,
-                    new java.lang.String[] {});
-            internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor =
-                getDescriptor().getMessageTypes().get(2);
-            internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor,
-                    new java.lang.String[] {});
-            internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor =
-                getDescriptor().getMessageTypes().get(3);
-            internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor,
-                    new java.lang.String[] {"TransactionChainPath",});
-            return null;
-          }
-        };
-    com.google.protobuf.Descriptors.FileDescriptor
-        .internalBuildGeneratedFileFrom(descriptorData,
-            new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner);
-  }
-
-  // @@protoc_insertion_point(outer_class_scope)
-}
index 9069e8f..41eb2e6 100644 (file)
@@ -2,7 +2,7 @@ package org.opendaylight.controller.cluster.datastore.util;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
-import org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage;
+import org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
@@ -1,69 +1,60 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: SimpleNormalizedNode.proto
 
-package org.opendaylight.controller.cluster.datastore.common;
+package org.opendaylight.controller.protobuff.messages.common;
 
 public final class SimpleNormalizedNodeMessage {
   private SimpleNormalizedNodeMessage() {}
-
   public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {}
-
-  public interface NormalizedNodeXmlOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  public interface NormalizedNodeXmlOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
 
     // required string nodeIdentifier = 1;
     /**
      * <code>required string nodeIdentifier = 1;</code>
      */
     boolean hasNodeIdentifier();
-
     /**
      * <code>required string nodeIdentifier = 1;</code>
      */
     java.lang.String getNodeIdentifier();
-
     /**
      * <code>required string nodeIdentifier = 1;</code>
      */
-    com.google.protobuf.ByteString getNodeIdentifierBytes();
+    com.google.protobuf.ByteString
+        getNodeIdentifierBytes();
 
     // required string xmlString = 2;
     /**
      * <code>required string xmlString = 2;</code>
      */
     boolean hasXmlString();
-
     /**
      * <code>required string xmlString = 2;</code>
      */
     java.lang.String getXmlString();
-
     /**
      * <code>required string xmlString = 2;</code>
      */
-    com.google.protobuf.ByteString getXmlStringBytes();
+    com.google.protobuf.ByteString
+        getXmlStringBytes();
   }
   /**
    * Protobuf type {@code org.opendaylight.controller.mdsal.NormalizedNodeXml}
    */
   public static final class NormalizedNodeXml extends
-      com.google.protobuf.GeneratedMessage implements
-      NormalizedNodeXmlOrBuilder {
+      com.google.protobuf.GeneratedMessage
+      implements NormalizedNodeXmlOrBuilder {
     // Use NormalizedNodeXml.newBuilder() to construct.
-    private NormalizedNodeXml(
-        com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+    private NormalizedNodeXml(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
       this.unknownFields = builder.getUnknownFields();
     }
-
-    private NormalizedNodeXml(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
+    private NormalizedNodeXml(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 
     private static final NormalizedNodeXml defaultInstance;
-
     public static NormalizedNodeXml getDefaultInstance() {
       return defaultInstance;
     }
@@ -73,13 +64,13 @@ public final class SimpleNormalizedNodeMessage {
     }
 
     private final com.google.protobuf.UnknownFieldSet unknownFields;
-
     @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
       return this.unknownFields;
     }
-
-    private NormalizedNodeXml(com.google.protobuf.CodedInputStream input,
+    private NormalizedNodeXml(
+        com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       initFields();
@@ -95,8 +86,8 @@ public final class SimpleNormalizedNodeMessage {
               done = true;
               break;
             default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
                 done = true;
               }
               break;
@@ -123,27 +114,27 @@ public final class SimpleNormalizedNodeMessage {
         makeExtensionsImmutable();
       }
     }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
     }
 
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class,
-              org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class);
+              org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class);
     }
 
     public static com.google.protobuf.Parser<NormalizedNodeXml> PARSER =
         new com.google.protobuf.AbstractParser<NormalizedNodeXml>() {
-          public NormalizedNodeXml parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new NormalizedNodeXml(input, extensionRegistry);
-          }
-        };
+      public NormalizedNodeXml parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new NormalizedNodeXml(input, extensionRegistry);
+      }
+    };
 
     @java.lang.Override
     public com.google.protobuf.Parser<NormalizedNodeXml> getParserForType() {
@@ -154,14 +145,12 @@ public final class SimpleNormalizedNodeMessage {
     // required string nodeIdentifier = 1;
     public static final int NODEIDENTIFIER_FIELD_NUMBER = 1;
     private java.lang.Object nodeIdentifier_;
-
     /**
      * <code>required string nodeIdentifier = 1;</code>
      */
     public boolean hasNodeIdentifier() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
-
     /**
      * <code>required string nodeIdentifier = 1;</code>
      */
@@ -179,15 +168,16 @@ public final class SimpleNormalizedNodeMessage {
         return s;
       }
     }
-
     /**
      * <code>required string nodeIdentifier = 1;</code>
      */
-    public com.google.protobuf.ByteString getNodeIdentifierBytes() {
+    public com.google.protobuf.ByteString
+        getNodeIdentifierBytes() {
       java.lang.Object ref = nodeIdentifier_;
       if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b =
-            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         nodeIdentifier_ = b;
         return b;
       } else {
@@ -198,14 +188,12 @@ public final class SimpleNormalizedNodeMessage {
     // required string xmlString = 2;
     public static final int XMLSTRING_FIELD_NUMBER = 2;
     private java.lang.Object xmlString_;
-
     /**
      * <code>required string xmlString = 2;</code>
      */
     public boolean hasXmlString() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
-
     /**
      * <code>required string xmlString = 2;</code>
      */
@@ -223,15 +211,16 @@ public final class SimpleNormalizedNodeMessage {
         return s;
       }
     }
-
     /**
      * <code>required string xmlString = 2;</code>
      */
-    public com.google.protobuf.ByteString getXmlStringBytes() {
+    public com.google.protobuf.ByteString
+        getXmlStringBytes() {
       java.lang.Object ref = xmlString_;
       if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b =
-            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         xmlString_ = b;
         return b;
       } else {
@@ -243,13 +232,10 @@ public final class SimpleNormalizedNodeMessage {
       nodeIdentifier_ = "";
       xmlString_ = "";
     }
-
     private byte memoizedIsInitialized = -1;
-
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
+      if (isInitialized != -1) return isInitialized == 1;
 
       if (!hasNodeIdentifier()) {
         memoizedIsInitialized = 0;
@@ -264,7 +250,7 @@ public final class SimpleNormalizedNodeMessage {
     }
 
     public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
+                        throws java.io.IOException {
       getSerializedSize();
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         output.writeBytes(1, getNodeIdentifierBytes());
@@ -276,22 +262,18 @@ public final class SimpleNormalizedNodeMessage {
     }
 
     private int memoizedSerializedSize = -1;
-
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
+      if (size != -1) return size;
 
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        size +=
-            com.google.protobuf.CodedOutputStream.computeBytesSize(1,
-                getNodeIdentifierBytes());
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(1, getNodeIdentifierBytes());
       }
       if (((bitField0_ & 0x00000002) == 0x00000002)) {
-        size +=
-            com.google.protobuf.CodedOutputStream.computeBytesSize(2,
-                getXmlStringBytes());
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(2, getXmlStringBytes());
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
@@ -299,89 +281,71 @@ public final class SimpleNormalizedNodeMessage {
     }
 
     private static final long serialVersionUID = 0L;
-
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
 
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
       return PARSER.parseFrom(input);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return PARSER.parseFrom(input, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
       return PARSER.parseDelimitedFrom(input);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom(
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
       return PARSER.parseFrom(input);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return PARSER.parseFrom(input, extensionRegistry);
     }
 
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml prototype) {
+    public static Builder newBuilder() { return Builder.create(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml prototype) {
       return newBuilder().mergeFrom(prototype);
     }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
+    public Builder toBuilder() { return newBuilder(this); }
 
     @java.lang.Override
     protected Builder newBuilderForType(
@@ -389,41 +353,38 @@ public final class SimpleNormalizedNodeMessage {
       Builder builder = new Builder(parent);
       return builder;
     }
-
     /**
      * Protobuf type {@code org.opendaylight.controller.mdsal.NormalizedNodeXml}
      */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
+       implements org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
       }
 
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class,
-                org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class);
+                org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class);
       }
 
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder()
+      // Construct using org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
 
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
-
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
         }
       }
-
       private static Builder create() {
         return new Builder();
       }
@@ -441,28 +402,25 @@ public final class SimpleNormalizedNodeMessage {
         return create().mergeFrom(buildPartial());
       }
 
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
       }
 
-      public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-            .getDefaultInstance();
+      public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getDefaultInstanceForType() {
+        return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
       }
 
-      public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml build() {
-        org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result =
-            buildPartial();
+      public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml build() {
+        org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result = buildPartial();
         if (!result.isInitialized()) {
           throw newUninitializedMessageException(result);
         }
         return result;
       }
 
-      public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml buildPartial() {
-        org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result =
-            new org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml(
-                this);
+      public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml buildPartial() {
+        org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result = new org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml(this);
         int from_bitField0_ = bitField0_;
         int to_bitField0_ = 0;
         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
@@ -479,19 +437,16 @@ public final class SimpleNormalizedNodeMessage {
       }
 
       public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) other);
+        if (other instanceof org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) {
+          return mergeFrom((org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml)other);
         } else {
           super.mergeFrom(other);
           return this;
         }
       }
 
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml other) {
-        if (other == org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-            .getDefaultInstance())
-          return this;
+      public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml other) {
+        if (other == org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance()) return this;
         if (other.hasNodeIdentifier()) {
           bitField0_ |= 0x00000001;
           nodeIdentifier_ = other.nodeIdentifier_;
@@ -518,17 +473,15 @@ public final class SimpleNormalizedNodeMessage {
         return true;
       }
 
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parsedMessage =
-            null;
+        org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parsedMessage = null;
         try {
           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) e
-                  .getUnfinishedMessage();
+          parsedMessage = (org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) e.getUnfinishedMessage();
           throw e;
         } finally {
           if (parsedMessage != null) {
@@ -537,63 +490,59 @@ public final class SimpleNormalizedNodeMessage {
         }
         return this;
       }
-
       private int bitField0_;
 
       // required string nodeIdentifier = 1;
       private java.lang.Object nodeIdentifier_ = "";
-
       /**
        * <code>required string nodeIdentifier = 1;</code>
        */
       public boolean hasNodeIdentifier() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
-
       /**
        * <code>required string nodeIdentifier = 1;</code>
        */
       public java.lang.String getNodeIdentifier() {
         java.lang.Object ref = nodeIdentifier_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s =
-              ((com.google.protobuf.ByteString) ref).toStringUtf8();
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           nodeIdentifier_ = s;
           return s;
         } else {
           return (java.lang.String) ref;
         }
       }
-
       /**
        * <code>required string nodeIdentifier = 1;</code>
        */
-      public com.google.protobuf.ByteString getNodeIdentifierBytes() {
+      public com.google.protobuf.ByteString
+          getNodeIdentifierBytes() {
         java.lang.Object ref = nodeIdentifier_;
         if (ref instanceof String) {
           com.google.protobuf.ByteString b =
-              com.google.protobuf.ByteString
-                  .copyFromUtf8((java.lang.String) ref);
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
           nodeIdentifier_ = b;
           return b;
         } else {
           return (com.google.protobuf.ByteString) ref;
         }
       }
-
       /**
        * <code>required string nodeIdentifier = 1;</code>
        */
-      public Builder setNodeIdentifier(java.lang.String value) {
+      public Builder setNodeIdentifier(
+          java.lang.String value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000001;
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
         nodeIdentifier_ = value;
         onChanged();
         return this;
       }
-
       /**
        * <code>required string nodeIdentifier = 1;</code>
        */
@@ -603,15 +552,15 @@ public final class SimpleNormalizedNodeMessage {
         onChanged();
         return this;
       }
-
       /**
        * <code>required string nodeIdentifier = 1;</code>
        */
-      public Builder setNodeIdentifierBytes(com.google.protobuf.ByteString value) {
+      public Builder setNodeIdentifierBytes(
+          com.google.protobuf.ByteString value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000001;
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
         nodeIdentifier_ = value;
         onChanged();
         return this;
@@ -619,58 +568,55 @@ public final class SimpleNormalizedNodeMessage {
 
       // required string xmlString = 2;
       private java.lang.Object xmlString_ = "";
-
       /**
        * <code>required string xmlString = 2;</code>
        */
       public boolean hasXmlString() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
-
       /**
        * <code>required string xmlString = 2;</code>
        */
       public java.lang.String getXmlString() {
         java.lang.Object ref = xmlString_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s =
-              ((com.google.protobuf.ByteString) ref).toStringUtf8();
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
           xmlString_ = s;
           return s;
         } else {
           return (java.lang.String) ref;
         }
       }
-
       /**
        * <code>required string xmlString = 2;</code>
        */
-      public com.google.protobuf.ByteString getXmlStringBytes() {
+      public com.google.protobuf.ByteString
+          getXmlStringBytes() {
         java.lang.Object ref = xmlString_;
         if (ref instanceof String) {
           com.google.protobuf.ByteString b =
-              com.google.protobuf.ByteString
-                  .copyFromUtf8((java.lang.String) ref);
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
           xmlString_ = b;
           return b;
         } else {
           return (com.google.protobuf.ByteString) ref;
         }
       }
-
       /**
        * <code>required string xmlString = 2;</code>
        */
-      public Builder setXmlString(java.lang.String value) {
+      public Builder setXmlString(
+          java.lang.String value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000002;
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000002;
         xmlString_ = value;
         onChanged();
         return this;
       }
-
       /**
        * <code>required string xmlString = 2;</code>
        */
@@ -680,15 +626,15 @@ public final class SimpleNormalizedNodeMessage {
         onChanged();
         return this;
       }
-
       /**
        * <code>required string xmlString = 2;</code>
        */
-      public Builder setXmlStringBytes(com.google.protobuf.ByteString value) {
+      public Builder setXmlStringBytes(
+          com.google.protobuf.ByteString value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        bitField0_ |= 0x00000002;
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000002;
         xmlString_ = value;
         onChanged();
         return this;
@@ -705,38 +651,45 @@ public final class SimpleNormalizedNodeMessage {
     // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.NormalizedNodeXml)
   }
 
-  private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
-  private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable;
+  private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable;
 
-  public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+  public static com.google.protobuf.Descriptors.FileDescriptor
+      getDescriptor() {
     return descriptor;
   }
-
-  private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+  private static com.google.protobuf.Descriptors.FileDescriptor
+      descriptor;
   static {
-    java.lang.String[] descriptorData =
-        {"\n\032SimpleNormalizedNode.proto\022!org.openda"
-            + "ylight.controller.mdsal\">\n\021NormalizedNod"
-            + "eXml\022\026\n\016nodeIdentifier\030\001 \002(\t\022\021\n\txmlStrin"
-            + "g\030\002 \002(\tBS\n4org.opendaylight.controller.c"
-            + "luster.datastore.commonB\033SimpleNormalize" + "dNodeMessage"};
+    java.lang.String[] descriptorData = {
+      "\n\032SimpleNormalizedNode.proto\022!org.openda" +
+      "ylight.controller.mdsal\">\n\021NormalizedNod" +
+      "eXml\022\026\n\016nodeIdentifier\030\001 \002(\t\022\021\n\txmlStrin" +
+      "g\030\002 \002(\tBT\n5org.opendaylight.controller.p" +
+      "rotobuff.messages.commonB\033SimpleNormaliz" +
+      "edNodeMessage"
+    };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-        new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-          public com.google.protobuf.ExtensionRegistry assignDescriptors(
-              com.google.protobuf.Descriptors.FileDescriptor root) {
-            descriptor = root;
-            internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor =
-                getDescriptor().getMessageTypes().get(0);
-            internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable =
-                new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-                    internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor,
-                    new java.lang.String[] {"NodeIdentifier", "XmlString",});
-            return null;
-          }
-        };
+      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+        public com.google.protobuf.ExtensionRegistry assignDescriptors(
+            com.google.protobuf.Descriptors.FileDescriptor root) {
+          descriptor = root;
+          internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor =
+            getDescriptor().getMessageTypes().get(0);
+          internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor,
+              new java.lang.String[] { "NodeIdentifier", "XmlString", });
+          return null;
+        }
+      };
     com.google.protobuf.Descriptors.FileDescriptor
-        .internalBuildGeneratedFileFrom(descriptorData,
-            new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner);
+      .internalBuildGeneratedFileFrom(descriptorData,
+        new com.google.protobuf.Descriptors.FileDescriptor[] {
+        }, assigner);
   }
 
   // @@protoc_insertion_point(outer_class_scope)
@@ -1,73 +1,64 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: DataChangeListener.proto
 
-package org.opendaylight.controller.cluster.datastore.datachange.notification;
+package org.opendaylight.controller.protobuff.messages.datachange.notification;
 
 public final class DataChangeListenerMessages {
   private DataChangeListenerMessages() {}
-
   public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {}
-
-  public interface DataChangedOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  public interface DataChangedOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
 
     // repeated string instanceIdentifierPathArguments = 1;
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
-    java.util.List<java.lang.String> getInstanceIdentifierPathArgumentsList();
-
+    java.util.List<java.lang.String>
+    getInstanceIdentifierPathArgumentsList();
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
     int getInstanceIdentifierPathArgumentsCount();
-
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
     java.lang.String getInstanceIdentifierPathArguments(int index);
-
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
-    com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes(
-        int index);
+    com.google.protobuf.ByteString
+        getInstanceIdentifierPathArgumentsBytes(int index);
 
     // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;
     /**
      * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
      */
     boolean hasNormalizedNodeXml();
-
     /**
      * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
      */
-    org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml();
-
+    org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml();
     /**
      * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
      */
-    org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder();
+    org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder();
   }
   /**
    * Protobuf type {@code org.opendaylight.controller.mdsal.DataChanged}
    */
   public static final class DataChanged extends
-      com.google.protobuf.GeneratedMessage implements DataChangedOrBuilder {
+      com.google.protobuf.GeneratedMessage
+      implements DataChangedOrBuilder {
     // Use DataChanged.newBuilder() to construct.
     private DataChanged(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
       this.unknownFields = builder.getUnknownFields();
     }
-
-    private DataChanged(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
+    private DataChanged(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 
     private static final DataChanged defaultInstance;
-
     public static DataChanged getDefaultInstance() {
       return defaultInstance;
     }
@@ -77,13 +68,13 @@ public final class DataChangeListenerMessages {
     }
 
     private final com.google.protobuf.UnknownFieldSet unknownFields;
-
     @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
       return this.unknownFields;
     }
-
-    private DataChanged(com.google.protobuf.CodedInputStream input,
+    private DataChanged(
+        com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       initFields();
@@ -99,32 +90,26 @@ public final class DataChangeListenerMessages {
               done = true;
               break;
             default: {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry,
-                  tag)) {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
                 done = true;
               }
               break;
             }
             case 10: {
               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-                instanceIdentifierPathArguments_ =
-                    new com.google.protobuf.LazyStringArrayList();
+                instanceIdentifierPathArguments_ = new com.google.protobuf.LazyStringArrayList();
                 mutable_bitField0_ |= 0x00000001;
               }
               instanceIdentifierPathArguments_.add(input.readBytes());
               break;
             }
             case 18: {
-              org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder subBuilder =
-                  null;
+              org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder subBuilder = null;
               if (((bitField0_ & 0x00000001) == 0x00000001)) {
                 subBuilder = normalizedNodeXml_.toBuilder();
               }
-              normalizedNodeXml_ =
-                  input
-                      .readMessage(
-                          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.PARSER,
-                          extensionRegistry);
+              normalizedNodeXml_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.PARSER, extensionRegistry);
               if (subBuilder != null) {
                 subBuilder.mergeFrom(normalizedNodeXml_);
                 normalizedNodeXml_ = subBuilder.buildPartial();
@@ -141,35 +126,33 @@ public final class DataChangeListenerMessages {
             e.getMessage()).setUnfinishedMessage(this);
       } finally {
         if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
-          instanceIdentifierPathArguments_ =
-              new com.google.protobuf.UnmodifiableLazyStringList(
-                  instanceIdentifierPathArguments_);
+          instanceIdentifierPathArguments_ = new com.google.protobuf.UnmodifiableLazyStringList(instanceIdentifierPathArguments_);
         }
         this.unknownFields = unknownFields.build();
         makeExtensionsImmutable();
       }
     }
-
-    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor;
     }
 
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-      return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.class,
-              org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.Builder.class);
+              org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.class, org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.Builder.class);
     }
 
     public static com.google.protobuf.Parser<DataChanged> PARSER =
         new com.google.protobuf.AbstractParser<DataChanged>() {
-          public DataChanged parsePartialFrom(
-              com.google.protobuf.CodedInputStream input,
-              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-              throws com.google.protobuf.InvalidProtocolBufferException {
-            return new DataChanged(input, extensionRegistry);
-          }
-        };
+      public DataChanged parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new DataChanged(input, extensionRegistry);
+      }
+    };
 
     @java.lang.Override
     public com.google.protobuf.Parser<DataChanged> getParserForType() {
@@ -180,75 +163,63 @@ public final class DataChangeListenerMessages {
     // repeated string instanceIdentifierPathArguments = 1;
     public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1;
     private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_;
-
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
-    public java.util.List<java.lang.String> getInstanceIdentifierPathArgumentsList() {
+    public java.util.List<java.lang.String>
+        getInstanceIdentifierPathArgumentsList() {
       return instanceIdentifierPathArguments_;
     }
-
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
     public int getInstanceIdentifierPathArgumentsCount() {
       return instanceIdentifierPathArguments_.size();
     }
-
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
     public java.lang.String getInstanceIdentifierPathArguments(int index) {
       return instanceIdentifierPathArguments_.get(index);
     }
-
     /**
      * <code>repeated string instanceIdentifierPathArguments = 1;</code>
      */
-    public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes(
-        int index) {
+    public com.google.protobuf.ByteString
+        getInstanceIdentifierPathArgumentsBytes(int index) {
       return instanceIdentifierPathArguments_.getByteString(index);
     }
 
     // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;
     public static final int NORMALIZEDNODEXML_FIELD_NUMBER = 2;
-    private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_;
-
+    private org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_;
     /**
      * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
      */
     public boolean hasNormalizedNodeXml() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
-
     /**
      * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
      */
-    public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() {
+    public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() {
       return normalizedNodeXml_;
     }
-
     /**
      * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
      */
-    public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() {
+    public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() {
       return normalizedNodeXml_;
     }
 
     private void initFields() {
-      instanceIdentifierPathArguments_ =
-          com.google.protobuf.LazyStringArrayList.EMPTY;
-      normalizedNodeXml_ =
-          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-              .getDefaultInstance();
+      instanceIdentifierPathArguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
     }
-
     private byte memoizedIsInitialized = -1;
-
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1)
-        return isInitialized == 1;
+      if (isInitialized != -1) return isInitialized == 1;
 
       if (!hasNormalizedNodeXml()) {
         memoizedIsInitialized = 0;
@@ -263,7 +234,7 @@ public final class DataChangeListenerMessages {
     }
 
     public void writeTo(com.google.protobuf.CodedOutputStream output)
-        throws java.io.IOException {
+                        throws java.io.IOException {
       getSerializedSize();
       for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) {
         output.writeBytes(1, instanceIdentifierPathArguments_.getByteString(i));
@@ -275,28 +246,23 @@ public final class DataChangeListenerMessages {
     }
 
     private int memoizedSerializedSize = -1;
-
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
-      if (size != -1)
-        return size;
+      if (size != -1) return size;
 
       size = 0;
       {
         int dataSize = 0;
         for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) {
-          dataSize +=
-              com.google.protobuf.CodedOutputStream
-                  .computeBytesSizeNoTag(instanceIdentifierPathArguments_
-                      .getByteString(i));
+          dataSize += com.google.protobuf.CodedOutputStream
+            .computeBytesSizeNoTag(instanceIdentifierPathArguments_.getByteString(i));
         }
         size += dataSize;
         size += 1 * getInstanceIdentifierPathArgumentsList().size();
       }
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        size +=
-            com.google.protobuf.CodedOutputStream.computeMessageSize(2,
-                normalizedNodeXml_);
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(2, normalizedNodeXml_);
       }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
@@ -304,89 +270,71 @@ public final class DataChangeListenerMessages {
     }
 
     private static final long serialVersionUID = 0L;
-
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
 
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
-        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
-        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
-        java.io.InputStream input) throws java.io.IOException {
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
       return PARSER.parseFrom(input);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return PARSER.parseFrom(input, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseDelimitedFrom(
-        java.io.InputStream input) throws java.io.IOException {
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
       return PARSER.parseDelimitedFrom(input);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseDelimitedFrom(
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
-        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
       return PARSER.parseFrom(input);
     }
-
-    public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
+    public static org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return PARSER.parseFrom(input, extensionRegistry);
     }
 
-    public static Builder newBuilder() {
-      return Builder.create();
-    }
-
-    public Builder newBuilderForType() {
-      return newBuilder();
-    }
-
-    public static Builder newBuilder(
-        org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged prototype) {
+    public static Builder newBuilder() { return Builder.create(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged prototype) {
       return newBuilder().mergeFrom(prototype);
     }
-
-    public Builder toBuilder() {
-      return newBuilder(this);
-    }
+    public Builder toBuilder() { return newBuilder(this); }
 
     @java.lang.Override
     protected Builder newBuilderForType(
@@ -394,55 +342,49 @@ public final class DataChangeListenerMessages {
       Builder builder = new Builder(parent);
       return builder;
     }
-
     /**
      * Protobuf type {@code org.opendaylight.controller.mdsal.DataChanged}
      */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessage.Builder<Builder>
-        implements
-        org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-        return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor;
+       implements org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChangedOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor;
       }
 
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
-        return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.class,
-                org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.Builder.class);
+                org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.class, org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.Builder.class);
       }
 
-      // Construct using
-      // org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.newBuilder()
+      // Construct using org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
 
-      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
         maybeForceBuilderInitialization();
       }
-
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
           getNormalizedNodeXmlFieldBuilder();
         }
       }
-
       private static Builder create() {
         return new Builder();
       }
 
       public Builder clear() {
         super.clear();
-        instanceIdentifierPathArguments_ =
-            com.google.protobuf.LazyStringArrayList.EMPTY;
+        instanceIdentifierPathArguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
         bitField0_ = (bitField0_ & ~0x00000001);
         if (normalizedNodeXmlBuilder_ == null) {
-          normalizedNodeXml_ =
-              org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-                  .getDefaultInstance();
+          normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
         } else {
           normalizedNodeXmlBuilder_.clear();
         }
@@ -454,38 +396,33 @@ public final class DataChangeListenerMessages {
         return create().mergeFrom(buildPartial());
       }
 
-      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-        return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor;
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor;
       }
 
-      public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged getDefaultInstanceForType() {
-        return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged
-            .getDefaultInstance();
+      public org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged getDefaultInstanceForType() {
+        return org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.getDefaultInstance();
       }
 
-      public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged build() {
-        org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged result =
-            buildPartial();
+      public org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged build() {
+        org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged result = buildPartial();
         if (!result.isInitialized()) {
           throw newUninitializedMessageException(result);
         }
         return result;
       }
 
-      public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged buildPartial() {
-        org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged result =
-            new org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged(
-                this);
+      public org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged buildPartial() {
+        org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged result = new org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged(this);
         int from_bitField0_ = bitField0_;
         int to_bitField0_ = 0;
         if (((bitField0_ & 0x00000001) == 0x00000001)) {
-          instanceIdentifierPathArguments_ =
-              new com.google.protobuf.UnmodifiableLazyStringList(
-                  instanceIdentifierPathArguments_);
+          instanceIdentifierPathArguments_ = new com.google.protobuf.UnmodifiableLazyStringList(
+              instanceIdentifierPathArguments_);
           bitField0_ = (bitField0_ & ~0x00000001);
         }
-        result.instanceIdentifierPathArguments_ =
-            instanceIdentifierPathArguments_;
+        result.instanceIdentifierPathArguments_ = instanceIdentifierPathArguments_;
         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
           to_bitField0_ |= 0x00000001;
         }
@@ -500,28 +437,23 @@ public final class DataChangeListenerMessages {
       }
 
       public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged) {
-          return mergeFrom((org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged) other);
+        if (other instanceof org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged) {
+          return mergeFrom((org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged)other);
         } else {
           super.mergeFrom(other);
           return this;
         }
       }
 
-      public Builder mergeFrom(
-          org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged other) {
-        if (other == org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged
-            .getDefaultInstance())
-          return this;
+      public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged other) {
+        if (other == org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged.getDefaultInstance()) return this;
         if (!other.instanceIdentifierPathArguments_.isEmpty()) {
           if (instanceIdentifierPathArguments_.isEmpty()) {
-            instanceIdentifierPathArguments_ =
-                other.instanceIdentifierPathArguments_;
+            instanceIdentifierPathArguments_ = other.instanceIdentifierPathArguments_;
             bitField0_ = (bitField0_ & ~0x00000001);
           } else {
             ensureInstanceIdentifierPathArgumentsIsMutable();
-            instanceIdentifierPathArguments_
-                .addAll(other.instanceIdentifierPathArguments_);
+            instanceIdentifierPathArguments_.addAll(other.instanceIdentifierPathArguments_);
           }
           onChanged();
         }
@@ -544,17 +476,15 @@ public final class DataChangeListenerMessages {
         return true;
       }
 
-      public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parsedMessage =
-            null;
+        org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged parsedMessage = null;
         try {
           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage =
-              (org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged) e
-                  .getUnfinishedMessage();
+          parsedMessage = (org.opendaylight.controller.protobuff.messages.datachange.notification.DataChangeListenerMessages.DataChanged) e.getUnfinishedMessage();
           throw e;
         } finally {
           if (parsedMessage != null) {
@@ -563,79 +493,68 @@ public final class DataChangeListenerMessages {
         }
         return this;
       }
-
       private int bitField0_;
 
       // repeated string instanceIdentifierPathArguments = 1;
-      private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_ =
-          com.google.protobuf.LazyStringArrayList.EMPTY;
-
+      private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
       private void ensureInstanceIdentifierPathArgumentsIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
-          instanceIdentifierPathArguments_ =
-              new com.google.protobuf.LazyStringArrayList(
-                  instanceIdentifierPathArguments_);
+          instanceIdentifierPathArguments_ = new com.google.protobuf.LazyStringArrayList(instanceIdentifierPathArguments_);
           bitField0_ |= 0x00000001;
-        }
+         }
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
-      public java.util.List<java.lang.String> getInstanceIdentifierPathArgumentsList() {
-        return java.util.Collections
-            .unmodifiableList(instanceIdentifierPathArguments_);
+      public java.util.List<java.lang.String>
+          getInstanceIdentifierPathArgumentsList() {
+        return java.util.Collections.unmodifiableList(instanceIdentifierPathArguments_);
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
       public int getInstanceIdentifierPathArgumentsCount() {
         return instanceIdentifierPathArguments_.size();
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
       public java.lang.String getInstanceIdentifierPathArguments(int index) {
         return instanceIdentifierPathArguments_.get(index);
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
-      public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes(
-          int index) {
+      public com.google.protobuf.ByteString
+          getInstanceIdentifierPathArgumentsBytes(int index) {
         return instanceIdentifierPathArguments_.getByteString(index);
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
-      public Builder setInstanceIdentifierPathArguments(int index,
-          java.lang.String value) {
+      public Builder setInstanceIdentifierPathArguments(
+          int index, java.lang.String value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureInstanceIdentifierPathArgumentsIsMutable();
+    throw new NullPointerException();
+  }
+  ensureInstanceIdentifierPathArgumentsIsMutable();
         instanceIdentifierPathArguments_.set(index, value);
         onChanged();
         return this;
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
-      public Builder addInstanceIdentifierPathArguments(java.lang.String value) {
+      public Builder addInstanceIdentifierPathArguments(
+          java.lang.String value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureInstanceIdentifierPathArgumentsIsMutable();
+    throw new NullPointerException();
+  }
+  ensureInstanceIdentifierPathArgumentsIsMutable();
         instanceIdentifierPathArguments_.add(value);
         onChanged();
         return this;
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
@@ -646,61 +565,53 @@ public final class DataChangeListenerMessages {
         onChanged();
         return this;
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
       public Builder clearInstanceIdentifierPathArguments() {
-        instanceIdentifierPathArguments_ =
-            com.google.protobuf.LazyStringArrayList.EMPTY;
+        instanceIdentifierPathArguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
         bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
-
       /**
        * <code>repeated string instanceIdentifierPathArguments = 1;</code>
        */
       public Builder addInstanceIdentifierPathArgumentsBytes(
           com.google.protobuf.ByteString value) {
         if (value == null) {
-          throw new NullPointerException();
-        }
-        ensureInstanceIdentifierPathArgumentsIsMutable();
+    throw new NullPointerException();
+  }
+  ensureInstanceIdentifierPathArgumentsIsMutable();
         instanceIdentifierPathArguments_.add(value);
         onChanged();
         return this;
       }
 
       // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;
-      private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_ =
-          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-              .getDefaultInstance();
-      private com.google.protobuf.SingleFieldBuilder<org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder> normalizedNodeXmlBuilder_;
-
+      private org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder> normalizedNodeXmlBuilder_;
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
       public boolean hasNormalizedNodeXml() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
-      public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() {
+      public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() {
         if (normalizedNodeXmlBuilder_ == null) {
           return normalizedNodeXml_;
         } else {
           return normalizedNodeXmlBuilder_.getMessage();
         }
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
-      public Builder setNormalizedNodeXml(
-          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) {
+      public Builder setNormalizedNodeXml(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) {
         if (normalizedNodeXmlBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -713,12 +624,11 @@ public final class DataChangeListenerMessages {
         bitField0_ |= 0x00000002;
         return this;
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
       public Builder setNormalizedNodeXml(
-          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builderForValue) {
+          org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builderForValue) {
         if (normalizedNodeXmlBuilder_ == null) {
           normalizedNodeXml_ = builderForValue.build();
           onChanged();
@@ -728,20 +638,15 @@ public final class DataChangeListenerMessages {
         bitField0_ |= 0x00000002;
         return this;
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
-      public Builder mergeNormalizedNodeXml(
-          org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) {
+      public Builder mergeNormalizedNodeXml(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) {
         if (normalizedNodeXmlBuilder_ == null) {
-          if (((bitField0_ & 0x00000002) == 0x00000002)
-              && normalizedNodeXml_ != org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-                  .getDefaultInstance()) {
+          if (((bitField0_ & 0x00000002) == 0x00000002) &&
+              normalizedNodeXml_ != org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance()) {
             normalizedNodeXml_ =
-                org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-                    .newBuilder(normalizedNodeXml_).mergeFrom(value)
-                    .buildPartial();
+              org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder(normalizedNodeXml_).mergeFrom(value).buildPartial();
           } else {
             normalizedNodeXml_ = value;
           }
@@ -752,15 +657,12 @@ public final class DataChangeListenerMessages {
         bitField0_ |= 0x00000002;
         return this;
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
       public Builder clearNormalizedNodeXml() {
         if (normalizedNodeXmlBuilder_ == null) {
-          normalizedNodeXml_ =
-              org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml
-                  .getDefaultInstance();
+          normalizedNodeXml_ = org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance();
           onChanged();
         } else {
           normalizedNodeXmlBuilder_.clear();
@@ -768,35 +670,36 @@ public final class DataChangeListenerMessages {
         bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
-      public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder getNormalizedNodeXmlBuilder() {
+      public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder getNormalizedNodeXmlBuilder() {
         bitField0_ |= 0x00000002;
         onChanged();
         return getNormalizedNodeXmlFieldBuilder().getBuilder();
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
-      public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() {
+      public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() {
         if (normalizedNodeXmlBuilder_ != null) {
           return normalizedNodeXmlBuilder_.getMessageOrBuilder();
         } else {
           return normalizedNodeXml_;
         }
       }
-
       /**
        * <code>required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2;</code>
        */
-      private com.google.protobuf.SingleFieldBuilder<org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder> getNormalizedNodeXmlFieldBuilder() {
+      private com.google.protobuf.SingleFieldBuilder<
+          org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder>
+          getNormalizedNodeXmlFieldBuilder() {
         if (normalizedNodeXmlBuilder_ == null) {
-          normalizedNodeXmlBuilder_ =
-              new com.google.protobuf.SingleFieldBuilder<org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder>(
-                  normalizedNodeXml_, getParentForChildren(), isClean());
+          normalizedNodeXmlBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder>(
+                  normalizedNodeXml_,
+                  getParentForChildren(),
+                  isClean());
           normalizedNodeXml_ = null;
         }
         return normalizedNodeXmlBuilder_;
@@ -813,28 +716,23 @@ public final class DataChangeListenerMessages {
     // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DataChanged)
   }
 
-  public interface DataChangedReplyOrBuilder extends
-      com.google.protobuf.MessageOrBuilder {
+  public interface DataChangedReplyOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
   }
   /**
    * Protobuf type {@code org.opendaylight.controller.mdsal.DataChangedReply}
    */
   public static final class DataChangedReply extends
-      com.google.protobuf.GeneratedMessage implements DataChangedReplyOrBuilder {
+      com.google.protobuf.GeneratedMessage
+      implements DataChangedReplyOrBuilder {
     // Use DataChangedReply.newBuilder() to construct.
-    private DataChangedReply(
-        com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+    private DataChangedReply(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
       this.unknownFields = builder.getUnknownFields();
     }
-
-    private DataChangedReply(boolean noInit) {
-      this.unknownFields =
-          com.google.protobuf.UnknownFieldSet.getDefaultInstance();
-    }
+    private DataChangedReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 
     private static final DataChangedReply defaultInstance;
-
     public static DataChangedReply getDefaultInstance() {
       return defaultInstance;
     }
@@ -844,13 +742,13 @@ public final class DataChangeListenerMessages {
     }
 
     private final com.google.protobuf.UnknownFieldSet unknownFields;
-
     @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
       return this.unknownFields;
     }
-
-