Merge "Bug 8490 - Ignore unstable SSHServerTest" into stable/carbon
authorTomas Cere <tcere@cisco.com>
Wed, 28 Jun 2017 11:41:11 +0000 (11:41 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 28 Jun 2017 11:41:11 +0000 (11:41 +0000)
137 files changed:
features/netconf-connector/features-netconf-connector/pom.xml
features/netconf-connector/features4-netconf-connector/pom.xml
features/netconf-connector/odl-message-bus/pom.xml
features/netconf-connector/odl-netconf-callhome-ssh/pom.xml
features/netconf-connector/odl-netconf-clustered-topology/pom.xml
features/netconf-connector/odl-netconf-connector-all/pom.xml
features/netconf-connector/odl-netconf-connector-ssh/pom.xml
features/netconf-connector/odl-netconf-connector/pom.xml
features/netconf-connector/odl-netconf-console/pom.xml
features/netconf-connector/odl-netconf-topology/pom.xml
features/netconf-connector/pom.xml
features/netconf/features-netconf/pom.xml
features/netconf/features4-netconf/pom.xml
features/netconf/odl-aaa-netconf-plugin-no-cluster/pom.xml
features/netconf/odl-aaa-netconf-plugin/pom.xml
features/netconf/odl-config-netconf-connector/pom.xml
features/netconf/odl-netconf-all/pom.xml
features/netconf/odl-netconf-api/pom.xml
features/netconf/odl-netconf-client/pom.xml
features/netconf/odl-netconf-impl/pom.xml
features/netconf/odl-netconf-mapping-api/pom.xml
features/netconf/odl-netconf-mdsal/pom.xml
features/netconf/odl-netconf-monitoring/pom.xml
features/netconf/odl-netconf-netty-util/pom.xml
features/netconf/odl-netconf-notifications-api/pom.xml
features/netconf/odl-netconf-notifications-impl/pom.xml
features/netconf/odl-netconf-ssh/pom.xml
features/netconf/odl-netconf-tcp/pom.xml
features/netconf/odl-netconf-util/pom.xml
features/netconf/pom.xml
features/pom.xml
features/restconf/features-restconf/pom.xml
features/restconf/features4-restconf/pom.xml
features/restconf/odl-mdsal-apidocs/pom.xml
features/restconf/odl-restconf-all/pom.xml
features/restconf/odl-restconf-noauth/pom.xml
features/restconf/odl-restconf/pom.xml
features/restconf/pom.xml
features/yanglib/features-yanglib/pom.xml
features/yanglib/features4-yanglib/pom.xml
features/yanglib/odl-yanglib/pom.xml
features/yanglib/pom.xml
karaf/pom.xml
netconf/aaa-authn-odl-plugin/pom.xml
netconf/callhome-model/pom.xml
netconf/callhome-protocol/pom.xml
netconf/callhome-provider/pom.xml
netconf/config-netconf-connector/pom.xml
netconf/mdsal-netconf-connector/pom.xml
netconf/mdsal-netconf-connector/src/main/java/org/opendaylight/netconf/mdsal/connector/ops/EditConfig.java
netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/NetconfMDSalMappingTest.java
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_container_replace.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_ordered_list_create.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_ordered_list_replace.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_empty_modules_create.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_leaf_from_augment_replace.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_ordered_list_create.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_ordered_list_replace.xml [new file with mode: 0644]
netconf/mdsal-netconf-connector/src/test/resources/yang/mdsal-netconf-mapping-test.yang
netconf/mdsal-netconf-impl/pom.xml
netconf/mdsal-netconf-monitoring/pom.xml
netconf/mdsal-netconf-notification/pom.xml
netconf/mdsal-netconf-ssh/pom.xml
netconf/mdsal-netconf-tcp/pom.xml
netconf/mdsal-netconf-yang-library/pom.xml
netconf/messagebus-netconf/pom.xml
netconf/models/ietf-netconf-monitoring-extension/pom.xml
netconf/models/ietf-netconf-monitoring/pom.xml
netconf/models/ietf-netconf-notifications/pom.xml
netconf/models/ietf-netconf-yang-library/pom.xml
netconf/models/ietf-netconf/pom.xml
netconf/models/pom.xml
netconf/netconf-api/pom.xml
netconf/netconf-artifacts/pom.xml
netconf/netconf-auth/pom.xml
netconf/netconf-client/pom.xml
netconf/netconf-config/pom.xml
netconf/netconf-connector-config/pom.xml
netconf/netconf-console/pom.xml
netconf/netconf-impl/pom.xml
netconf/netconf-it/pom.xml
netconf/netconf-mapping-api/pom.xml
netconf/netconf-monitoring/pom.xml
netconf/netconf-netty-util/pom.xml
netconf/netconf-notifications-api/pom.xml
netconf/netconf-notifications-impl/pom.xml
netconf/netconf-ssh/pom.xml
netconf/netconf-tcp/pom.xml
netconf/netconf-topology-config/pom.xml
netconf/netconf-topology-singleton/pom.xml
netconf/netconf-topology/pom.xml
netconf/netconf-util/pom.xml
netconf/pom.xml
netconf/sal-netconf-connector/pom.xml
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/KeepaliveSalFacade.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/util/NetconfBaseOps.java
netconf/tools/netconf-cli/pom.xml
netconf/tools/netconf-testtool/pom.xml
netconf/tools/pom.xml
netconf/yanglib/pom.xml
pom.xml
restconf/models/ietf-restconf-monitoring/pom.xml
restconf/models/ietf-restconf/pom.xml
restconf/models/ietf-yang-library/pom.xml
restconf/models/pom.xml
restconf/pom.xml
restconf/restconf-artifacts/pom.xml
restconf/sal-rest-connector-config/pom.xml
restconf/sal-rest-connector/pom.xml
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHJsonBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/api/JSONRestconfService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/JSONRestconfServiceImpl.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/RestconfApplication.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/XmlNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/parser/ParserIdentifier.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/AbstractBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/TestXmlBodyReader.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/TestXmlBodyReaderMountPoint.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/JSONRestconfServiceImplTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/AbstractBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/JsonBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/JsonPATCHBodyReaderMountPointTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/JsonPATCHBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/XmlBodyReaderMountPointTest.java [new file with mode: 0644]
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/XmlBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/XmlPATCHBodyReaderMountPointTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/XmlPATCHBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/utils/parser/ParserIdentifierTest.java
restconf/sal-rest-connector/src/test/resources/instanceidentifier/xml/bug7933.xml [new file with mode: 0644]
restconf/sal-rest-connector/src/test/resources/parser-identifier/invoke-rpc-module.yang [new file with mode: 0644]
restconf/sal-rest-docgen-maven/pom.xml
restconf/sal-rest-docgen/pom.xml
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGenerator.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ModelGenerator.java
restconf/sal-restconf-broker/pom.xml

index 9e90e290963f2d5f2befec2052262dfb3e57bca5..ad4345f9a5c027a863989243ffa93fc2f71d5fa5 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>features-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>features-netconf-connector</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <properties>
-    <commons.opendaylight.version>1.8.0-SNAPSHOT</commons.opendaylight.version>
-    <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
-    <config.version>0.6.0-SNAPSHOT</config.version>
-    <features.test.version>1.8.0-SNAPSHOT</features.test.version>
-    <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
-    <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
-    <netconf.version>1.2.0-SNAPSHOT</netconf.version>
-    <netconf.connector.version>1.5.0-SNAPSHOT</netconf.connector.version>
-    <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+    <commons.opendaylight.version>1.8.1-SNAPSHOT</commons.opendaylight.version>
+    <controller.mdsal.version>1.5.1-SNAPSHOT</controller.mdsal.version>
+    <config.version>0.6.1-SNAPSHOT</config.version>
+    <features.test.version>1.8.1-SNAPSHOT</features.test.version>
+    <mdsal.version>2.2.1-SNAPSHOT</mdsal.version>
+    <mdsal.model.version>0.10.1-SNAPSHOT</mdsal.model.version>
+    <netconf.version>1.2.1-SNAPSHOT</netconf.version>
+    <netconf.connector.version>1.5.1-SNAPSHOT</netconf.connector.version>
+    <yangtools.version>1.1.1-SNAPSHOT</yangtools.version>
   </properties>
 
   <dependencyManagement>
@@ -37,7 +37,7 @@
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 32ef0d3783a48a80dbb2f05447068ab7c85a7e9d..1a207c0bc6b1e6ceb05e6f04b57fe30a2e7aa92e 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features4-netconf-connector</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <dependencies>
index 72bb79f28dbaab5724c2792b452a669453d3f606..6314a77de5d2b1c755f64b9d00733a9af4e5e935 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-message-bus</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <!-- messagebus endpoint for netconf connector-->
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-message-bus-collector</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index d66b6ca80efc415f39af9ab46385d79b9df5f600..76fc67fbe221ac5aeed57a5ab7a00961f7eae254 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-callhome-ssh</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Connector :: Netconf Callhome Connector + Netconf SSH Server + loopback connection configuration</name>
index b47b5ef19c588f32639d29a0871f026bfa38306c..8a0cb2567f4dc9bfdbce7359e19d439077b412ba 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-clustered-topology</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Clustered Netconf Topology :: Netconf Connector + Netconf SSH Server</name>
index 83c52e39b41d4aef775d810eadb241f8403ee7cc..ac6a71a489023f6e2475dc81ac1c23a35e6567ae 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-connector-all</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Connector :: All</name>
index 3424bfb2725d38028e1f904edde8298d4489ed35..ad62944699d11c8bba72c689ce05cb95f48fb64c 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-connector-ssh</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Connector :: Netconf Connector + Netconf SSH Server + loopback connection configuration</name>
index 0d6508933a27c60b20201f01eb7d111bd0fbcf9e..09ac36461cd5e2c41c1be933aec83a073a3ad809 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-connector</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Connector :: Netconf Connector</name>
@@ -30,7 +30,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>1.2.0-SNAPSHOT</version>
+                <version>1.2.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
@@ -41,7 +41,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-mdsal-broker</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
@@ -62,7 +62,7 @@
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>odl-mdsal-models</artifactId>
-            <version>0.10.0-SNAPSHOT</version>
+            <version>0.10.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
@@ -77,7 +77,7 @@
         <dependency>
             <groupId>org.opendaylight.controller.model</groupId>
             <artifactId>model-inventory</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
index c8e427d3f29827de93329e8b40617f55e6fcab22..972e4435dfebf1d82f68bbca8b114c4a3f487e06 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-console</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Console + Karaf CLI for netconf CRUD operations</name>
@@ -29,7 +29,7 @@
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>odl-netconf-mdsal</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index ee0a099af74d49530307dcc9035f581c481384d8..ff16238d606746b03e827567a51eff2d4212b76c 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-topology</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Topology :: Netconf Connector + Netconf SSH Server + Netconf configuration via config topology datastore</name>
index 2081582ce359bc8da0e7a897a26b126c5157f644..7cb87b96fc0cffd62967b5e59cc82894ba3b3e4c 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features-netconf-connector-aggregator</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
-      <commons.opendaylight.version>1.8.0-SNAPSHOT</commons.opendaylight.version>
-      <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
-      <config.version>0.6.0-SNAPSHOT</config.version>
-      <features.test.version>1.8.0-SNAPSHOT</features.test.version>
-      <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
-      <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
-      <netconf.version>1.2.0-SNAPSHOT</netconf.version>
-      <netconf.connector.version>1.5.0-SNAPSHOT</netconf.connector.version>
-      <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+      <commons.opendaylight.version>1.8.1-SNAPSHOT</commons.opendaylight.version>
+      <controller.mdsal.version>1.5.1-SNAPSHOT</controller.mdsal.version>
+      <config.version>0.6.1-SNAPSHOT</config.version>
+      <features.test.version>1.8.1-SNAPSHOT</features.test.version>
+      <mdsal.version>2.2.1-SNAPSHOT</mdsal.version>
+      <mdsal.model.version>0.10.1-SNAPSHOT</mdsal.model.version>
+      <netconf.version>1.2.1-SNAPSHOT</netconf.version>
+      <netconf.connector.version>1.5.1-SNAPSHOT</netconf.connector.version>
+      <yangtools.version>1.1.1-SNAPSHOT</yangtools.version>
     </properties>
 
     <modules>
@@ -50,7 +50,7 @@
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index ab170df881914b5ecacdbec59349abb319f48a81..14f5bf7e62d3f7247dd204a6232852f0915fccf2 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>features-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>features-netconf</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <properties>
-    <aaa.version>0.5.0-SNAPSHOT</aaa.version>
-    <commons.opendaylight.version>1.8.0-SNAPSHOT</commons.opendaylight.version>
-    <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
-    <config.version>0.6.0-SNAPSHOT</config.version>
-    <features.test.version>1.8.0-SNAPSHOT</features.test.version>
-    <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
-    <netconf.version>1.2.0-SNAPSHOT</netconf.version>
-    <protocol-framework.version>0.9.0-SNAPSHOT</protocol-framework.version>
-    <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+    <aaa.version>0.5.1-SNAPSHOT</aaa.version>
+    <commons.opendaylight.version>1.8.1-SNAPSHOT</commons.opendaylight.version>
+    <controller.mdsal.version>1.5.1-SNAPSHOT</controller.mdsal.version>
+    <config.version>0.6.1-SNAPSHOT</config.version>
+    <features.test.version>1.8.1-SNAPSHOT</features.test.version>
+    <mdsal.model.version>0.10.1-SNAPSHOT</mdsal.model.version>
+    <netconf.version>1.2.1-SNAPSHOT</netconf.version>
+    <protocol-framework.version>0.9.1-SNAPSHOT</protocol-framework.version>
+    <yangtools.version>1.1.1-SNAPSHOT</yangtools.version>
     <sshd-core.version>0.14.0</sshd-core.version>
   </properties>
 
@@ -45,7 +45,7 @@
       <dependency>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-artifacts</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 040d8099c9369ca8ad68259970c0557d95fe699a..f7137e9627116aaff9a7a5901745d5fb7c9618a3 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features4-netconf</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <dependencies>
@@ -83,7 +83,7 @@
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>odl-netconf-mdsal</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index d04d3a41b59e9b47cffa89df71d7630748027fbf..98b53469bfd259791a5309c18f1416b0e2073034 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-aaa-netconf-plugin-no-cluster</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: AAA :: ODL NETCONF Plugin - NO CLUSTER</name>
@@ -41,7 +41,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-api</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
@@ -52,7 +52,7 @@
         <dependency>
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>odl-aaa-shiro</artifactId>
-            <version>0.5.0-SNAPSHOT</version>
+            <version>0.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 22c3c3952ed055c4388d41b22d9a25e7bf5f0209..d259a7a5c6a2ac7b2d499fea23bc8ed59b16036a 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-aaa-netconf-plugin</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: AAA :: ODL NETCONF Plugin</name>
@@ -29,7 +29,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-api</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
@@ -41,7 +41,7 @@
         <dependency>
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>odl-aaa-shiro</artifactId>
-            <version>0.5.0-SNAPSHOT</version>
+            <version>0.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index b20ead4c50b8253e91fd0903f7090a2ab0f7e025..c62e64f1392424a5963656f02e3b48290f50e687 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-config-netconf-connector</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Connector</name>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>yang-jmx-generator</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>config-manager-facade-xml</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-manager</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
@@ -65,7 +65,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-netty</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 19aa5f3eebc9c44db31d1223d340c09db8c7061b..e5d12522e62893dd7d1900c6cf364814fbeaa7db 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-all</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: All</name>
index 794b07cd9a953b1a69caa93b1ee41abe9be28a96..a8989f22940121bfbb1d462330a49c24813d1300 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-api</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: API</name>
@@ -30,7 +30,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>1.2.0-SNAPSHOT</version>
+                <version>1.2.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-protocol-framework</artifactId>
-            <version>0.9.0-SNAPSHOT</version>
+            <version>0.9.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>odl-yangtools-yang-data</artifactId>
-            <version>1.1.0-SNAPSHOT</version>
+            <version>1.1.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>config-util</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
@@ -88,7 +88,7 @@
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>odl-mdsal-models</artifactId>
-            <version>0.10.0-SNAPSHOT</version>
+            <version>0.10.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 4bbdb6a89636210a363c370e472c82205fe25e71..bd67fc027c5f3d0ad701936ccf559546fd780242 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-client</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <dependencies>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-all</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-netty</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 616ea9e78641390f3c67c9842e85fc4c8be27616..68e8b1056d47f360701d72aeb7b6d6b0ac2cc39a 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-impl</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Impl</name>
@@ -29,7 +29,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>yang-jmx-generator</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
@@ -62,7 +62,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-netty</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
@@ -78,7 +78,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>config-manager-facade-xml</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
index a92bdbe27160e6ff11e8381ec0684633371899dd..584536379816078f91c827d23552d98b07a895fc 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-mapping-api</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Mapping API</name>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>odl-netconf-api</artifactId>
-            <version>1.2.0-SNAPSHOT</version>
+            <version>1.2.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>netconf-mapping-api</artifactId>
-            <version>1.2.0-SNAPSHOT</version>
+            <version>1.2.1-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file
index 81dfb02f62c2682efeb438c0134a7cec643b7baa..f96b000e0b556e5134eaa213599ab06a03e0bc6c 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-mdsal</artifactId>
     <!-- This matches controller -->
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Mdsal</name>
 
     <properties>
-        <netconf.version>1.2.0-SNAPSHOT</netconf.version>
+        <netconf.version>1.2.1-SNAPSHOT</netconf.version>
         <controller.mdsal.version>${project.version}</controller.mdsal.version>
     </properties>
 
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-all</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-netty</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index ecd80259d56e5e2dd85f24b20e51b3d72b8aa18b..0556a51a43a38d147f82cb718f2564d61f809376 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-monitoring</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Monitoring</name>
index 2236c680f2cc3a0822ae0def651906413c9c3933..693b27084f87bfb1827ca31edcb00c24c14e3a3f 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-netty-util</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Netty Util</name>
@@ -58,7 +58,7 @@
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
             <artifactId>odl4-netty-4</artifactId>
-            <version>1.8.0-SNAPSHOT</version>
+            <version>1.8.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 92cc3f201acf82e4a4c8ee9e0122009af042d64c..45e73e410a062e24d083653288d8b4900dc89c9b 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-notifications-api</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Notification :: Api</name>
@@ -29,7 +29,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-manager-facade-xml</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 55df3c9e10887cc91c7665623b1cc1d8067e7e95..5e55c24c22c63f851b6d1b9f1bb963627b47f698 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-notifications-impl</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf :: Monitoring :: Impl</name>
index c0fff3f47008f035dde714a9a031fc815c12be5b..8eb47dc3e4af4c1d02564b4220910669ff1c34db 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-ssh</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Connector :: SSH</name>
index f319749c3928fabd9c05b31503f0362968ebe5ce..e7a98198cca2e1e17a021520c69f37471be63ac8 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-tcp</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Netconf Connector :: TCP</name>
@@ -45,7 +45,7 @@
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-netty</artifactId>
-            <version>0.6.0-SNAPSHOT</version>
+            <version>0.6.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index f65cab9b516bd7360ca7a3c104c3c8395eea6bf3..710d534ee863d8fa8695571537d0d544c03eb6b9 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-netconf-util</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <dependencies>
@@ -34,7 +34,7 @@
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>odl-yangtools-yang-data</artifactId>
-            <version>1.1.0-SNAPSHOT</version>
+            <version>1.1.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index a4540acfee1f8b2e22edd5df976562316d32d50a..c2ec9a2df343cb9261fda21d4abc61f0a4938c25 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>features-netconf-aggregator</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <modules>
index 5192499fe71d2a311b140d886bdf8911c07633a1..0750f6584ebcd6e3ddd0f567fa865a9bb39476e4 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
   <artifactId>netconf-features-parent</artifactId>
index e971f412d45c040e62ca553d620ff136fd2feed1..d4c352b4836500ed3abee064d1496be45f2c6ad6 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>features-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
   <artifactId>features-restconf</artifactId>
   <groupId>org.opendaylight.netconf</groupId>
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <properties>
-    <aaa.version>0.5.0-SNAPSHOT</aaa.version>
-    <commons.opendaylight.version>1.8.0-SNAPSHOT</commons.opendaylight.version>
-    <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
-    <features.test.version>1.8.0-SNAPSHOT</features.test.version>
-    <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
-    <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
-    <restconf.version>1.5.0-SNAPSHOT</restconf.version>
-    <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+    <aaa.version>0.5.1-SNAPSHOT</aaa.version>
+    <commons.opendaylight.version>1.8.1-SNAPSHOT</commons.opendaylight.version>
+    <controller.mdsal.version>1.5.1-SNAPSHOT</controller.mdsal.version>
+    <features.test.version>1.8.1-SNAPSHOT</features.test.version>
+    <mdsal.version>2.2.1-SNAPSHOT</mdsal.version>
+    <mdsal.model.version>0.10.1-SNAPSHOT</mdsal.model.version>
+    <restconf.version>1.5.1-SNAPSHOT</restconf.version>
+    <yangtools.version>1.1.1-SNAPSHOT</yangtools.version>
 
     <features.file>features.xml</features.file>
     <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
@@ -40,7 +40,7 @@
       <dependency>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-artifacts</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index b713e9cc31e5c7b6403e3f12b3ae43dd1544086a..34f9914c7b7a0ebae0c7b7a9ba5e51f5979aac9c 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features4-restconf</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <dependencies>
index aeb2c7595b811f2d6b494a6bf26ba567442e958f..c56c4ae6434fa4eb76f25a09fe13b265c5215ec9 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-mdsal-apidocs</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: MDSAL :: APIDOCS</name>
index d2b68c14f34d1f4addf15a363454481c376135fe..9db1103fbf745f9892177a3af17b6da6686608f5 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-restconf-all</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Restconf :: All</name>
index 8f9a1a77007f164a05abf49c83583c826a9a13e8..e550c10aa7b83158c4c49ddd43d6fffb420fd837 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-restconf-noauth</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Restconf</name>
             <dependency>
                 <groupId>org.opendaylight.odlparent</groupId>
                 <artifactId>odlparent-artifacts</artifactId>
-                <version>1.8.0-SNAPSHOT</version>
+                <version>1.8.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>1.1.0-SNAPSHOT</version>
+                <version>1.1.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.aaa</groupId>
                 <artifactId>aaa-artifacts</artifactId>
-                <version>0.5.0-SNAPSHOT</version>
+                <version>0.5.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>1.2.0-SNAPSHOT</version>
+                <version>1.2.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>restconf-artifacts</artifactId>
-                <version>1.5.0-SNAPSHOT</version>
+                <version>1.5.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
         <dependency>
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>odl-aaa-shiro</artifactId>
-            <version>0.5.0-SNAPSHOT</version>
+            <version>0.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-mdsal-broker</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
             <artifactId>odl4-netty-4</artifactId>
-            <version>1.8.0-SNAPSHOT</version>
+            <version>1.8.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 939076e0f707b7303d419976399e9557872bfde1..815037ec20ec2b22e8fe4fe06a618694023e1643 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-restconf</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Restconf</name>
@@ -31,7 +31,7 @@
         <dependency>
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>aaa-shiro-act</artifactId>
-            <version>0.5.0-SNAPSHOT</version>
+            <version>0.5.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
index 6433a81303ffb210cad7bc371aa25eb55e7e0009..0c446e7c9261d252ba498b68bd8e8cea4b7a46fd 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
     <artifactId>features-restconf-aggregator</artifactId>
     <groupId>org.opendaylight.netconf</groupId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <modules>
index fecd2fbab9cd865bd240a7d7783340b8085bc76e..5d643c7553e9fa94efa5879a48ef9faa12879f6f 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>features-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features-yanglib</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <properties>
-        <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
-        <netconf.version>1.2.0-SNAPSHOT</netconf.version>
-        <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
-        <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
-        <restconf.version>1.5.0-SNAPSHOT</restconf.version>
-        <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+        <controller.mdsal.version>1.5.1-SNAPSHOT</controller.mdsal.version>
+        <netconf.version>1.2.1-SNAPSHOT</netconf.version>
+        <mdsal.version>2.2.1-SNAPSHOT</mdsal.version>
+        <mdsal.model.version>0.10.1-SNAPSHOT</mdsal.model.version>
+        <restconf.version>1.5.1-SNAPSHOT</restconf.version>
+        <yangtools.version>1.1.1-SNAPSHOT</yangtools.version>
     </properties>
 
     <dependencyManagement>
@@ -35,7 +35,7 @@
             <dependency>
                 <groupId>org.opendaylight.odlparent</groupId>
                 <artifactId>odlparent-artifacts</artifactId>
-                <version>1.8.0-SNAPSHOT</version>
+                <version>1.8.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index d7887692db1ea5c465b25b3b70c308ea0068f405..a29ed4d07b95f8aa661382288ce02fde770bcdcb 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features4-yanglib</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <dependencies>
index c80c9387bf21fbcd993b2ca8dff178572c0d98e4..9448af247276ba63325103941e9b4e3f0ebf4f0a 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>odl-yanglib</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>feature</packaging>
 
     <name>OpenDaylight :: Yanglib</name>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>yanglib</artifactId>
-            <version>1.2.0-SNAPSHOT</version>
+            <version>1.2.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>odl-yangtools-yang-data</artifactId>
-            <version>1.1.0-SNAPSHOT</version>
+            <version>1.1.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>odl-restconf</artifactId>
-            <version>1.5.0-SNAPSHOT</version>
+            <version>1.5.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>odl-mdsal-models</artifactId>
-            <version>0.10.0-SNAPSHOT</version>
+            <version>0.10.1-SNAPSHOT</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>ietf-netconf-yang-library</artifactId>
-            <version>1.2.0-SNAPSHOT</version>
+            <version>1.2.1-SNAPSHOT</version>
         </dependency>
 
         <dependency>
index faacc3e084dc8adfc4a0870673c91053512fb1d7..55782b5fe45f97c2b30f8f820a3883dc46c86fdc 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>features-yanglib-aggregator</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <modules>
index 2b970f67d5a55d58480d2a265e64dcfa92929b8a..18067c559254fce756fed90bcabb54cebf4f7c3b 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-karaf</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <prerequisites>
     <maven>3.1.1</maven>
   </prerequisites>
   <properties>
-    <netconf.version>1.2.0-SNAPSHOT</netconf.version>
-    <restconf.version>1.5.0-SNAPSHOT</restconf.version>
+    <netconf.version>1.2.1-SNAPSHOT</netconf.version>
+    <restconf.version>1.5.1-SNAPSHOT</restconf.version>
   </properties>
 
   <dependencies>
index d77d9010eba6806fc3875d0509bd4c54341240cf..3e6c86a3e77f02aa25be0404654614ff87886af7 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>aaa-authn-odl-plugin</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencyManagement>
index 8756b9489332ee753cfeec15aa5dc4e9183f6c4e..43255286675de66a5f04492b283560a496081cd6 100644 (file)
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>callhome-model</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>${project.artifactId}</name>
 </project>
index c18c134d971f3754fd60ec93532e444ad21c4188..4e7adc5b365971c8c6c46bb0f2e76d0b25938582 100644 (file)
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.10.0-SNAPSHOT</version>
+    <version>0.10.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>callhome-protocol</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index f2a4ef91be533ae876a5a8dc5d86699abd43055e..9c64ea314f07a11126435c6efccf5d9d44a61693 100644 (file)
@@ -6,13 +6,13 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>callhome-provider</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencyManagement>
index d35ea9b0393b3753e63eadd9bd7acd3fbbebfb30..d8f3cac765912a2913973f864b42a4f49d295a24 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>config-netconf-connector</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 16b90775e21b54716c9d3f871bcbd59584e97ab9..ddb63e8cc688507b75412bac91e846954c19be51 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>mdsal-netconf-connector</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index f55e299fc22c6e3cf571d8cc11ef5a033be62ac7..563fc2e27c7fb68721bb556ecaee770ab5fdd954 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.netconf.mdsal.connector.ops;
 
 import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -16,6 +17,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
+import java.util.stream.Collectors;
 import org.opendaylight.controller.config.util.xml.DocumentedException;
 import org.opendaylight.controller.config.util.xml.DocumentedException.ErrorSeverity;
 import org.opendaylight.controller.config.util.xml.DocumentedException.ErrorTag;
@@ -34,6 +36,7 @@ import org.opendaylight.netconf.util.mapping.AbstractSingletonNetconfOperation;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.ModifyAction;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
 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.NormalizedNode;
@@ -44,6 +47,8 @@ import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.yang.model.api.SchemaNode;
+import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
@@ -109,7 +114,7 @@ public class EditConfig extends AbstractSingletonNetconfOperation {
         }
     }
 
