<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>
<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>
<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>
<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-->
<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>
<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>
<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>
<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>
<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>
<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>
<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-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.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.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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
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;
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;
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;
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;
}
}
- 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();
case NONE:
return;
case MERGE:
- mergeParentMap(rwtx, path, changeData);
+ mergeParentMixin(rwtx, path, changeData);
rwtx.merge(LogicalDatastoreType.CONFIGURATION, path, changeData);
break;
case CREATE:
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:
}
}
- 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);
}
}
}
+ @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 {
--- /dev/null
+<!--
+ ~ 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
--- /dev/null
+<!--
+ ~ 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
--- /dev/null
+<!--
+ ~ 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
--- /dev/null
+<!--
+ ~ 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
--- /dev/null
+<!--
+ ~ 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
--- /dev/null
+<!--
+ ~ 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
--- /dev/null
+<!--
+ ~ 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
}
}
- list mapping-node{
+ list mapping-node {
key "id";
leaf id {
type string;
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;
+ }
}
}
}
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 {
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<parent>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-parent</artifactId>
- <version>0.6.0-SNAPSHOT</version>
+ <version>0.6.1-SNAPSHOT</version>
<relativePath/>
</parent>
<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>
<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>
* 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;
this.executor = executor;
}
+ public DOMRpcService getDeviceRpc() {
+ return deviceRpc;
+ }
+
@Nonnull
@Override
public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull final SchemaPath type, final NormalizedNode<?, ?> input) {
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;
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);
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
jsonWriter.name("error-message").value(restconfError.getErrorMessage());
}
+ // optional node
+ if (restconfError.getErrorInfo() != null) {
+ jsonWriter.name("error-info").value(restconfError.getErrorInfo());
+ }
+
jsonWriter.endObject();
}
writer.writeCharacters(restconfError.getErrorMessage());
writer.writeEndElement();
}
+
+ // optional node
+ if (restconfError.getErrorInfo() != null) {
+ writer.writeStartElement("error-info");
+ writer.writeCharacters(restconfError.getErrorInfo());
+ writer.writeEndElement();
+ }
}
writer.writeEndElement();
*/
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;
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;
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;
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));
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.
* @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.
* @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.
* @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;
/**
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;
*
* @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);
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");
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);
}
}
+ @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);
return result;
} catch (final Exception e) {
- if(!isDataMissing(e)) {
+ if (!isDataMissing(e)) {
propagateExceptionAs(uriPath, e, "GET");
}
}
}
+ @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;
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());
outputContext = RestconfImpl.getInstance().invokeRpc(uriPath, "", null);
}
- if(outputContext.getData() != null) {
+ if (outputContext.getData() != null) {
output = toJson(outputContext);
}
} catch (final Exception e) {
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;
}
}
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());
}
}
private static ErrorType toRpcErrorType(final RestconfError.ErrorType errorType) {
- switch(errorType) {
+ switch (errorType) {
case TRANSPORT: {
return ErrorType.TRANSPORT;
}
}
}
}
+
+ 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;
+ }
+ }
}
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 {
*/
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;
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;
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;
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(
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");
}
"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);
}
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), "");
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);
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;
}
}
- public TestXmlBodyReader () throws NoSuchFieldException, SecurityException {
+ public TestXmlBodyReader() throws Exception {
super();
this.xmlBodyReader = new XmlNormalizedNodeBodyReader();
}
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());
+ }
+ }
}
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.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;
}
}
-
- public TestXmlBodyReaderMountPoint() throws NoSuchFieldException,
- SecurityException {
+ public TestXmlBodyReaderMountPoint() throws Exception {
super();
this.xmlBodyReader = new XmlNormalizedNodeBodyReader();
}
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());
+ }
+ }
}
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;
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);
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);
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")
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);
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);
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();
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")
}
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();
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 {
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();
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());
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
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
@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
--- /dev/null
+/*
+ * 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());
+ }
+ }
+}
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;
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
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());
+ }
+ }
+
}
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
@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
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;
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;
+ 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());
+ }
}
--- /dev/null
+<!--
+ ~ 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"/>
--- /dev/null
+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
<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>
<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>
<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>
<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>
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);
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";
}
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();
return schemaJSON;
}
-}
\ No newline at end of file
+}
<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>