Fix path namespace resolution 22/87022/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:15 +0000 (07:57 +0100)
commit5257d1f5ee59ade8f1b56078eda5e0b78e6d9183
treeec12eb502ac54725fe0b08f2b7e1a41a4fb4ee55
parent1441f51fcc3bd6e9dc67ad6f5810754c43a073d4
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]