Integration test added to netconf-it to test identity (de)serialization. 37/5437/1
authorMaros Marsalek <mmarsale@cisco.com>
Fri, 21 Feb 2014 10:48:44 +0000 (11:48 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Fri, 21 Feb 2014 11:26:47 +0000 (12:26 +0100)
Change-Id: I637011107edea916aaab35e8d2298bbbbabed653
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/IdentityTestModule.java
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/IdentityTestModuleStub.txt
opendaylight/md-sal/sal-binding-it/pom.xml
opendaylight/netconf/netconf-it/pom.xml
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java [new file with mode: 0644]
opendaylight/netconf/netconf-it/src/test/resources/controller.xml [new file with mode: 0644]
opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/commit.xml [new file with mode: 0644]
opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/editConfig_identities.xml [new file with mode: 0644]
opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/getConfig.xml [new file with mode: 0644]

index b000f11..398bba9 100644 (file)
@@ -31,15 +31,16 @@ public final class IdentityTestModule extends org.opendaylight.controller.config
 
     @Override
     public java.lang.AutoCloseable createInstance() {
-        System.err.println(getAfi());
-        System.err.println(getAfiIdentity());
+        org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(getClass());
+        logger.info("Afi: {}", getAfi());
+        logger.info("Afi class: {}", getAfiIdentity());
 
-        getAfiIdentity();
         for (Identities identities : getIdentities()) {
-            identities.resolveAfi();
-            identities.resolveSafi();
+            logger.info("Identities Afi class: {}", identities.resolveAfi());
+            logger.info("Identities Safi class: {}", identities.resolveSafi());
+
         }
-        getIdentitiesContainer().resolveAfi();
+        logger.info("IdentityContainer Afi class: {}", getIdentitiesContainer().resolveAfi());
 
         return new AutoCloseable() {
             @Override
index a81159e..7fa0c10 100644 (file)
@@ -1,12 +1,13 @@
-        System.err.println(getAfi());
-        System.err.println(getAfiIdentity());
+        org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(getClass());
+        logger.info("Afi: {}", getAfi());
+        logger.info("Afi class: {}", getAfiIdentity());
 
-        getAfiIdentity();
         for (Identities identities : getIdentities()) {
-            identities.resolveAfi();
-            identities.resolveSafi();
+            logger.info("Identities Afi class: {}", identities.resolveAfi());
+            logger.info("Identities Safi class: {}", identities.resolveSafi());
+
         }
-        getIdentitiesContainer().resolveAfi();
+        logger.info("IdentityContainer Afi class: {}", getIdentitiesContainer().resolveAfi());
 
         return new AutoCloseable() {
             @Override
index 9bc8a48..213e4f4 100644 (file)
 
 
     <dependencies>
+        <!--Compile scopes for all testing dependencies are intentional-->
+        <!--This way, all testing dependencies can be transitively used by other integration test modules-->
+        <!--If the dependencies are test scoped, they are not visible to other maven modules depending on sal-binding-it-->
 
+        <!--TODO Create generic utilities(extract from this module) for integration tests on the controller-->
         <dependency>
             <groupId>org.opendaylight.yangtools.thirdparty</groupId>
             <artifactId>xtend-lib-osgi</artifactId>
             <version>2.4.3</version>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>sal-binding-broker-impl</artifactId>
-            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
             <artifactId>pax-exam-container-native</artifactId>
-            <scope>test</scope>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
             <artifactId>pax-exam-junit4</artifactId>
-            <scope>test</scope>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>config-netconf-connector</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
             <artifactId>pax-exam-link-mvn</artifactId>
-            <scope>test</scope>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>equinoxSDK381</groupId>
             <artifactId>org.eclipse.osgi</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller.model</groupId>
index 9b0c7ab..388e3f7 100644 (file)
             <artifactId>yang-store-api</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>yang-test</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>netconf-api</artifactId>
             <artifactId>netconf-monitoring</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>sal-binding-it</artifactId>
+            <version>${mdsal.version}</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>netconf-mapping-api</artifactId>
             <scope>test</scope>
             <type>test-jar</type>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>yang-test</artifactId>
+            <version>${config.version}</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>yang-store-impl</artifactId>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>maven-paxexam-plugin</artifactId>
+                <version>1.2.4</version>
+                <executions>
+                    <execution>
+                        <id>generate-config</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/pax/IdentityRefNetconfTest.java
new file mode 100644 (file)
index 0000000..4e536c4
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2013 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.netconf.it.pax;
+
+import static org.opendaylight.controller.test.sal.binding.it.TestHelper.baseModelBundles;
+import static org.opendaylight.controller.test.sal.binding.it.TestHelper.bindingAwareSalBundles;
+import static org.opendaylight.controller.test.sal.binding.it.TestHelper.configMinumumBundles;
+import static org.opendaylight.controller.test.sal.binding.it.TestHelper.flowCapableModelBundles;
+import static org.opendaylight.controller.test.sal.binding.it.TestHelper.junitAndMockitoBundles;
+import static org.opendaylight.controller.test.sal.binding.it.TestHelper.mdSalCoreBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+
+import javax.inject.Inject;
+import javax.xml.parsers.ParserConfigurationException;
+
+import com.google.common.base.Preconditions;
+import io.netty.channel.nio.NioEventLoopGroup;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.matchers.JUnitMatchers;
+import org.junit.runner.RunWith;
+import org.opendaylight.controller.netconf.api.NetconfMessage;
+import org.opendaylight.controller.netconf.client.NetconfClient;
+import org.opendaylight.controller.netconf.client.NetconfClientDispatcher;
+import org.opendaylight.controller.netconf.util.xml.XmlUtil;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.options.DefaultCompositeOption;
+import org.ops4j.pax.exam.util.Filter;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeoutException;
+
+@RunWith(PaxExam.class)
+public class IdentityRefNetconfTest {
+
+    public static final int CLIENT_CONNECTION_TIMEOUT_MILLIS = 5000;
+
+    // Wait for controller to start
+    @Inject
+    @Filter(timeout = 60 * 1000)
+    BindingAwareBroker broker;
+
+    @Configuration
+    public Option[] config() {
+        return options(
+                systemProperty("osgi.console").value("2401"),
+                systemProperty("osgi.bundles.defaultStartLevel").value("4"),
+                systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
+
+                testingModules(),
+                loggingModules(),
+                mdSalCoreBundles(),
+                bindingAwareSalBundles(), configMinumumBundles(), baseModelBundles(), flowCapableModelBundles(),
+                junitAndMockitoBundles());
+    }
+
+    private Option loggingModules() {
+        return new DefaultCompositeOption(
+                mavenBundle("org.slf4j", "slf4j-api").versionAsInProject(),
+                mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(),
+                mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(),
+                mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject());
+    }
+
+    private Option testingModules() {
+        return new DefaultCompositeOption(
+                mavenBundle("org.opendaylight.controller", "yang-test").versionAsInProject());
+    }
+
+    private static final InetSocketAddress tcpAddress = new InetSocketAddress("127.0.0.1", 18383);
+
+    @Test
+    public void testIdRef() throws Exception {
+        Preconditions.checkNotNull(broker, "Controller not initialized");
+
+        NioEventLoopGroup nettyThreadgroup = new NioEventLoopGroup();
+        NetconfClientDispatcher clientDispatcher = new NetconfClientDispatcher(nettyThreadgroup, nettyThreadgroup,
+                CLIENT_CONNECTION_TIMEOUT_MILLIS);
+
+        NetconfMessage edit = xmlFileToNetconfMessage("netconfMessages/editConfig_identities.xml");
+        NetconfMessage commit = xmlFileToNetconfMessage("netconfMessages/commit.xml");
+        NetconfMessage getConfig = xmlFileToNetconfMessage("netconfMessages/getConfig.xml");
+
+        try (NetconfClient netconfClient = new NetconfClient("client", tcpAddress, CLIENT_CONNECTION_TIMEOUT_MILLIS, clientDispatcher)) {
+            sendMessage(edit, netconfClient);
+            sendMessage(commit, netconfClient);
+            sendMessage(getConfig, netconfClient, "id-test",
+                    "<afi xmlns:prefix=\"urn:opendaylight:params:xml:ns:yang:controller:config:test:types\">prefix:test-identity1</afi>",
+                    "<afi xmlns:prefix=\"urn:opendaylight:params:xml:ns:yang:controller:config:test:types\">prefix:test-identity2</afi>",
+                    "<safi xmlns:prefix=\"urn:opendaylight:params:xml:ns:yang:controller:config:test:types\">prefix:test-identity2</safi>",
+                    "<safi xmlns:prefix=\"urn:opendaylight:params:xml:ns:yang:controller:config:test:types\">prefix:test-identity1</safi>");
+        }
+
+        clientDispatcher.close();
+    }
+
+    private void sendMessage(NetconfMessage edit, NetconfClient netconfClient, String... containingResponse)
+            throws ExecutionException, InterruptedException, TimeoutException {
+        NetconfMessage response = netconfClient.sendRequest(edit).get();
+        if (containingResponse == null) {
+            Assert.assertThat(XmlUtil.toString(response.getDocument()), JUnitMatchers.containsString("<ok/>"));
+        } else {
+            for (String resp : containingResponse) {
+                Assert.assertThat(XmlUtil.toString(response.getDocument()), JUnitMatchers.containsString(resp));
+            }
+        }
+    }
+
+    public static NetconfMessage xmlFileToNetconfMessage(final String fileName) throws IOException, SAXException,
+            ParserConfigurationException {
+        return new NetconfMessage(xmlFileToDocument(fileName));
+    }
+
+    public static Document xmlFileToDocument(final String fileName) throws IOException, SAXException,
+            ParserConfigurationException {
+        // TODO xml messages from netconf-util test-jar cannot be loaded here(in OSGi), since test jar is not a bundle
+        try (InputStream resourceAsStream = IdentityRefNetconfTest.class.getClassLoader().getResourceAsStream(fileName)) {
+            Preconditions.checkNotNull(resourceAsStream);
+            final Document doc = XmlUtil.readXmlToDocument(resourceAsStream);
+            return doc;
+        }
+    }
+}
diff --git a/opendaylight/netconf/netconf-it/src/test/resources/controller.xml b/opendaylight/netconf/netconf-it/src/test/resources/controller.xml
new file mode 100644 (file)
index 0000000..664a30d
--- /dev/null
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persisted-snapshots>
+   <snapshots>
+      <snapshot>
+         <required-capabilities>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:config:test:types?module=test-types&amp;revision=2013-11-27</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:config?module=config&amp;revision=2013-04-05</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:logback:config?module=config-logging&amp;revision=2013-07-16</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?module=opendaylight-sal-binding-broker-impl&amp;revision=2013-10-28</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&amp;revision=2013-10-28</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&amp;revision=2013-10-28</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:test:impl?module=config-test-impl&amp;revision=2013-04-03</capability>
+            <capability>urn:opendaylight:params:xml:ns:yang:controller:test?module=config-test&amp;revision=2013-06-13</capability>
+         </required-capabilities>
+         <configuration>
+            <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+               <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test:impl">prefix:impl-identity-test</type>
+                     <name>id-test</name>
+                     <identities-container xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+                        <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity2</afi>
+                     </identities-container>
+                     <identities xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+                        <safi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity2</safi>
+                        <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity1</afi>
+                     </identities>
+                     <identities xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+                        <safi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity1</safi>
+                        <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity2</afi>
+                     </identities>
+                     <afi xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl" xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity1</afi>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-broker-impl</type>
+                     <name>binding-broker-impl</name>
+                     <notification-service xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-notification-service</type>
+                        <name>ref_binding-notification-broker</name>
+                     </notification-service>
+                     <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-data-broker</type>
+                        <name>ref_binding-data-broker</name>
+                     </data-broker>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:runtime-generated-mapping</type>
+                     <name>runtime-mapping-singleton</name>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-notification-broker</type>
+                     <name>binding-notification-broker</name>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-data-broker</type>
+                     <name>binding-data-broker</name>
+                     <dom-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
+                        <name>ref_dom-broker</name>
+                     </dom-broker>
+                     <mapping-service xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
+                        <name>ref_runtime-mapping-singleton</name>
+                     </mapping-service>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:logback:config">prefix:logback</type>
+                     <name>singleton</name>
+                     <console-appenders xmlns="urn:opendaylight:params:xml:ns:yang:controller:logback:config">
+                        <threshold-filter>DEBUG</threshold-filter>
+                        <name>console</name>
+                        <encoder-pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</encoder-pattern>
+                     </console-appenders>
+                     <loggers xmlns="urn:opendaylight:params:xml:ns:yang:controller:logback:config">
+                        <level>DEBUG</level>
+                        <logger-name>ROOT</logger-name>
+                        <appenders>console</appenders>
+                     </loggers>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:schema-service-singleton</type>
+                     <name>yang-schema-service</name>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:hash-map-data-store</type>
+                     <name>hash-map-data-store</name>
+                  </module>
+                  <module>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-broker-impl</type>
+                     <name>dom-broker</name>
+                     <data-store xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">
+                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-data-store</type>
+                        <name>ref_hash-map-data-store</name>
+                     </data-store>
+                  </module>
+               </modules>
+               <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:schema-service</type>
+                     <instance>
+                        <name>ref_yang-schema-service</name>
+                        <provider>/modules/module[type='schema-service-singleton'][name='yang-schema-service']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-data-store</type>
+                     <instance>
+                        <name>ref_hash-map-data-store</name>
+                        <provider>/modules/module[type='hash-map-data-store'][name='hash-map-data-store']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
+                     <instance>
+                        <name>ref_dom-broker</name>
+                        <provider>/modules/module[type='dom-broker-impl'][name='dom-broker']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+                     <instance>
+                        <name>ref_id-test</name>
+                        <provider>/modules/module[type='impl-identity-test'][name='id-test']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
+                     <instance>
+                        <name>ref_runtime-mapping-singleton</name>
+                        <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-data-consumer-broker</type>
+                     <instance>
+                        <name>ref_binding-data-broker</name>
+                        <provider>/modules/module[type='binding-data-broker'][name='binding-data-broker']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-rpc-registry</type>
+                     <instance>
+                        <name>ref_binding-broker-impl</name>
+                        <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-notification-service</type>
+                     <instance>
+                        <name>ref_binding-notification-broker</name>
+                        <provider>/modules/module[type='binding-notification-broker'][name='binding-notification-broker']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-broker-osgi-registry</type>
+                     <instance>
+                        <name>ref_binding-broker-impl</name>
+                        <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-notification-subscription-service</type>
+                     <instance>
+                        <name>ref_binding-notification-broker</name>
+                        <provider>/modules/module[type='binding-notification-broker'][name='binding-notification-broker']</provider>
+                     </instance>
+                  </service>
+                  <service>
+                     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-data-broker</type>
+                     <instance>
+                        <name>ref_binding-data-broker</name>
+                        <provider>/modules/module[type='binding-data-broker'][name='binding-data-broker']</provider>
+                     </instance>
+                  </service>
+               </services>
+            </data>
+         </configuration>
+      </snapshot>
+   </snapshots>
+</persisted-snapshots>
diff --git a/opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/commit.xml b/opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/commit.xml
new file mode 100644 (file)
index 0000000..ffdf132
--- /dev/null
@@ -0,0 +1,3 @@
+<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
+    <commit></commit>
+</rpc>
diff --git a/opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/editConfig_identities.xml b/opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/editConfig_identities.xml
new file mode 100644 (file)
index 0000000..cf9f3e5
--- /dev/null
@@ -0,0 +1,37 @@
+<rpc message-id="a" a="64" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+<edit-config>
+    <target>
+        <candidate/>
+    </target>
+    <test-option>
+        set
+    </test-option>
+    <default-operation>merge</default-operation>
+    <config>
+        <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+            <module>
+                <type xmlns:test-impl="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+                    test-impl:impl-identity-test
+                </type>
+                <name>id-test</name>
+                <identities>
+                    <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity1</afi>
+                    <safi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity2</safi>
+                </identities>
+                <identities>
+                    <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity2</afi>
+                    <safi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity1</safi>
+                </identities>
+                <identities-container>
+                    <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity2</afi>
+                </identities-container>
+                <afi xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:test:types">prefix:test-identity1</afi>
+            </module>
+        </modules>
+
+        <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+
+        </services>
+    </config>
+</edit-config>
+</rpc>
diff --git a/opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/getConfig.xml b/opendaylight/netconf/netconf-it/src/test/resources/netconfMessages/getConfig.xml
new file mode 100644 (file)
index 0000000..39efb49
--- /dev/null
@@ -0,0 +1,7 @@
+<rpc id="a" a="64" xmlnx="a:b:c:d" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
+    <get-config>
+        <source>
+            <running/>
+        </source>
+    </get-config>
+</rpc>