Lookup leaf key methods in parents 17/67917/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 1 Feb 2018 16:37:20 +0000 (17:37 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 5 Feb 2018 12:50:00 +0000 (13:50 +0100)
commitd295b816714240cccc7d7161c77ee00d2f0ef155
tree901c1ae1cb69f7282c677397cd0d22fca4e69499
parent076dcd04523bd003935796c3795ea4f81dfa8898
Lookup leaf key methods in parents

Union is a valid key type and it can actually come from a grouping,
in which case it gets generated as an inner type. If that happens
the typedef is not populated into the usual places, leading to
a failure to find method return type -- leading to a missing key
member.

This is a problem similar to YANGTOOLS-424, so let's use the same
ModuleContext approach taken then.

JIRA: MDSAL-161
Change-Id: Id342701d603bdd2b9b78ba3295c8eae60f253429
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6ac608d5c6b02fbcc3ee01af8fc4e3301a8ed52b)
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/impl/BindingGeneratorImpl.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/impl/ModuleContext.java
binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/mdsal/binding/generator/impl/Mdsal161Test.java [new file with mode: 0644]
binding/mdsal-binding-generator-impl/src/test/resources/mdsal161.yang [new file with mode: 0644]