-    private static void executeChange(final DOMDataReadWriteTransaction rwtx, final DataTreeChange change)
+    private void executeChange(final DOMDataReadWriteTransaction rwtx, final DataTreeChange change)
             throws DocumentedException {
         final YangInstanceIdentifier path = YangInstanceIdentifier.create(change.getPath());
         final NormalizedNode<?, ?> changeData = change.getChangeRoot();
@@ -117,7 +122,7 @@ public class EditConfig extends AbstractSingletonNetconfOperation {
         case NONE:
             return;
         case MERGE:
-            mergeParentMap(rwtx, path, changeData);
+            mergeParentMixin(rwtx, path, changeData);
             rwtx.merge(LogicalDatastoreType.CONFIGURATION, path, changeData);
             break;
         case CREATE:
@@ -127,14 +132,14 @@ public class EditConfig extends AbstractSingletonNetconfOperation {
                     throw new DocumentedException("Data already exists, cannot execute CREATE operation",
                         ErrorType.PROTOCOL, ErrorTag.DATA_EXISTS, ErrorSeverity.ERROR);
                 }
-                mergeParentMap(rwtx, path, changeData);
+                mergeParentMixin(rwtx, path, changeData);
                 rwtx.put(LogicalDatastoreType.CONFIGURATION, path, changeData);
             } catch (final ReadFailedException e) {
                 LOG.warn("Read from datastore failed when trying to read data for create operation", change, e);
             }
             break;
         case REPLACE:
-            mergeParentMap(rwtx, path, changeData);
+            mergeParentMixin(rwtx, path, changeData);
             rwtx.put(LogicalDatastoreType.CONFIGURATION, path, changeData);
             break;
         case DELETE:
@@ -157,15 +162,41 @@ public class EditConfig extends AbstractSingletonNetconfOperation {
         }
     }
 
