Bug 6884 - [Yang 1.1] Submodule can reference all definitions in all submodules 03/51903/4
authorPeter Kajsa <pkajsa@cisco.com>
Mon, 13 Feb 2017 08:23:17 +0000 (09:23 +0100)
committerRobert Varga <nite@hq.sk>
Thu, 23 Feb 2017 11:50:16 +0000 (11:50 +0000)
commite6d72aba616f90f01b1f4bc3090f8d382c7e7909
tree2af1d01cc704f2b9caf09699410f99f734c92759
parent391af17371d62704af79911f0f6468437a27246e
Bug 6884 - [Yang 1.1] Submodule can reference all definitions in all submodules

Since Yang 1.1, it has been allowed a submodule to reference all definitions
in all submodules that belong to the same module, without using the "include"
statement. This patch also deals with possible circular chains of includes
between submodules.

Change-Id: I2b3d19fc2c867882fc89f042bbe5febaf89bc2ea
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/Bug6884Test.java [new file with mode: 0644]
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/EffectiveModulesAndSubmodulesTest.java
yang/yang-parser-impl/src/test/resources/rfc7950/bug6884/circular-includes/foo.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/rfc7950/bug6884/circular-includes/sub-foo-2.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/rfc7950/bug6884/circular-includes/sub-foo.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/rfc7950/bug6884/yang1-1/foo.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/rfc7950/bug6884/yang1-1/sub-foo-2.yang [new file with mode: 0644]
yang/yang-parser-impl/src/test/resources/rfc7950/bug6884/yang1-1/sub-foo.yang [new file with mode: 0644]