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 0172a28c16b0d0a98e43665cec3339863623bd3c..6548d87b49bf827d20c94e5ea60316b65b78f8ef 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 bb67af2032793fdac1a8038377c8550b5f045d50..72a9da6d089e734793ed0a2889c0893e69970d82 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 {}