Lookup leaf key methods in parents 26/67826/3
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 1 Feb 2018 16:37:20 +0000 (17:37 +0100)
committerTom Pantelis <tompantelis@gmail.com>
Mon, 5 Feb 2018 06:06:36 +0000 (06:06 +0000)
commit6ac608d5c6b02fbcc3ee01af8fc4e3301a8ed52b
tree2eb9f441cff28a630c06623c5f9328b084a2cabe
parent972489522808ad9777d4c190a2a0c3896ed0fca4
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>
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]