Bug 2444 - fix of several issues in yang-model-export 16/57816/12
authorPeter Kajsa <pkajsa@cisco.com>
Thu, 25 May 2017 13:42:57 +0000 (15:42 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 13 Jun 2017 15:10:47 +0000 (15:10 +0000)
commitc70e4bd885c5ae2c12964c69e11981a5600fe389
tree3da653577e68811016d873ada7eb99469a6ec26e
parent60d4616dc1e403bf4c875ca9c0135f7d39c95ec2
Bug 2444 - fix of several issues in yang-model-export

Add Yin export of:
- action, anydata and modifier statements
- must statement in notification, input and output
- description and reference in import statements
- notification statements in data nodes
- unique statement in list statements
- optional of organisation and contact statements
- require-instance statement in leafref specification
- length statement in binary specification
- multiple base identities in identity-ref type
  and identity definition
- default values in leaf-list statement

Change-Id: I1e1662716caaf8fe118bb7db55148bc13ee81951
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 [moved from yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/Rfc6020ModuleWriter.java with 90% similarity]
yang/yang-model-export/src/test/java/org/opendaylight/yangtools/yang/model/export/test/Bug2444Test.java [new file with mode: 0644]
yang/yang-model-export/src/test/java/org/opendaylight/yangtools/yang/model/export/test/SchemaContextEmitterTest.java
yang/yang-model-export/src/test/java/org/opendaylight/yangtools/yang/model/export/test/YinExportTestUtils.java [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/action.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/anydata.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/binary-spec.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/default.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/identities.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/import-yang1.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/import.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/leafref-yang1.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/leafref.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/modifier-yang1.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/modifier.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/must-yang1.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/must.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/notification.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yang/unique.yang [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/action@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/anydata@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/binary-spec@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/default@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/identities@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/import-yang1@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/import@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/leafref-yang1@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/leafref@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/modifier-yang1@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/modifier@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/must-yang1@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/must@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/notification@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/bugs/bug2444/yin/unique@1970-01-01.yin [new file with mode: 0644]
yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.yin