Fix path namespace resolution 21/87021/1
authormiroslav.kovac <miroslav.kovac@pantheon.tech>
Mon, 16 Dec 2019 15:57:22 +0000 (16:57 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 17 Jan 2020 06:57:00 +0000 (07:57 +0100)
commitf81613d9e3f4973495aa36099673e2a3211644be
tree3f336a1606f63dfd18687489c132239a5d86df74
parent57e81c9aae580aa9902aaf4e7cfd7ea6aef0ca56
Fix path namespace resolution

If a path is defined in terms of a submodule-local import,
SchemaContextUtil.findDataSchemaNode() breaks down because
it's reparse attempt fails to find the import in the actual
module.

SchemaContextUtil is providing findDataTreeSchemaNode() which
works properly on parsed PathExpression, use that instead.

JIRA: MDSAL-499
Change-Id: Ifa8a8958d7118d851d27fcc2c70c6d8382e3e3c0
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/yang/types/AbstractTypeProvider.java
binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/mdsal/binding/generator/impl/Mdsal499Test.java [new file with mode: 0644]
binding/mdsal-binding-generator-impl/src/test/resources/mdsal-499/child.yang [new file with mode: 0644]
binding/mdsal-binding-generator-impl/src/test/resources/mdsal-499/imported.yang [new file with mode: 0644]
binding/mdsal-binding-generator-impl/src/test/resources/mdsal-499/parent.yang [new file with mode: 0644]