-    private static void mergeParentMap(final DOMDataReadWriteTransaction rwtx, final YangInstanceIdentifier path,
-                                final NormalizedNode<?, ?> change) {
+    private void mergeParentMixin(final DOMDataReadWriteTransaction rwtx, final YangInstanceIdentifier path,
+                                final NormalizedNode change) {
+        final YangInstanceIdentifier parentNodeYid = path.getParent();
         if (change instanceof MapEntryNode) {
-            final YangInstanceIdentifier mapNodeYid = path.getParent();
-            //merge empty map
+            final SchemaNode schemaNode = SchemaContextUtil.findNodeInSchemaContext(
+                    schemaContext.getCurrentContext(),
+                    parentNodeYid.getPathArguments().stream()
+                            // filter out identifiers not present in the schema tree
+                            .filter(arg -> !(arg instanceof YangInstanceIdentifier.NodeIdentifierWithPredicates))
+                            .filter(arg -> !(arg instanceof YangInstanceIdentifier.AugmentationIdentifier))
+                            .map(YangInstanceIdentifier.PathArgument::getNodeType).collect(Collectors.toList()));
+
+            // we should have the schema node that points to the parent list now, enforce it
+            Preconditions.checkState(schemaNode instanceof ListSchemaNode, "Schema node is not pointing to a list.");
+
+            //merge empty ordered or unordered map
+            if (((ListSchemaNode) schemaNode).isUserOrdered()) {
+                final MapNode mixinNode = Builders.orderedMapBuilder()
+                        .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(parentNodeYid.getLastPathArgument().getNodeType()))
+                        .build();
+                rwtx.merge(LogicalDatastoreType.CONFIGURATION, parentNodeYid, mixinNode);
+                return;
+            }
+
             final MapNode mixinNode = Builders.mapBuilder()
-                    .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(mapNodeYid.getLastPathArgument().getNodeType()))
+                    .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(parentNodeYid.getLastPathArgument().getNodeType()))
                     .build();
-            rwtx.merge(LogicalDatastoreType.CONFIGURATION, mapNodeYid, mixinNode);
+            rwtx.merge(LogicalDatastoreType.CONFIGURATION, parentNodeYid, mixinNode);
+        } else if (parentNodeYid.getLastPathArgument() instanceof YangInstanceIdentifier.AugmentationIdentifier) {
+            // merge empty augmentation node
+            final YangInstanceIdentifier.AugmentationIdentifier augmentationYid =
+                (YangInstanceIdentifier.AugmentationIdentifier) parentNodeYid.getLastPathArgument();
+            final AugmentationNode augmentationNode = Builders.augmentationBuilder()
+                .withNodeIdentifier(augmentationYid).build();
+            rwtx.merge(LogicalDatastoreType.CONFIGURATION, parentNodeYid, augmentationNode);
         }
     }
 
index 009b3c64ca206901481d5a739772f2172c3c2845..7fe00acd36ecbb085ce026996c22fc6aefc1234e 100644 (file)
@@ -299,6 +299,60 @@ public class NetconfMDSalMappingTest {
 
     }
 
+    @Test
+    public void testOrderedListEdits() throws Exception {
+
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_ordered_list_create.xml"), RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_ordered_list_replace.xml"), RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        deleteDatastore();
+
+    }
+
+    @Test
+    public void testAugmentedOrderedListEdits() throws Exception {
+
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_augmented_ordered_list_create.xml"),
+                RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_augmented_ordered_list_replace.xml"),
+                RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        deleteDatastore();
+
+    }
+
+    @Test
+    public void testAugmentedContainerReplace() throws Exception {
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_empty_modules_create.xml"),
+            RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_augmented_container_replace.xml"),
+            RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        deleteDatastore();
+    }
+
+    @Test
+    public void testLeafFromAugmentReplace() throws Exception {
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_empty_modules_create.xml"),
+            RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        verifyResponse(edit("messages/mapping/editConfigs/editConfig_leaf_from_augment_replace.xml"),
+            RPC_REPLY_OK);
+        verifyResponse(commit(), RPC_REPLY_OK);
+
+        deleteDatastore();
+    }
+
     @Test
     public void testLock() throws Exception {
 
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_container_replace.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_container_replace.xml
new file mode 100644 (file)
index 0000000..184b3a0
--- /dev/null
@@ -0,0 +1,28 @@
+<!--
+  ~ Copyright (c) 2017 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <top xmlns="urn:opendaylight:mdsal:mapping:test">
+                <modules>
+                    <augmented-container xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
+                        <identifier>some id</identifier>
+                    </augmented-container>
+                </modules>
+            </top>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_ordered_list_create.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_ordered_list_create.xml
new file mode 100644 (file)
index 0000000..cc5395f
--- /dev/null
@@ -0,0 +1,32 @@
+<!--
+  ~ Copyright (c) 2015 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <mapping-nodes xmlns="urn:opendaylight:mdsal:mapping:test" xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="create">
+                <mapping-node>
+                    <id>id</id>
+                    <augmented-ordered-items>
+                        <augmented-ordered-item>
+                            <id>node1</id>
+                            <content>node1 original content</content>
+                        </augmented-ordered-item>
+                    </augmented-ordered-items>
+                </mapping-node>
+            </mapping-nodes>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_ordered_list_replace.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_augmented_ordered_list_replace.xml
new file mode 100644 (file)
index 0000000..47c1ceb
--- /dev/null
@@ -0,0 +1,32 @@
+<!--
+  ~ Copyright (c) 2015 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <mapping-nodes xmlns="urn:opendaylight:mdsal:mapping:test" xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="none">
+                <mapping-node>
+                <id>id</id>
+                    <augmented-ordered-items>
+                        <augmented-ordered-item xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
+                            <id>node1</id>
+                            <content>node1 content</content>
+                        </augmented-ordered-item>
+                    </augmented-ordered-items>
+                </mapping-node>
+            </mapping-nodes>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_empty_modules_create.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_empty_modules_create.xml
new file mode 100644 (file)
index 0000000..7478bfd
--- /dev/null
@@ -0,0 +1,25 @@
+<!--
+  ~ Copyright (c) 2017 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <top xmlns="urn:opendaylight:mdsal:mapping:test" xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="create">
+                <modules>
+                </modules>
+            </top>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_leaf_from_augment_replace.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_leaf_from_augment_replace.xml
new file mode 100644 (file)
index 0000000..3f82522
--- /dev/null
@@ -0,0 +1,26 @@
+<!--
+  ~ Copyright (c) 2017 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <top xmlns="urn:opendaylight:mdsal:mapping:test">
+                <modules>
+                    <leaf-from-augment xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">some value</leaf-from-augment>
+                </modules>
+            </top>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_ordered_list_create.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_ordered_list_create.xml
new file mode 100644 (file)
index 0000000..b4895e5
--- /dev/null
@@ -0,0 +1,32 @@
+<!--
+  ~ Copyright (c) 2015 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <mapping-nodes xmlns="urn:opendaylight:mdsal:mapping:test" xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="create">
+                <mapping-node>
+                <id>id</id>
+                    <ordered-items>
+                        <ordered-item>
+                            <id>node1</id>
+                            <content>node1 original content</content>
+                        </ordered-item>
+                    </ordered-items>
+                </mapping-node>
+            </mapping-nodes>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
diff --git a/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_ordered_list_replace.xml b/netconf/mdsal-netconf-connector/src/test/resources/messages/mapping/editConfigs/editConfig_ordered_list_replace.xml
new file mode 100644 (file)
index 0000000..f3ee4f6
--- /dev/null
@@ -0,0 +1,32 @@
+<!--
+  ~ Copyright (c) 2015 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
+  -->
+
+<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>none</default-operation>
+        <config>
+            <mapping-nodes xmlns="urn:opendaylight:mdsal:mapping:test" xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="none">
+                <mapping-node>
+                <id>id</id>
+                    <ordered-items>
+                        <ordered-item xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace">
+                            <id>node1</id>
+                            <content>node1 content</content>
+                        </ordered-item>
+                    </ordered-items>
+                </mapping-node>
+            </mapping-nodes>
+        </config>
+    </edit-config>
+</rpc>
\ No newline at end of file
index d338ac3e07fa044bb09a9248e4fb5e123debced8..2557dbcc86f33bee9a16315ea43c228d950cd778 100644 (file)
@@ -34,7 +34,7 @@ module config {
             }
         }
         
