From 0a47323940b1fc2ba3d200baafcc85e51bf023d7 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Wed, 25 Feb 2015 17:13:00 +0100 Subject: [PATCH 1/1] Expose proper revision of yang-types model in testtool Also provide the yang model based capabilities in hello message Change-Id: I56e2dfb48c5e1714bb829f39c1b020159aba95de Signed-off-by: Maros Marsalek --- opendaylight/netconf/netconf-testtool/pom.xml | 6 +++++- .../netconf/test/tool/NetconfDeviceSimulator.java | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/opendaylight/netconf/netconf-testtool/pom.xml b/opendaylight/netconf/netconf-testtool/pom.xml index 0172a28c16..6548d87b49 100644 --- a/opendaylight/netconf/netconf-testtool/pom.xml +++ b/opendaylight/netconf/netconf-testtool/pom.xml @@ -91,13 +91,17 @@ org.opendaylight.controller ietf-netconf-monitoring + + org.opendaylight.controller + ietf-netconf-monitoring-extension + ${project.groupId} netconf-client org.opendaylight.yangtools.model - ietf-yang-types-20130715 + ietf-yang-types org.opendaylight.yangtools.model diff --git a/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java b/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java index bb67af2032..72a9da6d08 100644 --- a/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java +++ b/opendaylight/netconf/netconf-testtool/src/main/java/org/opendaylight/controller/netconf/test/tool/NetconfDeviceSimulator.java @@ -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 {} -- 2.36.6