Binding generator v2 - uses statement - uses inner type #2 95/61595/1
authorJie Han <han.jie@zte.com.cn>
Tue, 18 Jul 2017 10:56:25 +0000 (18:56 +0800)
committerJie Han <han.jie@zte.com.cn>
Mon, 14 Aug 2017 08:11:55 +0000 (16:11 +0800)
commita0d2d0a7a9b1da764b1f5e37f0398748157b127b
tree65a45c559616d7d83f3c2d2aba8ab548fed58afe
parent5e3f23bf8cc98145dce3aee6d2dcb94cff92698d
Binding generator v2 - uses statement - uses inner type #2

- for current implementation of yangtools does not copy "types" from groupings,
but the original definition of a type is reused, so we should find inner type
added by uses by original node.
  this patch should be merged with:
  - https://git.opendaylight.org/gerrit/60529
  - https://git.opendaylight.org/gerrit/60582
- support uses leaf with inner type union, bits
- add yangs and test

Change-Id: Ibee57eb030a79e6ce06bb371e82257b7ab58ab98
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit 3c24618b19b500ead3091dc9858baf7c57b79a47)
binding2/mdsal-binding2-generator-api/src/main/java/org/opendaylight/mdsal/binding/javav2/generator/context/ModuleContext.java
binding2/mdsal-binding2-generator-impl/src/main/java/org/opendaylight/mdsal/binding/javav2/generator/impl/AuxiliaryGenUtils.java
binding2/mdsal-binding2-generator-impl/src/main/java/org/opendaylight/mdsal/binding/javav2/generator/impl/GenHelperUtil.java
binding2/mdsal-binding2-generator-impl/src/main/java/org/opendaylight/mdsal/binding/javav2/generator/yang/types/TypeProviderImpl.java
binding2/mdsal-binding2-generator-impl/src/test/java/org/opendaylight/mdsal/binding/javav2/generator/impl/AuxiliaryGenUtilsTest.java
binding2/mdsal-binding2-generator-impl/src/test/java/org/opendaylight/mdsal/binding/javav2/generator/impl/BindingGeneratorImplTest.java
binding2/mdsal-binding2-generator-impl/src/test/resources/uses-statement/test-uses-leaf-innertype2-base.yang [new file with mode: 0644]
binding2/mdsal-binding2-generator-impl/src/test/resources/uses-statement/test-uses-leaf-innertype2.yang [new file with mode: 0644]