ONE: yang-data validation is an inference action 70/94970/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Feb 2021 18:47:25 +0000 (19:47 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Feb 2021 19:58:36 +0000 (20:58 +0100)
commit7d92d46bcf086d742ecb899b0ccd31ed7d60ec10
tree5a67ac3b41efbbe544ad7b69e139810853176482
parentff066b463c04c7b8380e02706cc3a6bb5a700ad8
ONE: yang-data validation is an inference action

We are accessing inference state during effective build, which is
a no-no, with all sorts of potential rabbits -- and we have
a continent which can tell a tale or two about that.

So realize that we just need to perform a simple substatement check
and be done with it.

This implementationallows other data nodes being there -- which is
in keeping with the spec. If somebody complains, the flip side
of yang-data is that it is only its sole container statement which
is accessed. In other words users are fully expected to ignore
other statements and treat that container as schema tree root.

JIRA: YANGTOOLS-1186
Change-Id: I802193d75d914216ce565f51c042547abb97caba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/rfc8040-parser-support/src/main/java/org/opendaylight/yangtools/rfc8040/parser/YangDataStatementSupport.java
yang/rfc8040-parser-support/src/test/java/org/opendaylight/yangtools/rfc8040/parser/YangDataExtensionTest.java