-        list mapping-node{
+        list mapping-node {
             key "id";
             leaf id {
                 type string;
@@ -43,6 +43,43 @@ module config {
             leaf content {
                 type string;
             }
+
+            choice ordered-choice {
+                case a {
+                    container ordered-items {
+                        list ordered-item {
+                            key "id";
+                            ordered-by user;
+                            leaf id {
+                                type string;
+                            }
+
+                            leaf content {
+                                type string;
+                            }
+                        }
+                    }
+                }
+                case b {
+                    container augmented-ordered-items {
+
+                    }
+                }
+            }
+        }
+    }
+
+    augment "/map:mapping-nodes/map:mapping-node/map:ordered-choice/map:b/map:augmented-ordered-items" {
+        list augmented-ordered-item {
+            key "id";
+            ordered-by user;
+            leaf id {
+                type string;
+            }
+
+            leaf content {
+                type string;
+            }
         }
     }
 
@@ -144,13 +181,19 @@ module config {
     }
 
     augment "/map:top/map:modules/" {
-        container augmented-container{
+        container augmented-container {
             leaf identifier {
                 type string;
             }
         }
     }
 
+    augment "/map:top/map:modules/" {
+        leaf leaf-from-augment {
+            type string;
+        }
+    }
+
     augment "/map:top" {
         container mid-level {
             container low-level {
index 882f9391fdc7016f9c36282c0be1e3e7c637733b..0cd7e341b5f77a708a81b2c25253eca2a0582bbd 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>mdsal-netconf-impl</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 0095a3034b3734d0e99c6c13c872188f6c26917e..0aaa663ebc7da4104c6bad8c1d3a9ba00dd5e065 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>mdsal-netconf-monitoring</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 40b561c2a3901c727dec27a2a356ddb332755e7a..e5a008bc5a0508085252d37dd2d798975b436083 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>mdsal-netconf-notification</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 
index 82c329224cdb034f468e7ead1bbea514da4fb528..46c2655555ad289d8cec917de00cbebbe4d70a86 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>mdsal-netconf-ssh</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index fb528d76d5b0a6d5b4964117d16106a9dde1b1be..abd67c182e359c0486a8e0161a9a38d5e5f7af36 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>mdsal-netconf-tcp</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 8f10b00c712b052c520bd68c7e58a292bd41b002..f87766a16487561e451f0eb6a8f3ce01103c9319 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>mdsal-netconf-yang-library</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 
index 1dfd073103af5d0b5ceae3e50e3d994aa9ad28d7..4a875bb7a22dbacdee3a611238ec11ea8baae452 100644 (file)
@@ -14,13 +14,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>messagebus-netconf</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 
index c02c7fc10aa717185ce668d1af0589eca67ac98a..6a42aa7371290993d4a6fa69924e1f0ec68b0bb5 100644 (file)
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.10.0-SNAPSHOT</version>
+    <version>0.10.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>ietf-netconf-monitoring-extension</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index ea5e2004f11874dd8c052c6fa8c799e5fc816212..8451c04534d095be3f6f3d0e9f80565ee47a36e7 100644 (file)
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.10.0-SNAPSHOT</version>
+    <version>0.10.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>ietf-netconf-monitoring</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 87f21ec6959f9b5502c31f257b5175bb04ffaed6..65fa02754502725d3a1bc797e3f3d86f5a0dc621 100644 (file)
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.10.0-SNAPSHOT</version>
+    <version>0.10.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>ietf-netconf-notifications</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index e52cf887ffbfe47ada53d4977fff209ce10f97eb..7a88ca7d5d6823c15c1972727846d14999910c54 100644 (file)
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>ietf-netconf-yang-library</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 
index 67041237b3fbb968f16c17cb97c304a81b79624d..6c2c1443aee76658782d3431007b387d51f47a61 100644 (file)
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>ietf-netconf</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>${project.artifactId}</name>
 
index 06ac2239e5d7a927d001921682905a6d1c1f4bbf..cfc98c8b7777900547e6b25c644e786072a486d3 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-models</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>${project.artifactId}</name>
 
index 353593128e5580e347aaec8388f88044f4fbf438..5ab06007d13df6350b4a4296938cf3cf3e714a8f 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-api</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 98d03348a185a586f69235b24575bd3b971853a3..d57522baa6e2ade40416d35f29f26be1fef679bb 100644 (file)
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>1.8.1-SNAPSHOT</version>
       <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-artifacts</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <properties>
-        <mdsal.version>1.5.0-SNAPSHOT</mdsal.version>
+        <mdsal.version>1.5.1-SNAPSHOT</mdsal.version>
     </properties>
 
     <dependencyManagement>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>odl-netconf-mdsal</artifactId>
-                <version>1.6.0-SNAPSHOT</version>
+                <version>1.6.1-SNAPSHOT</version>
                 <type>xml</type>
                 <classifier>features</classifier>
             </dependency>
index 187561078af52d6d85eb32dd3029771c0db64b58..0b529f300c61f88be740970569bb62b7f20b8d24 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-auth</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 </project>
index dffdfac52ef9c80f35d539c6310ed20cc347e618..3aafcfa4652c5cd8341f3bd1b4584809c8f3bcce 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-client</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 1e047798a6835579f3fd172044fc74dc9c49f8bf..a9093e6c07ab1a7fb5b8b37c55d8c53b1c74a096 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-config</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <description>Configuration files for netconf</description>
   <packaging>bundle</packaging>
 
@@ -27,7 +27,7 @@
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-artifacts</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 771a3bea453fabd1ad1b11a95569bc25f2d5b876..fbb416db0f483b6862e99e89cc1e41da88a78635 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-connector-config</artifactId>
     <description>Configuration files for netconf-connector</description>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencyManagement>
index 804b4818844acff93262727461e3a403616f88ad..929d0615d36d10967f173daedc33b4caaa5baf6a 100644 (file)
@@ -11,13 +11,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-console</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index c78eb147a937f2a6aa6eae4c7eb8f57196e6de27..ac46003dc13bbcf3dddc74a59363ebe93e9c3137 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-impl</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 7bee36356c698299ec0df33ad8405f917496b2c6..5eed6906299c484d3d7d3d2093be06f612ea2740 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-subsystem</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>netconf-it</artifactId>
index 3ebac609be4247549e47e9cbf4d61a1b12f5c5f1..a4f4829354c68695a4146e3fe33f589060ee639a 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-mapping-api</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 2539896e29ae4dffbbf65a4d0af4bce1192fe0f4..851f2321881c8b99bbf32bad8cfe8b0e33a7e1aa 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-monitoring</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 9e6e9117a6ae0b91a4f8b404e1b75758a609d1e6..2207726ba89b545db9728903c5ddba207401f432 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-netty-util</artifactId>
   <packaging>bundle</packaging>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
 
   <dependencyManagement>
index d2fed42496e7ca83bf9b5b6d6f73216d89c2934c..8be556a022451208800e30d2d07214cfad2bc837 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-notifications-api</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencyManagement>
index 93d7f95dbca22ce5ec9be38708c5e722d0dc050c..104b41d82496d6a4f2d34f7a679271672b0de10c 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-notifications-impl</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencyManagement>
index 0225bdbf6f9f075ac302e473f994f2a380aade71..1969c432944a4295a84b519172f618eafcee07eb 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-ssh</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 0e45504a588c639ff716e6810064cd9eb74d736e..cd2af04f77b4162d2d97f3209def32de37f2aea5 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-tcp</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 2a0e0d982d98afe38dc7cbd09a6789d46c83fcbf..e46c633df94872fba47c0f2f45fa3242c1dd8359 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-topology-config</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <description>Configuration files for netconf topology</description>
     <packaging>bundle</packaging>
 
index c4564d8e9619e20f5530e83f53f5a26a317f8ee9..57c531626837eeb4b3e627a2ec7226a538a957ea 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-topology-singleton</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <name>${project.artifactId}</name>
     <packaging>bundle</packaging>
 
@@ -36,7 +36,7 @@
             <dependency>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>1.5.0-SNAPSHOT</version>
+                <version>1.5.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 8af172779a8634e9d22a0d121c68322642ab45c0..35221124637339cc271e2be7e34a52e2599e4922 100644 (file)
@@ -6,13 +6,13 @@
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-topology</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <dependencyManagement>
index 110872bf88c085de0276dae2089ffa6bddfc46ff..cd4d641ec71fb4aecc02892164baffc6adb48e71 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-util</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <name>${project.artifactId}</name>
   <packaging>bundle</packaging>
 
index 1f80ee8e561c50d2b09efda1c653c4d671ec70d4..ffa2ed37a237607093e40970a3d397e40b1a169b 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-subsystem</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>${project.artifactId}</name>
 
@@ -85,7 +85,7 @@
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>protocol-framework</artifactId>
-        <version>0.9.0-SNAPSHOT</version>
+        <version>0.9.1-SNAPSHOT</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
index 9e06a2eb6a9f09ced91610457e3f3cb91865a99a..553e04d72a74e0efd1b0fddd6990f4465aa4e47c 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
@@ -19,7 +19,7 @@
   <artifactId>sal-netconf-connector</artifactId>
 
   <!-- Preserve version from mdsal -->
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
   <dependencyManagement>
@@ -27,7 +27,7 @@
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index c450ac68fecd83c40d8eff6c306e30d02e6b35c1..1f22df7610e3b91f3421d7c525830a00637b67f1 100644 (file)
@@ -260,14 +260,14 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
      * DOMRpcService proxy that attaches reset-keepalive-task and schedule
      * request-timeout-task to each RPC invocation.
      */
-    private static final class KeepaliveDOMRpcService implements DOMRpcService {
+    public static final class KeepaliveDOMRpcService implements DOMRpcService {
 
         private final DOMRpcService deviceRpc;
         private ResetKeepalive resetKeepaliveTask;
         private final long defaultRequestTimeoutMillis;
         private final ScheduledExecutorService executor;
 
-        public KeepaliveDOMRpcService(final DOMRpcService deviceRpc, final ResetKeepalive resetKeepaliveTask,
+        KeepaliveDOMRpcService(final DOMRpcService deviceRpc, final ResetKeepalive resetKeepaliveTask,
                 final long defaultRequestTimeoutMillis, final ScheduledExecutorService executor) {
             this.deviceRpc = deviceRpc;
             this.resetKeepaliveTask = resetKeepaliveTask;
@@ -275,6 +275,10 @@ public final class KeepaliveSalFacade implements RemoteDeviceHandler<NetconfSess
             this.executor = executor;
         }
 
+        public DOMRpcService getDeviceRpc() {
+            return deviceRpc;
+        }
+
         @Nonnull
         @Override
         public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull final SchemaPath type, final NormalizedNode<?, ?> input) {
index 8c51218ef96e0ec1ddd368855156d5b04c1bf335..904234b4c775c8f937042f4793c421752e6dc919 100644 (file)
@@ -35,6 +35,8 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
 import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
+import org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade;
+import org.opendaylight.netconf.sal.connect.netconf.sal.KeepaliveSalFacade.KeepaliveDOMRpcService;
 import org.opendaylight.netconf.sal.connect.netconf.sal.SchemalessNetconfDeviceRpc;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.copy.config.input.target.ConfigTarget;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.edit.config.input.EditContent;
@@ -63,7 +65,9 @@ public final class NetconfBaseOps {
     public NetconfBaseOps(final DOMRpcService rpc, final SchemaContext schemaContext) {
         this.rpc = rpc;
         this.schemaContext = schemaContext;
-        if (rpc instanceof SchemalessNetconfDeviceRpc) {
+
+        if ((rpc instanceof KeepaliveDOMRpcService)
+                && (((KeepaliveDOMRpcService) rpc).getDeviceRpc() instanceof SchemalessNetconfDeviceRpc)) {
             this.transformer = new SchemalessRpcStructureTransformer();
         } else {
             this.transformer = new NetconfRpcStructureTransformer(schemaContext);
index f797ca76bf1f986254a44fa0c27c762664ca2350..c2ba4f243dc21d8e90f7879ba1244f691dfa36b5 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>netconf-cli</artifactId>
-  <version>1.2.0-SNAPSHOT</version>
+  <version>1.2.1-SNAPSHOT</version>
   <packaging>jar</packaging>
   <name>${project.artifactId}</name>
 
index 0a4d8cad1da69d128fe2245f9ada564d42c87731..040ab9b3ce954453c8a28104ff0405ad97b2b4ea 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-testtool</artifactId>
     <name>${project.artifactId}</name>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <properties>
index b004e0844b555eb7f561411cf8a3c6d7aef76221..1b71bebe1fb5e42141319d9d7d900027321c78a7 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-subsystem</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>netconf-tools</artifactId>
index 8c083399fc28ceac882d4d49ce13a0803fb04898..2af93d25eb9d89b87607de01a096dec4a7a4e68d 100644 (file)
     <parent>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>config-parent</artifactId>
-        <version>0.6.0-SNAPSHOT</version>
+        <version>0.6.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>yanglib</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <build>
diff --git a/pom.xml b/pom.xml
index b7ff23ef51bf73de607daef39864e5008492229f..8a49aa5fd33241fc683883a97c10f96b940cb010 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>netconf-parent</artifactId>
-    <version>1.2.0-SNAPSHOT</version>
+    <version>1.2.1-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>${project.artifactId}</name>
 
     </modules>
 
     <properties>
-        <config.version>0.6.0-SNAPSHOT</config.version>
+        <config.version>0.6.1-SNAPSHOT</config.version>
         <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
-        <features.test.version>1.8.0-SNAPSHOT</features.test.version>
+        <features.test.version>1.8.1-SNAPSHOT</features.test.version>
 
-        <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
-        <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
-        <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
-        <netconf.version>1.2.0-SNAPSHOT</netconf.version>
-        <restconf.version>1.5.0-SNAPSHOT</restconf.version>
-        <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+        <mdsal.version>2.2.1-SNAPSHOT</mdsal.version>
+        <mdsal.model.version>0.10.1-SNAPSHOT</mdsal.model.version>
+        <controller.mdsal.version>1.5.1-SNAPSHOT</controller.mdsal.version>
+        <netconf.version>1.2.1-SNAPSHOT</netconf.version>
+        <restconf.version>1.5.1-SNAPSHOT</restconf.version>
+        <yangtools.version>1.1.1-SNAPSHOT</yangtools.version>
     </properties>
 
 
@@ -70,7 +70,7 @@
         <dependency>
           <groupId>org.opendaylight.aaa</groupId>
           <artifactId>aaa-artifacts</artifactId>
-          <version>0.5.0-SNAPSHOT</version>
+          <version>0.5.1-SNAPSHOT</version>
           <type>pom</type>
           <scope>import</scope>
         </dependency>
index 9256d0dd7d8e6c5babca3bdf74f041435bb997dd..92ea7ef913b369a7b2cc9c8c8b161a4bcab766eb 100644 (file)
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath>../../../binding/binding-parent</relativePath>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>ietf-restconf-monitoring</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>${project.artifactId}</name>
 
index f5b4fdb70c8c4cf10e313fdb7ebb97827b093440..17caa6944317d9a04de8c962f755eadb3b66d4a5 100644 (file)
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath>../../../binding/binding-parent</relativePath>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>ietf-restconf</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>${project.artifactId}</name>
 
index 2b4f2b8752853eaf410cda10abe6f7214c73c6cb..13b4788bb76ed932204414127626626ac8851334 100644 (file)
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.10.0-SNAPSHOT</version>
+        <version>0.10.1-SNAPSHOT</version>
         <relativePath>../../../binding/binding-parent</relativePath>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>ietf-yang-library</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>${project.artifactId}</name>
 
index 9712e52c3eec0d992f184dd89e930379d5fd8734..1cc2a4be73412607efd6ef682569e21af83c77d5 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>restconf-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>restconf-models</artifactId>
index 2c9957a7c79e9d4eca5caee333c13afe28f3b36e..1d0e6ea8cac5f634f61654318c0c27b468f02777 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>restconf-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>${project.artifactId}</name>
 
index baf7222dbf6b616789125bcbb1dd4f9671166ede..8e41e97091dd6394d96f8ebbb9d3c4b66e6947e1 100644 (file)
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>1.8.0-SNAPSHOT</version>
+      <version>1.8.1-SNAPSHOT</version>
       <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>restconf-artifacts</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <dependencyManagement>
index 40981c58778ae29a695ece271e8fc1c811fcbc9d..e0129bd94eb6148a2d8d393078cc507acc48bbc8 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>sal-rest-connector-config</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <description>Configuration files for sal-rest-connector</description>
 
   <packaging>jar</packaging>
index 0d5a8c9cbe0749b681b42575e7d564e49f23e7e5..e445c7fdfd4c655f11186d42ad28bb3da7195168 100644 (file)
   <parent>
     <groupId>org.opendaylight.controller</groupId>
     <artifactId>config-parent</artifactId>
-    <version>0.6.0-SNAPSHOT</version>
+    <version>0.6.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>sal-rest-connector</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
   <dependencyManagement>
@@ -25,7 +25,7 @@
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index f172364e73fdfded35390b391b8fc45d234eb747..f96f75bceaa4ff2fd7924abf25b00074eae611a8 100644 (file)
@@ -115,6 +115,11 @@ public class PATCHJsonBodyWriter implements MessageBodyWriter<PATCHStatusContext
                 jsonWriter.name("error-message").value(restconfError.getErrorMessage());
             }
 
+            // optional node
+            if (restconfError.getErrorInfo() != null) {
+                jsonWriter.name("error-info").value(restconfError.getErrorInfo());
+            }
+
             jsonWriter.endObject();
         }
 
index 9a60cabc5e721e4d74468153c7e218defe8149af..65a957fef42d37aadae55d1ca76368470772fd06 100644 (file)
@@ -134,6 +134,13 @@ public class PATCHXmlBodyWriter implements MessageBodyWriter<PATCHStatusContext>
                 writer.writeCharacters(restconfError.getErrorMessage());
                 writer.writeEndElement();
             }
+
+            // optional node
+            if (restconfError.getErrorInfo() != null) {
+                writer.writeStartElement("error-info");
+                writer.writeCharacters(restconfError.getErrorInfo());
+                writer.writeEndElement();
+            }
         }
 
         writer.writeEndElement();
index bc1eeeae508756bceea4c0637ea9f96fbe637f2f..6ccb64b8c6ae49a056dc4642e4bb53826b9ef84a 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.netconf.sal.rest.impl;
 
+import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
 import java.io.IOException;
 import java.io.InputStream;
@@ -33,6 +34,7 @@ import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.util.xml.UntrustedXML;
+import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlUtils;
@@ -45,6 +47,7 @@ import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
@@ -144,20 +147,31 @@ public class XmlNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsPro
                     iiToDataList.add(new YangInstanceIdentifier.NodeIdentifier(schemaNode.getQName()));
                 }
             }
+        // PUT
+        } else if (!isRpc) {
+            final QName scQName = schemaNode.getQName();
+            Preconditions.checkState(
+                    docRootElm.equals(scQName.getLocalName())
+                            && docRootNamespace.equals(scQName.getNamespace().toASCIIString()),
+                    String.format("Not correct message root element \"%s\", should be \"%s\"",
+                            docRootElm, scQName));
         }
 
-        NormalizedNode<?, ?> parsed = null;
-
+        final NormalizedNode<?, ?> parsed;
         if (schemaNode instanceof ContainerSchemaNode) {
-            parsed = parserFactory.getContainerNodeParser().parse(Collections.singletonList(doc.getDocumentElement()), (ContainerSchemaNode) schemaNode);
-        } else if(schemaNode instanceof ListSchemaNode) {
-            final ListSchemaNode casted = (ListSchemaNode) schemaNode;
-            parsed = parserFactory.getMapEntryNodeParser().parse(elements, casted);
+            parsed = parserFactory.getContainerNodeParser().parse(
+                        Collections.singletonList(doc.getDocumentElement()), (ContainerSchemaNode) schemaNode);
+        } else if (schemaNode instanceof ListSchemaNode) {
+            parsed = parserFactory.getMapEntryNodeParser().parse(elements, (ListSchemaNode) schemaNode);
             if (isPost()) {
                 iiToDataList.add(parsed.getIdentifier());
             }
+        } else if (schemaNode instanceof LeafSchemaNode) {
+            parsed = parserFactory.getLeafNodeParser().parse(elements, (LeafSchemaNode) schemaNode);
+        } else {
+            LOG.warn("Unknown schema node extension {} was not parsed", schemaNode.getClass());
+            parsed = null;
         }
-        // FIXME : add another DataSchemaNode extensions e.g. LeafSchemaNode
 
         final YangInstanceIdentifier fullIIToData = YangInstanceIdentifier.create(Iterables.concat(
                 pathContext.getInstanceIdentifier().getPathArguments(), iiToDataList));
index d3f918741901564814cc8b176aca17ff4234df78..df3e3f1afbece575ad37d504c7c5665e9c5aeb8d 100644 (file)
@@ -9,14 +9,14 @@ package org.opendaylight.netconf.sal.restconf.api;
 
 import com.google.common.base.Optional;
 import javax.annotation.Nonnull;
-import javax.ws.rs.core.UriInfo;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.yangtools.yang.common.OperationFailedException;
 
 /**
- * @author Thomas Pantelis
+ * Provides restconf CRUD operations via code with input/output data in JSON format.
+ *
+ * @author Thomas Pantelis.
  */
-@Deprecated
 public interface JSONRestconfService {
     /**
      * The data tree root path.
@@ -31,7 +31,7 @@ public interface JSONRestconfService {
      * @param payload the payload data in JSON format.
      * @throws OperationFailedException if the request fails.
      */
-    void put(String uriPath, @Nonnull String payload, UriInfo uriInfo) throws OperationFailedException;
+    void put(String uriPath, @Nonnull String payload) throws OperationFailedException;
 
     /**
      * Issues a restconf POST request to the configuration data store.
@@ -41,7 +41,7 @@ public interface JSONRestconfService {
      * @param payload the payload data in JSON format.
      * @throws OperationFailedException if the request fails.
      */
-    void post(String uriPath, @Nonnull String payload, UriInfo uriInfo) throws OperationFailedException;
+    void post(String uriPath, @Nonnull String payload) throws OperationFailedException;
 
     /**
      * Issues a restconf DELETE request to the configuration data store.
@@ -61,7 +61,7 @@ public interface JSONRestconfService {
      * @return an Optional containing the data in JSON format if present.
      * @throws OperationFailedException if the request fails.
      */
-    Optional<String> get(String uriPath, LogicalDatastoreType datastoreType, UriInfo uriInfo)
+    Optional<String> get(String uriPath, LogicalDatastoreType datastoreType)
             throws OperationFailedException;
 
     /**
index 5b24d2e60d8935fbd48bb50fe87aa41d79b7c1cc..f6359a68b85c5014cf41aa0dde5bd6e789af366a 100644 (file)
@@ -14,9 +14,15 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.annotation.Annotation;
+import java.net.URI;
 import java.nio.charset.StandardCharsets;
+import java.util.Collections;
 import java.util.List;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.PathSegment;
+import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.netconf.sal.rest.impl.JsonNormalizedNodeBodyReader;
@@ -35,14 +41,14 @@ import org.slf4j.LoggerFactory;
  *
  * @author Thomas Pantelis
  */
-@Deprecated
 public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseable {
-    private final static Logger LOG = LoggerFactory.getLogger(JSONRestconfServiceImpl.class);
+    private static final Logger LOG = LoggerFactory.getLogger(JSONRestconfServiceImpl.class);
 
     private static final Annotation[] EMPTY_ANNOTATIONS = new Annotation[0];
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     @Override
-    public void put(final String uriPath, final String payload, final UriInfo uriInfo) throws OperationFailedException {
+    public void put(final String uriPath, final String payload) throws OperationFailedException {
         Preconditions.checkNotNull(payload, "payload can't be null");
 
         LOG.debug("put: uriPath: {}, payload: {}", uriPath, payload);
@@ -54,14 +60,15 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         LOG.debug("Parsed NormalizedNode: {}", context.getData());
 
         try {
-            RestconfImpl.getInstance().updateConfigurationData(uriPath, context, uriInfo);
+            RestconfImpl.getInstance().updateConfigurationData(uriPath, context, new SimpleUriInfo(uriPath));
         } catch (final Exception e) {
             propagateExceptionAs(uriPath, e, "PUT");
         }
     }
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     @Override
-    public void post(final String uriPath, final String payload, final UriInfo uriInfo)
+    public void post(final String uriPath, final String payload)
             throws OperationFailedException {
         Preconditions.checkNotNull(payload, "payload can't be null");
 
@@ -74,12 +81,13 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         LOG.debug("Parsed NormalizedNode: {}", context.getData());
 
         try {
-            RestconfImpl.getInstance().createConfigurationData(uriPath, context, uriInfo);
+            RestconfImpl.getInstance().createConfigurationData(uriPath, context, new SimpleUriInfo(uriPath));
         } catch (final Exception e) {
             propagateExceptionAs(uriPath, e, "POST");
         }
     }
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     @Override
     public void delete(final String uriPath) throws OperationFailedException {
         LOG.debug("delete: uriPath: {}", uriPath);
@@ -91,14 +99,16 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         }
     }
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     @Override
-    public Optional<String> get(final String uriPath, final LogicalDatastoreType datastoreType, final UriInfo uriInfo)
+    public Optional<String> get(final String uriPath, final LogicalDatastoreType datastoreType)
             throws OperationFailedException {
         LOG.debug("get: uriPath: {}", uriPath);
 
         try {
             NormalizedNodeContext readData;
-            if(datastoreType == LogicalDatastoreType.CONFIGURATION) {
+            final SimpleUriInfo uriInfo = new SimpleUriInfo(uriPath);
+            if (datastoreType == LogicalDatastoreType.CONFIGURATION) {
                 readData = RestconfImpl.getInstance().readConfigurationData(uriPath, uriInfo);
             } else {
                 readData = RestconfImpl.getInstance().readOperationalData(uriPath, uriInfo);
@@ -110,7 +120,7 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
 
             return result;
         } catch (final Exception e) {
-            if(!isDataMissing(e)) {
+            if (!isDataMissing(e)) {
                 propagateExceptionAs(uriPath, e, "GET");
             }
 
@@ -119,8 +129,10 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         }
     }
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     @Override
-    public Optional<String> invokeRpc(final String uriPath, final Optional<String> input) throws OperationFailedException {
+    public Optional<String> invokeRpc(final String uriPath, final Optional<String> input)
+            throws OperationFailedException {
         Preconditions.checkNotNull(uriPath, "uriPath can't be null");
 
         final String actualInput = input.isPresent() ? input.get() : null;
@@ -130,9 +142,10 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         String output = null;
         try {
             NormalizedNodeContext outputContext;
-            if(actualInput != null) {
+            if (actualInput != null) {
                 final InputStream entityStream = new ByteArrayInputStream(actualInput.getBytes(StandardCharsets.UTF_8));
-                final NormalizedNodeContext inputContext = JsonNormalizedNodeBodyReader.readFrom(uriPath, entityStream, true);
+                final NormalizedNodeContext inputContext =
+                        JsonNormalizedNodeBodyReader.readFrom(uriPath, entityStream, true);
 
                 LOG.debug("Parsed YangInstanceIdentifier: {}", inputContext.getInstanceIdentifierContext()
                         .getInstanceIdentifier());
@@ -143,7 +156,7 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
                 outputContext = RestconfImpl.getInstance().invokeRpc(uriPath, "", null);
             }
 
-            if(outputContext.getData() != null) {
+            if (outputContext.getData() != null) {
                 output = toJson(outputContext);
             }
         } catch (final Exception e) {
@@ -161,16 +174,16 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         final NormalizedNodeJsonBodyWriter writer = new NormalizedNodeJsonBodyWriter();
         final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
         writer.writeTo(readData, NormalizedNodeContext.class, null, EMPTY_ANNOTATIONS,
-                MediaType.APPLICATION_JSON_TYPE, null, outputStream );
+                MediaType.APPLICATION_JSON_TYPE, null, outputStream);
         return outputStream.toString(StandardCharsets.UTF_8.name());
     }
 
-    private static boolean isDataMissing(final Exception e) {
+    private static boolean isDataMissing(final Exception exception) {
         boolean dataMissing = false;
-        if (e instanceof RestconfDocumentedException) {
-            final RestconfDocumentedException rde = (RestconfDocumentedException)e;
-            if(!rde.getErrors().isEmpty()) {
-                if(rde.getErrors().get(0).getErrorTag() == ErrorTag.DATA_MISSING) {
+        if (exception instanceof RestconfDocumentedException) {
+            final RestconfDocumentedException rde = (RestconfDocumentedException)exception;
+            if (!rde.getErrors().isEmpty()) {
+                if (rde.getErrors().get(0).getErrorTag() == ErrorTag.DATA_MISSING) {
                     dataMissing = true;
                 }
             }
@@ -179,22 +192,24 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
         return dataMissing;
     }
 
-    private static void propagateExceptionAs(final String uriPath, final Exception e, final String operation) throws OperationFailedException {
-        LOG.debug("Error for uriPath: {}", uriPath, e);
+    private static void propagateExceptionAs(final String uriPath, final Exception exception, final String operation)
+            throws OperationFailedException {
+        LOG.debug("Error for uriPath: {}", uriPath, exception);
 
-        if(e instanceof RestconfDocumentedException) {
-            throw new OperationFailedException(String.format("%s failed for URI %s", operation, uriPath), e.getCause(),
-                    toRpcErrors(((RestconfDocumentedException)e).getErrors()));
+        if (exception instanceof RestconfDocumentedException) {
+            throw new OperationFailedException(String.format(
+                    "%s failed for URI %s", operation, uriPath), exception.getCause(),
+                    toRpcErrors(((RestconfDocumentedException)exception).getErrors()));
         }
 
-        throw new OperationFailedException(String.format("%s failed for URI %s", operation, uriPath), e);
+        throw new OperationFailedException(String.format("%s failed for URI %s", operation, uriPath), exception);
     }
 
     private static RpcError[] toRpcErrors(final List<RestconfError> from) {
         final RpcError[] to = new RpcError[from.size()];
-        int i = 0;
-        for(final RestconfError e: from) {
-            to[i++] = RpcResultBuilder.newError(toRpcErrorType(e.getErrorType()), e.getErrorTag().getTagValue(),
+        int index = 0;
+        for (final RestconfError e: from) {
+            to[index++] = RpcResultBuilder.newError(toRpcErrorType(e.getErrorType()), e.getErrorTag().getTagValue(),
                     e.getErrorMessage());
         }
 
@@ -202,7 +217,7 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
     }
 
     private static ErrorType toRpcErrorType(final RestconfError.ErrorType errorType) {
-        switch(errorType) {
+        switch (errorType) {
             case TRANSPORT: {
                 return ErrorType.TRANSPORT;
             }
@@ -217,4 +232,113 @@ public class JSONRestconfServiceImpl implements JSONRestconfService, AutoCloseab
             }
         }
     }
+
+    private static class SimpleUriInfo implements UriInfo {
+        private final String path;
+        private final MultivaluedMap<String, String> queryParams;
+
+        SimpleUriInfo(String path) {
+            this(path, new MultivaluedHashMap<>());
+        }
+
+        SimpleUriInfo(String path, MultivaluedMap<String, String> queryParams) {
+            this.path = path;
+            this.queryParams = queryParams;
+        }
+
+        @Override
+        public String getPath() {
+            return path;
+        }
+
+        @Override
+        public String getPath(boolean decode) {
+            return path;
+        }
+
+        @Override
+        public List<PathSegment> getPathSegments() {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public List<PathSegment> getPathSegments(boolean decode) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public URI getRequestUri() {
+            return URI.create(path);
+        }
+
+        @Override
+        public UriBuilder getRequestUriBuilder() {
+            return UriBuilder.fromUri(getRequestUri());
+        }
+
+        @Override
+        public URI getAbsolutePath() {
+            return getRequestUri();
+        }
+
+        @Override
+        public UriBuilder getAbsolutePathBuilder() {
+            return UriBuilder.fromUri(getAbsolutePath());
+        }
+
+        @Override
+        public URI getBaseUri() {
+            return URI.create("");
+        }
+
+        @Override
+        public UriBuilder getBaseUriBuilder() {
+            return UriBuilder.fromUri(getBaseUri());
+        }
+
+        @Override
+        public MultivaluedMap<String, String> getPathParameters() {
+            return new MultivaluedHashMap<>();
+        }
+
+        @Override
+        public MultivaluedMap<String, String> getPathParameters(boolean decode) {
+            return getPathParameters();
+        }
+
+        @Override
+        public MultivaluedMap<String, String> getQueryParameters() {
+            return queryParams;
+        }
+
+        @Override
+        public MultivaluedMap<String, String> getQueryParameters(boolean decode) {
+            return getQueryParameters();
+        }
+
+        @Override
+        public List<String> getMatchedURIs() {
+            return Collections.emptyList();
+        }
+
+        @Override
+        public List<String> getMatchedURIs(boolean decode) {
+            return getMatchedURIs();
+        }
+
+        @Override
+        public List<Object> getMatchedResources() {
+            return Collections.emptyList();
+        }
+
+        @Override
+        public URI resolve(URI uri) {
+            return uri;
+        }
+
+        @Override
+        public URI relativize(URI uri) {
+            return uri;
+        }
+    }
 }
index 5f47fcbc4609a2d8f12cc1a637eda85632b2c571..6b4b85db629ebba7b45d9ebc18a1801029420a48 100644 (file)
@@ -13,15 +13,15 @@ import java.util.Set;
 import javax.ws.rs.core.Application;
 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContentYangBodyWriter;
 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContentYinBodyWriter;
-import org.opendaylight.netconf.sal.rest.impl.JsonNormalizedNodeBodyReader;
 import org.opendaylight.netconf.sal.rest.impl.PATCHJsonBodyWriter;
 import org.opendaylight.netconf.sal.rest.impl.PATCHXmlBodyWriter;
 import org.opendaylight.netconf.sal.rest.impl.RestconfDocumentedExceptionMapper;
-import org.opendaylight.netconf.sal.rest.impl.XmlNormalizedNodeBodyReader;
 import org.opendaylight.restconf.common.wrapper.services.ServicesWrapperImpl;
+import org.opendaylight.restconf.jersey.providers.JsonNormalizedNodeBodyReader;
 import org.opendaylight.restconf.jersey.providers.JsonToPATCHBodyReader;
 import org.opendaylight.restconf.jersey.providers.NormalizedNodeJsonBodyWriter;
 import org.opendaylight.restconf.jersey.providers.NormalizedNodeXmlBodyWriter;
+import org.opendaylight.restconf.jersey.providers.XmlNormalizedNodeBodyReader;
 import org.opendaylight.restconf.jersey.providers.XmlToPATCHBodyReader;
 
 public class RestconfApplication extends Application {
index 507f4f362ace875a89e7dfd72814e6481661d72a..98bdc0ea28d94b65520dd787ad78c5f05c4427ab 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.restconf.jersey.providers;
 
+import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
 import java.io.IOException;
 import java.io.InputStream;
@@ -34,6 +35,7 @@ import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
 import org.opendaylight.restconf.Rfc8040;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.util.xml.UntrustedXML;
+import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlUtils;
@@ -46,6 +48,7 @@ import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
@@ -132,19 +135,30 @@ public class XmlNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsPro
                     iiToDataList.add(new YangInstanceIdentifier.NodeIdentifier(schemaNode.getQName()));
                 }
             }
+        // PUT
+        } else if (!isRpc) {
+            final QName scQName = schemaNode.getQName();
+            Preconditions.checkState(
+                    docRootElm.equals(scQName.getLocalName())
+                            && docRootNamespace.equals(scQName.getNamespace().toASCIIString()),
+                    String.format("Not correct message root element \"%s\", should be \"%s\"",
+                            docRootElm, scQName));
         }
 
-        NormalizedNode<?, ?> parsed = null;
-
+        final NormalizedNode<?, ?> parsed;
         if (schemaNode instanceof ContainerSchemaNode) {
-            parsed = parserFactory.getContainerNodeParser().parse(Collections.singletonList(doc.getDocumentElement()),
-                (ContainerSchemaNode) schemaNode);
-        } else if(schemaNode instanceof ListSchemaNode) {
-            final ListSchemaNode casted = (ListSchemaNode) schemaNode;
-            parsed = parserFactory.getMapEntryNodeParser().parse(elements, casted);
+            parsed = parserFactory.getContainerNodeParser().parse(
+                    Collections.singletonList(doc.getDocumentElement()), (ContainerSchemaNode) schemaNode);
+        } else if (schemaNode instanceof ListSchemaNode) {
+            parsed = parserFactory.getMapEntryNodeParser().parse(elements, (ListSchemaNode) schemaNode);
             if (isPost()) {
                 iiToDataList.add(parsed.getIdentifier());
             }
+        } else if (schemaNode instanceof LeafSchemaNode) {
+            parsed = parserFactory.getLeafNodeParser().parse(elements, (LeafSchemaNode) schemaNode);
+        } else {
+            LOG.warn("Unknown schema node extension {} was not parsed", schemaNode.getClass());
+            parsed = null;
         }
 
         final YangInstanceIdentifier fullIIToData = YangInstanceIdentifier.create(Iterables.concat(
index f0aab31b63db760b52d323751395527ecd194428..8fe65f274ba8c2ed0feb138123d847cbf4da9592 100644 (file)
@@ -71,7 +71,7 @@ public final class ParserIdentifier {
             final String identifier,
             final SchemaContext schemaContext,
             final Optional<DOMMountPointService> mountPointService) {
-        if ((identifier != null) && identifier.contains(RestconfConstants.MOUNT)) {
+        if (identifier != null && identifier.contains(RestconfConstants.MOUNT)) {
             if (!mountPointService.isPresent()) {
                 throw new RestconfDocumentedException("Mount point service is not available");
             }
@@ -88,27 +88,29 @@ public final class ParserIdentifier {
                         "Mount point does not exist.", ErrorType.PROTOCOL, ErrorTag.DATA_MISSING);
             }
 
+            final DOMMountPoint domMountPoint = mountPoint.get();
+            final SchemaContext mountSchemaContext = domMountPoint.getSchemaContext();
+
             final String pathId = pathsIt.next().replaceFirst("/", "");
             final YangInstanceIdentifier pathYangInstanceIdentifier = IdentifierCodec.deserialize(
-                    pathId, mountPoint.get().getSchemaContext());
+                    pathId, mountSchemaContext);
 
-            final DataSchemaContextNode<?> child = DataSchemaContextTree.from(
-                    mountPoint.get().getSchemaContext()).getChild(pathYangInstanceIdentifier);
+            final DataSchemaContextNode<?> child = DataSchemaContextTree.from(mountSchemaContext)
+                .getChild(pathYangInstanceIdentifier);
             if (child != null) {
                 return new InstanceIdentifierContext<SchemaNode>(pathYangInstanceIdentifier, child.getDataSchemaNode(),
-                        mountPoint.get(), mountPoint.get().getSchemaContext());
+                        domMountPoint, mountSchemaContext);
             }
-            final QName rpcQName = mountYangInstanceIdentifier.getLastPathArgument().getNodeType();
+            final QName rpcQName = pathYangInstanceIdentifier.getLastPathArgument().getNodeType();
             RpcDefinition def = null;
-            for (final RpcDefinition rpcDefinition : schemaContext
+            for (final RpcDefinition rpcDefinition : mountSchemaContext
                     .findModuleByNamespaceAndRevision(rpcQName.getNamespace(), rpcQName.getRevision()).getRpcs()) {
                 if (rpcDefinition.getQName().getLocalName().equals(rpcQName.getLocalName())) {
                     def = rpcDefinition;
                     break;
                 }
             }
-            return new InstanceIdentifierContext<>(mountYangInstanceIdentifier, def, mountPoint.get(),
-                    mountPoint.get().getSchemaContext());
+            return new InstanceIdentifierContext<>(pathYangInstanceIdentifier, def, domMountPoint, mountSchemaContext);
         } else {
             final YangInstanceIdentifier deserialize = IdentifierCodec.deserialize(identifier, schemaContext);
             final DataSchemaContextNode<?> child = DataSchemaContextTree.from(schemaContext).getChild(deserialize);
@@ -158,7 +160,7 @@ public final class ParserIdentifier {
         }
 
         final int mountIndex = identifier.indexOf(RestconfConstants.MOUNT);
-        String moduleNameAndRevision = "";
+        final String moduleNameAndRevision;
         if (mountIndex >= 0) {
             moduleNameAndRevision = identifier.substring(mountIndex + RestconfConstants.MOUNT.length())
                     .replaceFirst(String.valueOf(RestconfConstants.SLASH), "");
index a366ce29b0329cdc26cb809e860bd155befd4d03..2a5fb7b0ef4a49a04fd49c1dc1434ccfcf938e12 100644 (file)
@@ -35,8 +35,7 @@ public abstract class AbstractBodyReaderTest {
     private static Field uriField;
     private static Field requestField;
 
-    public AbstractBodyReaderTest() throws NoSuchFieldException,
-            SecurityException {
+    public AbstractBodyReaderTest() throws NoSuchFieldException {
         uriField = AbstractIdentifierAwareJaxRsProvider.class
                 .getDeclaredField("uriInfo");
         uriField.setAccessible(true);
index 0a3f14a384d61ef8c309d6b89300c4757a35568a..1ac78c8e25932d05e623520959da84e084b7965a 100644 (file)
@@ -20,11 +20,14 @@ import java.net.URI;
 import java.text.ParseException;
 import java.util.Collection;
 import javax.ws.rs.core.MediaType;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
 import org.opendaylight.netconf.sal.rest.impl.XmlNormalizedNodeBodyReader;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
@@ -64,7 +67,7 @@ public class TestXmlBodyReader extends AbstractBodyReaderTest {
         }
     }
 
-    public TestXmlBodyReader () throws NoSuchFieldException, SecurityException {
+    public TestXmlBodyReader() throws Exception {
         super();
         this.xmlBodyReader = new XmlNormalizedNodeBodyReader();
     }
@@ -252,4 +255,24 @@ public class TestXmlBodyReader extends AbstractBodyReaderTest {
         assertEquals("Not correct container found, namespace was ignored",
                 "bar:module", returnValue.getData().getNodeType().getNamespace().toString());
     }
+
+    /**
+     * Test PUT operation when message root element is not the same as the last element in request URI.
+     * PUT operation message should always start with schema node from URI otherwise exception should be
+     * thrown.
+     */
+    @Test
+    public void wrongRootElementTest() throws Exception {
+        mockBodyReader("instance-identifier-module:cont", this.xmlBodyReader, false);
+        final InputStream inputStream = TestXmlBodyReader.class.getResourceAsStream(
+                "/instanceidentifier/xml/bug7933.xml");
+        try {
+            this.xmlBodyReader.readFrom(null, null, null, this.mediaType, null, inputStream);
+            Assert.fail("Test should fail due to malformed PUT operation message");
+        } catch (final RestconfDocumentedException exception) {
+            final RestconfError restconfError = exception.getErrors().get(0);
+            Assert.assertEquals(RestconfError.ErrorType.PROTOCOL, restconfError.getErrorType());
+            Assert.assertEquals(RestconfError.ErrorTag.MALFORMED_MESSAGE, restconfError.getErrorTag());
+        }
+    }
 }
index f95090b7389fa3cfeec6a984d7891d53b43ba3a4..9e1237b7ba19719f419381a30b53bae65f82d072 100644 (file)
@@ -22,6 +22,7 @@ import java.net.URI;
 import java.text.ParseException;
 import java.util.Collection;
 import javax.ws.rs.core.MediaType;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
@@ -30,6 +31,8 @@ import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
 import org.opendaylight.netconf.sal.rest.impl.XmlNormalizedNodeBodyReader;
 import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
@@ -67,9 +70,7 @@ public class TestXmlBodyReaderMountPoint extends AbstractBodyReaderTest {
         }
     }
 
-
-    public TestXmlBodyReaderMountPoint() throws NoSuchFieldException,
-            SecurityException {
+    public TestXmlBodyReaderMountPoint() throws Exception {
         super();
         this.xmlBodyReader = new XmlNormalizedNodeBodyReader();
     }
@@ -234,4 +235,24 @@ public class TestXmlBodyReaderMountPoint extends AbstractBodyReaderTest {
         assertEquals("Not correct container found, namespace was ignored",
                 "bar:module", returnValue.getData().getNodeType().getNamespace().toString());
     }
+
+    /**
+     * Test PUT operation when message root element is not the same as the last element in request URI.
+     * PUT operation message should always start with schema node from URI otherwise exception should be
+     * thrown.
+     */
+    @Test
+    public void wrongRootElementTest() throws Exception {
+        mockBodyReader("instance-identifier-module:cont/yang-ext:mount", this.xmlBodyReader, false);
+        final InputStream inputStream = TestXmlBodyReader.class.getResourceAsStream(
+                "/instanceidentifier/xml/bug7933.xml");
+        try {
+            this.xmlBodyReader.readFrom(null, null, null, this.mediaType, null, inputStream);
+            Assert.fail("Test should fail due to malformed PUT operation message");
+        } catch (final RestconfDocumentedException exception) {
+            final RestconfError restconfError = exception.getErrors().get(0);
+            Assert.assertEquals(RestconfError.ErrorType.PROTOCOL, restconfError.getErrorType());
+            Assert.assertEquals(RestconfError.ErrorTag.MALFORMED_MESSAGE, restconfError.getErrorTag());
+        }
+    }
 }
index fa788c61a01afd4708311277f5770f3dff0d1a26..7d6ff79d363192a7aef7b1041dc8cdc412f96788 100644 (file)
@@ -29,13 +29,9 @@ import com.google.common.util.concurrent.Futures;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriBuilder;
-import javax.ws.rs.core.UriInfo;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -138,11 +134,7 @@ public class JSONRestconfServiceImplTest {
         when(result.getStatus()).thenReturn(Status.OK);
         final String uriPath = "ietf-interfaces:interfaces/interface/eth0";
         final String payload = loadData("/parts/ietf-interfaces_interfaces.json");
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        this.service.put(uriPath, payload, uriInfo);
+        this.service.put(uriPath, payload);
 
         final ArgumentCaptor<YangInstanceIdentifier> capturedPath = ArgumentCaptor.forClass(YangInstanceIdentifier.class);
         final ArgumentCaptor<NormalizedNode> capturedNode = ArgumentCaptor.forClass(NormalizedNode.class);
@@ -175,11 +167,7 @@ public class JSONRestconfServiceImplTest {
         final String uriPath = "ietf-interfaces:interfaces/yang-ext:mount/test-module:cont/cont1";
         final String payload = loadData("/full-versions/testCont1Data.json");
 
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        this.service.put(uriPath, payload, uriInfo);
+        this.service.put(uriPath, payload);
 
         final ArgumentCaptor<YangInstanceIdentifier> capturedPath = ArgumentCaptor.forClass(YangInstanceIdentifier.class);
         final ArgumentCaptor<NormalizedNode> capturedNode = ArgumentCaptor.forClass(NormalizedNode.class);
@@ -209,11 +197,7 @@ public class JSONRestconfServiceImplTest {
         final String uriPath = "ietf-interfaces:interfaces/interface/eth0";
         final String payload = loadData("/parts/ietf-interfaces_interfaces.json");
 
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        this.service.put(uriPath, payload, uriInfo);
+        this.service.put(uriPath, payload);
     }
 
     @SuppressWarnings("rawtypes")
@@ -226,13 +210,7 @@ public class JSONRestconfServiceImplTest {
         final String uriPath = null;
         final String payload = loadData("/parts/ietf-interfaces_interfaces_absolute_path.json");
 
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        final UriBuilder uriBuilder = UriBuilder.fromPath("");
-        Mockito.when(uriInfo.getBaseUriBuilder()).thenReturn(uriBuilder);
-        this.service.post(uriPath, payload, uriInfo);
+        this.service.post(uriPath, payload);
 
         final ArgumentCaptor<YangInstanceIdentifier> capturedPath = ArgumentCaptor.forClass(YangInstanceIdentifier.class);
         final ArgumentCaptor<NormalizedNode> capturedNode = ArgumentCaptor.forClass(NormalizedNode.class);
@@ -272,13 +250,7 @@ public class JSONRestconfServiceImplTest {
         final String uriPath = "ietf-interfaces:interfaces/yang-ext:mount/test-module:cont";
         final String payload = loadData("/full-versions/testCont1Data.json");
 
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        final UriBuilder uriBuilder = UriBuilder.fromPath("");
-        Mockito.when(uriInfo.getBaseUriBuilder()).thenReturn(uriBuilder);
-        this.service.post(uriPath, payload, uriInfo);
+        this.service.post(uriPath, payload);
 
         final ArgumentCaptor<YangInstanceIdentifier> capturedPath = ArgumentCaptor.forClass(YangInstanceIdentifier.class);
         final ArgumentCaptor<NormalizedNode> capturedNode = ArgumentCaptor.forClass(NormalizedNode.class);
@@ -303,15 +275,8 @@ public class JSONRestconfServiceImplTest {
         final String uriPath = null;
         final String payload = loadData("/parts/ietf-interfaces_interfaces_absolute_path.json");
 
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        final UriBuilder uriBuilder = UriBuilder.fromPath("");
-        Mockito.when(uriInfo.getBaseUriBuilder()).thenReturn(uriBuilder);
-
         try {
-            this.service.post(uriPath, payload, uriInfo);
+            this.service.post(uriPath, payload);
         } catch (final OperationFailedException e) {
             assertNotNull(e.getCause());
             throw e.getCause();
@@ -356,21 +321,13 @@ public class JSONRestconfServiceImplTest {
         doReturn(null).when(brokerFacade).readConfigurationData(notNull(YangInstanceIdentifier.class),
                 Mockito.anyString());
         final String uriPath = "ietf-interfaces:interfaces";
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        this.service.get(uriPath, LogicalDatastoreType.CONFIGURATION, uriInfo);
+        this.service.get(uriPath, LogicalDatastoreType.CONFIGURATION);
     }
 
     @Test(expected=OperationFailedException.class)
     public void testGetFailure() throws Exception {
         final String invalidUriPath = "/ietf-interfaces:interfaces/invalid";
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        this.service.get(invalidUriPath, LogicalDatastoreType.CONFIGURATION, uriInfo);
+        this.service.get(invalidUriPath, LogicalDatastoreType.CONFIGURATION);
     }
 
     @SuppressWarnings("rawtypes")
@@ -465,14 +422,8 @@ public class JSONRestconfServiceImplTest {
         }
 
         final String uriPath = "/ietf-interfaces:interfaces/interface/eth0";
-        final UriInfo uriInfo = Mockito.mock(UriInfo.class);
-        final MultivaluedMap<String, String> value = Mockito.mock(MultivaluedMap.class);
-        Mockito.when(value.entrySet()).thenReturn(new HashSet<>());
-        Mockito.when(uriInfo.getQueryParameters()).thenReturn(value);
-        Mockito.when(uriInfo.getQueryParameters(false)).thenReturn(value);
-        Mockito.when(value.getFirst("depth")).thenReturn("");
-
-        final Optional<String> optionalResp = this.service.get(uriPath, datastoreType, uriInfo);
+
+        final Optional<String> optionalResp = this.service.get(uriPath, datastoreType);
         assertEquals("Response present", true, optionalResp.isPresent());
         final String jsonResp = optionalResp.get();
 
index 16ef10055f461f5f4731643f204d59c9038b0c27..1284d0fec54dd5fd8f996d248e2a46eb24dd6f7d 100644 (file)
@@ -30,9 +30,9 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 abstract class AbstractBodyReaderTest {
 
-    protected final static ControllerContext controllerContext = ControllerContext.getInstance();
+    protected final static ControllerContext CONTROLLER_CONTEXT = ControllerContext.getInstance();
     protected final MediaType mediaType;
-    protected final static DOMMountPointServiceHandler mountPointServiceHandler = mock(
+    protected final static DOMMountPointServiceHandler MOUNT_POINT_SERVICE_HANDLER = mock(
             DOMMountPointServiceHandler.class);
 
     AbstractBodyReaderTest() throws NoSuchFieldException, IllegalAccessException {
@@ -41,7 +41,7 @@ abstract class AbstractBodyReaderTest {
         final Field mountPointServiceHandlerField = RestConnectorProvider.class.
                 getDeclaredField("mountPointServiceHandler");
         mountPointServiceHandlerField.setAccessible(true);
-        mountPointServiceHandlerField.set(RestConnectorProvider.class, mountPointServiceHandler);
+        mountPointServiceHandlerField.set(RestConnectorProvider.class, MOUNT_POINT_SERVICE_HANDLER);
     }
 
     protected abstract MediaType getMediaType();
@@ -77,6 +77,12 @@ abstract class AbstractBodyReaderTest {
         normalizedNodeProvider.setRequest(request);
     }
 
+    protected static void checkMountPointNormalizedNodeContext(
+            final NormalizedNodeContext nnContext) {
+        checkNormalizedNodeContext(nnContext);
+        assertNotNull(nnContext.getInstanceIdentifierContext().getMountPoint());
+    }
+
     protected static void checkNormalizedNodeContext(
             final NormalizedNodeContext nnContext) {
         assertNotNull(nnContext.getData());
index 4b3bb46e9777f72946c02fb210c6e2a6dae7c8f8..42696130581025653ce7f5a26a60d7ffe8e9b004 100644 (file)
@@ -72,8 +72,8 @@ public class JsonBodyReaderTest extends AbstractBodyReaderTest {
         final Collection<File> testFiles = TestRestconfUtils.loadFiles("/instanceidentifier/yang");
         testFiles.addAll(TestRestconfUtils.loadFiles("/modules"));
         schemaContext = YangParserTestUtils.parseYangSources(testFiles);
-        controllerContext.setSchemas(schemaContext);
-        when(mountPointServiceHandler.get()).thenReturn(mock(DOMMountPointService.class));
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mock(DOMMountPointService.class));
     }
 
     @Test
index f50106e96f67f3a7e8c9621c6f479f25cd0d86a5..727f7ce935cc61a57e5d3de5b137f999170c0ee7 100644 (file)
@@ -51,11 +51,11 @@ public class JsonPATCHBodyReaderMountPointTest extends AbstractBodyReaderTest {
         final DOMMountPointService mountPointService = mock(DOMMountPointService.class);
         final DOMMountPoint mountPoint = mock(DOMMountPoint.class);
 
-        when(mountPointServiceHandler.get()).thenReturn(mountPointService);
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mountPointService);
         when(mountPointService.getMountPoint(any(YangInstanceIdentifier.class))).thenReturn(Optional.of(mountPoint));
         when(mountPoint.getSchemaContext()).thenReturn(schemaContext);
 
-        controllerContext.setSchemas(schemaContext);
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     @Test
index 6d8808ec0c2a9b32eeb94d83329089adc9b7741a..2adc789694990faa08e73d548f9aa552d548791e 100644 (file)
@@ -42,8 +42,8 @@ public class JsonPATCHBodyReaderTest extends AbstractBodyReaderTest {
     @BeforeClass
     public static void initialization() {
         schemaContext = schemaContextLoader("/instanceidentifier/yang", schemaContext);
-        when(mountPointServiceHandler.get()).thenReturn(mock(DOMMountPointService.class));
-        controllerContext.setSchemas(schemaContext);
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mock(DOMMountPointService.class));
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     @Test
diff --git a/restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/XmlBodyReaderMountPointTest.java b/restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/jersey/providers/XmlBodyReaderMountPointTest.java
new file mode 100644 (file)
index 0000000..e4e687b
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+ * Copyright (c) 2015 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.restconf.jersey.providers;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import com.google.common.base.Optional;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URI;
+import java.text.ParseException;
+import java.util.Collection;
+import javax.ws.rs.core.MediaType;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
+import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
+import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
+import org.opendaylight.controller.sal.rest.impl.test.providers.TestXmlBodyReader;
+import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes;
+import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
+
+public class XmlBodyReaderMountPointTest extends AbstractBodyReaderTest {
+    private final XmlNormalizedNodeBodyReader xmlBodyReader;
+    private static SchemaContext schemaContext;
+
+    private static final QNameModule INSTANCE_IDENTIFIER_MODULE_QNAME = initializeInstanceIdentifierModule();
+
+    private static QNameModule initializeInstanceIdentifierModule() {
+        try {
+            return QNameModule.create(URI.create("instance:identifier:module"),
+                SimpleDateFormatUtil.getRevisionFormat().parse("2014-01-17"));
+        } catch (final ParseException e) {
+            throw new Error(e);
+        }
+    }
+
+    public XmlBodyReaderMountPointTest() throws Exception {
+        super();
+        this.xmlBodyReader = new XmlNormalizedNodeBodyReader();
+    }
+
+    @Override
+    protected MediaType getMediaType() {
+        return new MediaType(MediaType.APPLICATION_XML, null);
+    }
+
+    @BeforeClass
+    public static void initialization() throws Exception {
+        final Collection<File> testFiles = TestRestconfUtils.loadFiles("/instanceidentifier/yang");
+        testFiles.addAll(TestRestconfUtils.loadFiles("/invoke-rpc"));
+        schemaContext = YangParserTestUtils.parseYangSources(testFiles);
+
+        final DOMMountPointService mountPointService = mock(DOMMountPointService.class);
+        final DOMMountPoint mountPoint = mock(DOMMountPoint.class);
+
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mountPointService);
+        when(mountPointService.getMountPoint(any(YangInstanceIdentifier.class))).thenReturn(Optional.of(mountPoint));
+        when(mountPoint.getSchemaContext()).thenReturn(schemaContext);
+
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
+    }
+
+    @Test
+    public void moduleDataTest() throws Exception {
+        final DataSchemaNode dataSchemaNode = schemaContext
+                .getDataChildByName(QName.create(INSTANCE_IDENTIFIER_MODULE_QNAME, "cont"));
+        final String uri = "instance-identifier-module:cont/yang-ext:mount/instance-identifier-module:cont";
+        mockBodyReader(uri, this.xmlBodyReader, false);
+        final InputStream inputStream = XmlBodyReaderMountPointTest.class
+                .getResourceAsStream("/instanceidentifier/xml/xmldata.xml");
+        final NormalizedNodeContext returnValue = this.xmlBodyReader.readFrom(null,
+                null, null, this.mediaType, null, inputStream);
+        checkMountPointNormalizedNodeContext(returnValue);
+        checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue);
+    }
+
+    @Test
+    public void moduleSubContainerDataPutTest() throws Exception {
+        final DataSchemaNode dataSchemaNode = schemaContext
+                .getDataChildByName(QName.create(INSTANCE_IDENTIFIER_MODULE_QNAME, "cont"));
+        final String uri = "instance-identifier-module:cont/yang-ext:mount/instance-identifier-module:cont/cont1";
+        mockBodyReader(uri, this.xmlBodyReader, false);
+        final InputStream inputStream = XmlBodyReaderMountPointTest.class
+                .getResourceAsStream("/instanceidentifier/xml/xml_sub_container.xml");
+        final NormalizedNodeContext returnValue = this.xmlBodyReader.readFrom(null,
+                null, null, this.mediaType, null, inputStream);
+        checkMountPointNormalizedNodeContext(returnValue);
+        checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue,
+                QName.create(dataSchemaNode.getQName(), "cont1"));
+    }
+
+    @Test
+    public void moduleSubContainerDataPostTest() throws Exception {
+        final DataSchemaNode dataSchemaNode = schemaContext
+                .getDataChildByName(QName.create(INSTANCE_IDENTIFIER_MODULE_QNAME, "cont"));
+        final String uri = "instance-identifier-module:cont/yang-ext:mount/instance-identifier-module:cont";
+        mockBodyReader(uri, this.xmlBodyReader, true);
+        final InputStream inputStream = XmlBodyReaderMountPointTest.class
+                .getResourceAsStream("/instanceidentifier/xml/xml_sub_container.xml");
+        final NormalizedNodeContext returnValue = this.xmlBodyReader.readFrom(null,
+                null, null, this.mediaType, null, inputStream);
+        checkMountPointNormalizedNodeContext(returnValue);
+        checkExpectValueNormalizeNodeContext(dataSchemaNode, returnValue);
+    }
+
+    @Test
+    public void rpcModuleInputTest() throws Exception {
+        final String uri = "instance-identifier-module:cont/yang-ext:mount/invoke-rpc-module:rpc-test";
+        mockBodyReader(uri, this.xmlBodyReader, true);
+        final InputStream inputStream = XmlBodyReaderMountPointTest.class
+                .getResourceAsStream("/invoke-rpc/xml/rpc-input.xml");
+        final NormalizedNodeContext returnValue = this.xmlBodyReader.readFrom(null,
+                null, null, this.mediaType, null, inputStream);
+        checkNormalizedNodeContext(returnValue);
+        final ContainerNode contNode = (ContainerNode) returnValue.getData();
+        final YangInstanceIdentifier yangCont = YangInstanceIdentifier.of(QName.create(contNode.getNodeType(), "cont"));
+        final Optional<DataContainerChild<? extends PathArgument, ?>> contDataNodePotential = contNode.getChild(
+                yangCont.getLastPathArgument());
+        assertTrue(contDataNodePotential.isPresent());
+        final ContainerNode contDataNode = (ContainerNode) contDataNodePotential.get();
+        final YangInstanceIdentifier yangLeaf =
+                YangInstanceIdentifier.of(QName.create(contDataNode.getNodeType(), "lf"));
+        final Optional<DataContainerChild<? extends PathArgument, ?>> leafDataNode = contDataNode.getChild(
+                yangLeaf.getLastPathArgument());
+        assertTrue(leafDataNode.isPresent());
+        assertTrue("lf-test".equalsIgnoreCase(leafDataNode.get().getValue().toString()));
+    }
+
+    private void checkExpectValueNormalizeNodeContext(
+            final DataSchemaNode dataSchemaNode,
+            final NormalizedNodeContext nnContext) {
+        checkExpectValueNormalizeNodeContext(dataSchemaNode, nnContext, null);
+    }
+
+    private void checkExpectValueNormalizeNodeContext(final DataSchemaNode dataSchemaNode,
+            final NormalizedNodeContext nnContext, final QName qualifiedName) {
+        YangInstanceIdentifier dataNodeIdent = YangInstanceIdentifier
+                .of(dataSchemaNode.getQName());
+        final DOMMountPoint mountPoint = nnContext
+                .getInstanceIdentifierContext().getMountPoint();
+        final DataSchemaNode mountDataSchemaNode = mountPoint
+                .getSchemaContext().getDataChildByName(
+                        dataSchemaNode.getQName());
+        assertNotNull(mountDataSchemaNode);
+        if ((qualifiedName != null) && (dataSchemaNode instanceof DataNodeContainer)) {
+            final DataSchemaNode child = ((DataNodeContainer) dataSchemaNode)
+                    .getDataChildByName(qualifiedName);
+            dataNodeIdent = YangInstanceIdentifier.builder(dataNodeIdent)
+                    .node(child.getQName()).build();
+            assertTrue(nnContext.getInstanceIdentifierContext().getSchemaNode()
+                    .equals(child));
+        } else {
+            assertTrue(mountDataSchemaNode.equals(dataSchemaNode));
+        }
+        assertNotNull(NormalizedNodes.findNode(nnContext.getData(),
+                dataNodeIdent));
+    }
+
+    /**
+     * Test when container with the same name is placed in two modules (foo-module and bar-module). Namespace must be
+     * used to distinguish between them to find correct one. Check if container was found not only according to its name
+     * but also by correct namespace used in payload.
+     */
+    @Test
+    public void findFooContainerUsingNamespaceTest() throws Exception {
+        mockBodyReader("instance-identifier-module:cont/yang-ext:mount", this.xmlBodyReader, true);
+        final InputStream inputStream = TestXmlBodyReader.class
+                .getResourceAsStream("/instanceidentifier/xml/xmlDataFindFooContainer.xml");
+        final NormalizedNodeContext returnValue = this.xmlBodyReader
+                .readFrom(null, null, null, this.mediaType, null, inputStream);
+
+        // check return value
+        checkMountPointNormalizedNodeContext(returnValue);
+        // check if container was found both according to its name and namespace
+        assertEquals("Not correct container found, name was ignored",
+                "foo-bar-container", returnValue.getData().getNodeType().getLocalName());
+        assertEquals("Not correct container found, namespace was ignored",
+                "foo:module", returnValue.getData().getNodeType().getNamespace().toString());
+    }
+
+    /**
+     * Test when container with the same name is placed in two modules (foo-module and bar-module). Namespace must be
+     * used to distinguish between them to find correct one. Check if container was found not only according to its name
+     * but also by correct namespace used in payload.
+     */
+    @Test
+    public void findBarContainerUsingNamespaceTest() throws Exception {
+        mockBodyReader("instance-identifier-module:cont/yang-ext:mount", this.xmlBodyReader, true);
+        final InputStream inputStream = TestXmlBodyReader.class
+                .getResourceAsStream("/instanceidentifier/xml/xmlDataFindBarContainer.xml");
+        final NormalizedNodeContext returnValue = this.xmlBodyReader
+                .readFrom(null, null, null, this.mediaType, null, inputStream);
+
+        // check return value
+        checkMountPointNormalizedNodeContext(returnValue);
+        // check if container was found both according to its name and namespace
+        assertEquals("Not correct container found, name was ignored",
+                "foo-bar-container", returnValue.getData().getNodeType().getLocalName());
+        assertEquals("Not correct container found, namespace was ignored",
+                "bar:module", returnValue.getData().getNodeType().getNamespace().toString());
+    }
+
+    /**
+     * Test PUT operation when message root element is not the same as the last element in request URI.
+     * PUT operation message should always start with schema node from URI otherwise exception should be
+     * thrown.
+     */
+    @Test
+    public void wrongRootElementTest() throws Exception {
+        mockBodyReader("instance-identifier-module:cont/yang-ext:mount", this.xmlBodyReader, false);
+        final InputStream inputStream = TestXmlBodyReader.class.getResourceAsStream(
+                "/instanceidentifier/xml/bug7933.xml");
+        try {
+            this.xmlBodyReader.readFrom(null, null, null, this.mediaType, null, inputStream);
+            Assert.fail("Test should fail due to malformed PUT operation message");
+        } catch (final RestconfDocumentedException exception) {
+            final RestconfError restconfError = exception.getErrors().get(0);
+            Assert.assertEquals(RestconfError.ErrorType.PROTOCOL, restconfError.getErrorType());
+            Assert.assertEquals(RestconfError.ErrorTag.MALFORMED_MESSAGE, restconfError.getErrorTag());
+        }
+    }
+}
index 1aef4b1714338a2705366163593695fad2cf63e5..29281c7a0d24b4a8e3d86cd5d32705f14a67c136 100644 (file)
@@ -20,11 +20,15 @@ import java.net.URI;
 import java.text.ParseException;
 import java.util.Collection;
 import javax.ws.rs.core.MediaType;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
+import org.opendaylight.controller.sal.rest.impl.test.providers.TestXmlBodyReader;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
+import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
@@ -66,8 +70,8 @@ public class XmlBodyReaderTest extends AbstractBodyReaderTest {
         final Collection<File> testFiles = TestRestconfUtils.loadFiles("/instanceidentifier/yang");
         testFiles.addAll(TestRestconfUtils.loadFiles("/modules"));
         schemaContext = YangParserTestUtils.parseYangSources(testFiles);
-        controllerContext.setSchemas(schemaContext);
-        when(mountPointServiceHandler.get()).thenReturn(mock(DOMMountPointService.class));
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mock(DOMMountPointService.class));
     }
 
     @Test
@@ -214,4 +218,25 @@ public class XmlBodyReaderTest extends AbstractBodyReaderTest {
         assertEquals("Not correct container found, namespace was ignored", "bar:module",
                 returnValue.getData().getNodeType().getNamespace().toString());
     }
+
+    /**
+     * Test PUT operation when message root element is not the same as the last element in request URI.
+     * PUT operation message should always start with schema node from URI otherwise exception should be
+     * thrown.
+     */
+    @Test
+    public void wrongRootElementTest() throws Exception {
+        mockBodyReader("instance-identifier-module:cont", this.xmlBodyReader, false);
+        final InputStream inputStream = TestXmlBodyReader.class.getResourceAsStream(
+                "/instanceidentifier/xml/bug7933.xml");
+        try {
+            this.xmlBodyReader.readFrom(null, null, null, this.mediaType, null, inputStream);
+            Assert.fail("Test should fail due to malformed PUT operation message");
+        } catch (final RestconfDocumentedException exception) {
+            final RestconfError restconfError = exception.getErrors().get(0);
+            Assert.assertEquals(RestconfError.ErrorType.PROTOCOL, restconfError.getErrorType());
+            Assert.assertEquals(RestconfError.ErrorTag.MALFORMED_MESSAGE, restconfError.getErrorTag());
+        }
+    }
+
 }
index 9c6205a2ce1a91012a10d9fb91404b5ac2495e54..d7174ab2baff8fc16a35eb456d3ee60ddbb9c0d2 100644 (file)
@@ -50,11 +50,11 @@ public class XmlPATCHBodyReaderMountPointTest extends AbstractBodyReaderTest {
         final DOMMountPointService mountPointService = mock(DOMMountPointService.class);
         final DOMMountPoint mountPoint = mock(DOMMountPoint.class);
 
-        when(mountPointServiceHandler.get()).thenReturn(mountPointService);
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mountPointService);
         when(mountPointService.getMountPoint(any(YangInstanceIdentifier.class))).thenReturn(Optional.of(mountPoint));
         when(mountPoint.getSchemaContext()).thenReturn(schemaContext);
 
-        controllerContext.setSchemas(schemaContext);
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     @Test
index 1d7a13485ba26d17c82bd1aa9f42b1e2f467fc58..8a29e69f87599adaa92a237c58f3ed31be38d2e9 100644 (file)
@@ -41,8 +41,8 @@ public class XmlPATCHBodyReaderTest extends AbstractBodyReaderTest {
     @BeforeClass
     public static void initialization() {
         schemaContext = schemaContextLoader("/instanceidentifier/yang", schemaContext);
-        when(mountPointServiceHandler.get()).thenReturn(mock(DOMMountPointService.class));
-        controllerContext.setSchemas(schemaContext);
+        when(MOUNT_POINT_SERVICE_HANDLER.get()).thenReturn(mock(DOMMountPointService.class));
+        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     @Test
index f87ef3588225c08b608ca9de2e6193a5a9662cde..705f7e42dcbd4c7e1eb7c3246f78ffac986b1fb5 100644 (file)
@@ -34,6 +34,7 @@ import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
+import org.opendaylight.restconf.parser.IdentifierCodec;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
@@ -86,6 +87,8 @@ public class ParserIdentifierTest {
     private static final String TEST_MODULE_REVISION = "2016-06-02";
     private static final String TEST_MODULE_NAMESPACE = "test:module";
 
+    private static final String INVOKE_RPC = "invoke-rpc-module:rpc-test";
+
     // mount point and mount point service
     private DOMMountPoint mountPoint;
     private DOMMountPointService mountPointService;
@@ -642,4 +645,48 @@ public class ParserIdentifierTest {
                 + TEST_MODULE_REVISION,
                 this.mockMountPointService);
     }
+
+    /**
+     * Test invoke RPC.
+     *
+     * <p>
+     * Verify if RPC schema node was found.
+     */
+    @Test
+    public void invokeRpcTest() {
+        final InstanceIdentifierContext<?> result = ParserIdentifier.toInstanceIdentifier(
+                INVOKE_RPC, this.schemaContext, Optional.absent());
+
+        // RPC schema node
+        final QName rpcQName = result.getSchemaNode().getQName();
+        assertEquals("invoke:rpc:module", rpcQName.getModule().getNamespace().toString());
+        assertEquals("rpc-test", rpcQName.getLocalName());
+
+        // other fields
+        assertEquals(IdentifierCodec.deserialize(INVOKE_RPC, schemaContext), result.getInstanceIdentifier());
+        assertEquals(null, result.getMountPoint());
+        assertEquals(this.schemaContext, result.getSchemaContext());
+    }
+
+    /**
+     * Test invoke RPC on mount point.
+     *
+     * <p>
+     * Verify if RPC schema node was found.
+     */
+    @Test
+    public void invokeRpcOnMountPointTest() {
+        final InstanceIdentifierContext<?> result = ParserIdentifier.toInstanceIdentifier(
+                MOUNT_POINT_IDENT + "/" + INVOKE_RPC, this.schemaContext, Optional.of(this.mountPointService));
+
+        // RPC schema node
+        final QName rpcQName = result.getSchemaNode().getQName();
+        assertEquals("invoke:rpc:module", rpcQName.getModule().getNamespace().toString());
+        assertEquals("rpc-test", rpcQName.getLocalName());
+
+        // other fields
+        assertEquals(IdentifierCodec.deserialize(INVOKE_RPC, schemaContext), result.getInstanceIdentifier());
+        assertEquals(this.mountPoint, result.getMountPoint());
+        assertEquals(this.schemaContextOnMountPoint, result.getSchemaContext());
+    }
 }
diff --git a/restconf/sal-rest-connector/src/test/resources/instanceidentifier/xml/bug7933.xml b/restconf/sal-rest-connector/src/test/resources/instanceidentifier/xml/bug7933.xml
new file mode 100644 (file)
index 0000000..aa0d79e
--- /dev/null
@@ -0,0 +1,9 @@
+<!--
+  ~ Copyright (c) 2017 Pantheon Technologies s.r.o. 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
+  -->
+
+<cont1 xmlns="instance:identifier:module"/>
diff --git a/restconf/sal-rest-connector/src/test/resources/parser-identifier/invoke-rpc-module.yang b/restconf/sal-rest-connector/src/test/resources/parser-identifier/invoke-rpc-module.yang
new file mode 100644 (file)
index 0000000..7a8bcff
--- /dev/null
@@ -0,0 +1,26 @@
+module invoke-rpc-module {
+  namespace "invoke:rpc:module";
+  prefix "inrpcmod";
+  yang-version 1;
+
+  revision 2017-05-23 {
+      description "Initial revision.";
+  }
+
+  rpc rpc-test {
+      input {
+          container cont {
+              leaf lf {
+                  type string;
+              }
+          }
+      }
+      output {
+          container cont-out {
+              leaf lf-out {
+                  type string;
+              }
+          }
+      }
+  }
+}
\ No newline at end of file
index 9fd45d9b0dfc20189e6edefa674d65607d2c07ab..bb22c079fb0b33ee1541150911ab47ac3c7ca5d8 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.8.0-SNAPSHOT</version>
+        <version>1.8.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>sal-rest-docgen-maven</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
     <packaging>jar</packaging>
 
     <dependencyManagement>
@@ -34,7 +34,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-parent</artifactId>
-                <version>1.2.0-SNAPSHOT</version>
+                <version>1.2.1-SNAPSHOT</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index ee5a518946436de2f9ac852362599637cf0ed89f..143dbeba2a24d08da1f9b0104e7dff1b7a84cf1f 100644 (file)
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <version>1.8.1-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <groupId>org.opendaylight.netconf</groupId>
   <artifactId>sal-rest-docgen</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
+  <version>1.5.1-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
   <dependencyManagement>
@@ -25,7 +25,7 @@
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-parent</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
+        <version>1.2.1-SNAPSHOT</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index c6c7f1d28d23f2750adb8a895915fb7120e5f02d..17885056a930fdf5eefefce6e1d8e547a87012b5 100644 (file)
@@ -419,10 +419,14 @@ public class BaseYangSwaggerGenerator {
         operationSpec.setMethod("POST");
         operationSpec.setNotes(rpcDefn.getDescription());
         operationSpec.setNickname(rpcDefn.getQName().getLocalName());
-        if (!rpcDefn.getOutput().getChildNodes().isEmpty()) {
+        if (rpcDefn.getOutput() != null &&
+                rpcDefn.getOutput().getChildNodes() != null &&
+                !rpcDefn.getOutput().getChildNodes().isEmpty()) {
             operationSpec.setType("(" + rpcDefn.getQName().getLocalName() + ")output" + OperationBuilder.TOP);
         }
-        if (!rpcDefn.getInput().getChildNodes().isEmpty()) {
+        if (rpcDefn.getInput() != null &&
+                rpcDefn.getInput().getChildNodes() != null &&
+                !rpcDefn.getInput().getChildNodes().isEmpty()) {
             final Parameter payload = new Parameter();
             payload.setParamType("body");
             payload.setType("(" + rpcDefn.getQName().getLocalName() + ")input" + OperationBuilder.TOP);
index 75bfe75d0cd3d5ca00c586851690dd91f031633b..ede1f20c43c2a6ff7bfc9c1129248370359db881 100644 (file)
@@ -150,7 +150,8 @@ public class ModelGenerator {
         final String moduleName = module.getName();
         for (final RpcDefinition rpc : rpcs) {
             final ContainerSchemaNode input = rpc.getInput();
-            if (!input.getChildNodes().isEmpty()) {
+            if (input !=null && input.getChildNodes() != null &&
+                    !input.getChildNodes().isEmpty()) {
                 final JSONObject properties = processChildren(input.getChildNodes(), moduleName, models, true, schemaContext);
 
                 final String filename = "(" + rpc.getQName().getLocalName() + ")input";
@@ -164,7 +165,8 @@ public class ModelGenerator {
             }
 
             final ContainerSchemaNode output = rpc.getOutput();
-            if (!output.getChildNodes().isEmpty()) {
+            if (output !=null && output.getChildNodes() != null &&
+                    !output.getChildNodes().isEmpty()) {
                 final JSONObject properties = processChildren(output.getChildNodes(), moduleName, models, true, schemaContext);
                 final String filename = "(" + rpc.getQName().getLocalName() + ")output";
                 final JSONObject childSchema = getSchemaTemplate();
@@ -606,4 +608,4 @@ public class ModelGenerator {
         return schemaJSON;
     }
 
-}
\ No newline at end of file
+}
index 7f533877526aa89f5c54cf8097b56d9c7f3b07cb..d3cdc29e85c814aa312bdf20a700e3724a958909 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.netconf</groupId>
     <artifactId>restconf-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+    <version>1.5.1-SNAPSHOT</version>
   </parent>
   <artifactId>sal-restconf-broker</artifactId>
   <packaging>bundle</packaging>