Bug 6419: Fixed SchemaContextEmitter's emitContainer method 54/44054/1
authorIgor Foltin <ifoltin@cisco.com>
Mon, 15 Aug 2016 13:14:56 +0000 (15:14 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 16 Aug 2016 09:53:29 +0000 (09:53 +0000)
Method emitContainer now emits must statements only once
through the method emitConstraints.

Change-Id: Ib818d7dc25b07df3f35559166a0ef933d19808d0
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
(cherry picked from commit a664580e83425f01943698e7ff52e48bd3411cfb)

yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java
yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.xml

index 81ac9ba8d0458e7f3ca2cedbc4ffb4ba76ef08be..baa2dbddee139bf3b810b31f154e4e07bd7e0075 100644 (file)
@@ -757,7 +757,6 @@ class SchemaContextEmitter {
         emitConstraints(child.getConstraints());
         // FIXME: BUG-2444: whenNode //:Optional
         // FIXME: BUG-2444: *(ifFeatureNode )
-        emitMustNodes(child.getConstraints().getMustConstraints());
         emitPresenceNode(child.isPresenceContainer());
         emitConfigNode(child.isConfiguration());
         emitDocumentedNode(child);
index 1bc428e57ea9300cd8414cc7cad87d6f7fd2e788..52ffe1a036ba5c7ff51a844f3da253e23d0a6e9f 100644 (file)
         <status value="current"></status>
     </leaf>
     <container name="test-container-1">
-        <must condition="bar != 'foo'"></must>
         <must condition="bar != 'foo'"></must>
         <presence value="false"></presence>
         <config value="true"></config>