Bug 2444 - Yin export of all YANG statements 06/59006/25
authorPeter Kajsa <pkajsa@cisco.com>
Mon, 26 Jun 2017 09:34:49 +0000 (11:34 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 3 Oct 2017 09:19:19 +0000 (09:19 +0000)
commit1a79a27329b0875c81ea52edc21a5ac1c768d1bb
treedacb2b11807518ca49b3d06ab7dee93ba32a8917
parent728e52c158fca28a964894a21d281329bc2e1b11
Bug 2444 - Yin export of all YANG statements

Currently yang-export exports effective world of yang into yin,
what is not correct, because lot of information is not accesible
in effective world anymore.
So the correct solution is to export declared world of yang,
where all information is accessible and in raw form and that is
exactly what we need.
Export of effective world is still retained for cases when
we don't have access to declared form of supplied module or
we want to emit also instantiated statements (e.g. statements added
by uses or augment)

Change-Id: Ic2bc559623d9e72c59e2ed7f6a797cd67933ada6
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
37 files changed:
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaToStatementWriterAdaptor.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/YangModuleWriter.java
yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/YinExportUtils.java
yang/yang-model-export/src/test/java/org/opendaylight/yangtools/yang/model/export/test/Bug2444Test.java
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/default.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/deviation-target.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/deviation.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/identities.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/import-yang1.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/include.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/leafref-yang1.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/modifier-yang1.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/must.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/notification.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/submodule.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/unique.yang
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/action@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/anydata@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/binary-spec@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/default@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/deviation-target@2017-01-20.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/deviation@2017-01-20.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/identities@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/import-yang1@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/import@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/include@2017-06-26.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/leafref-yang1@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/leafref@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/modifier-yang1@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/modifier@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/must-yang1@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/must@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/notification@1970-01-01.yin
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/submodule@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/unique@1970-01-01.yin
yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.yin