Adjust test-tool to yangtools changes 18/63618/1
authorJakub Morvay <jmorvay@cisco.com>
Wed, 27 Sep 2017 13:10:47 +0000 (15:10 +0200)
committerJakub Morvay <jmorvay@cisco.com>
Wed, 27 Sep 2017 13:17:06 +0000 (15:17 +0200)
yang-maven-plugin adds revision to packaged yang file name. Netconf
test-tool should register yang resources with valid filenames, i.e
name@revision.yang, when preparing for assembly of its schema context.

Change-Id: I1914426b96029d7d2377f77b9f7df8beb14e607a
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/NetconfDeviceSimulator.java

index 53ca53ab70ab4eabfdeeb8011d80e6119c31c87b..7a922f7439d0d422e00caeb77601d00da385a245 100644 (file)
@@ -345,10 +345,10 @@ public class NetconfDeviceSimulator implements Closeable {
 
     private void addDefaultSchemas(final SharedSchemaRepository consumer) {
         SourceIdentifier srcId = RevisionSourceIdentifier.create("ietf-netconf-monitoring", "2010-10-04");
-        registerSource(consumer, "/META-INF/yang/ietf-netconf-monitoring.yang", srcId);
+        registerSource(consumer, "/META-INF/yang/ietf-netconf-monitoring@2010-10-04.yang", srcId);
 
         srcId = RevisionSourceIdentifier.create("ietf-netconf-monitoring-extension", "2013-12-10");
-        registerSource(consumer, "/META-INF/yang/ietf-netconf-monitoring-extension.yang", srcId);
+        registerSource(consumer, "/META-INF/yang/ietf-netconf-monitoring-extension@2013-12-10.yang", srcId);
 
         srcId = RevisionSourceIdentifier.create("ietf-yang-types", "2013-07-15");
         registerSource(consumer, "/META-INF/yang/ietf-yang-types@2013-07-15.yang", srcId);