Expose proper revision of yang-types model in testtool 33/15733/4
authorMaros Marsalek <mmarsale@cisco.com>
Wed, 25 Feb 2015 16:13:00 +0000 (17:13 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Thu, 5 Mar 2015 07:48:35 +0000 (08:48 +0100)
Also provide the yang model based capabilities in hello message

Change-Id: I56e2dfb48c5e1714bb829f39c1b020159aba95de
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/netconf/netconf-testtool/pom.xml
opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java

index 0172a28..6548d87 100644 (file)
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>ietf-netconf-monitoring</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>ietf-netconf-monitoring-extension</artifactId>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>netconf-client</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools.model</groupId>
-            <artifactId>ietf-yang-types-20130715</artifactId>
+            <artifactId>ietf-yang-types</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools.model</groupId>
index bb67af2..72a9da6 100644 (file)
@@ -354,8 +354,11 @@ public class NetconfDeviceSimulator implements Closeable {
         SourceIdentifier sId = new SourceIdentifier("ietf-netconf-monitoring", "2010-10-04");
         registerSource(consumer, "/META-INF/yang/ietf-netconf-monitoring.yang", sId);
 
-        sId = new SourceIdentifier("ietf-yang-types", "2013-07-15");
-        registerSource(consumer, "/META-INF/yang/ietf-yang-types@2013-07-15.yang", sId);
+        sId = new SourceIdentifier("ietf-netconf-monitoring-extension", "2013-12-10");
+        registerSource(consumer, "/META-INF/yang/ietf-netconf-monitoring-extension.yang", sId);
+
+        sId = new SourceIdentifier("ietf-yang-types", "2010-09-24");
+        registerSource(consumer, "/META-INF/yang/ietf-yang-types.yang", sId);
 
         sId = new SourceIdentifier("ietf-inet-types", "2010-09-24");
         registerSource(consumer, "/META-INF/yang/ietf-inet-types.yang", sId);
@@ -420,6 +423,7 @@ public class NetconfDeviceSimulator implements Closeable {
 
         @Override
         public AutoCloseable registerCapabilityListener(final CapabilityListener listener) {
+            listener.onCapabilitiesAdded(caps);
             return new AutoCloseable() {
                 @Override
                 public void close() throws Exception {}

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.