YANG 1.1 submodules: Relax circular dependency errors.#50
Open
ksallberg wants to merge 1 commit into
Open
Conversation
YANG 1.1 submodules including each other should not cause circular
dep errors, but YANG 1.0 submodules should.
RFC6020 (YANG 1.0):
There MUST NOT be any circular chains of imports or includes. For
example, if submodule "a" includes submodule "b", "b" cannot include
"a".
RFC7950 (YANG 1.1):
o Changed the scoping rules for definitions in submodules. A
submodule can now reference all definitions in all submodules that
belong to the same module, without using the "include" statement.
o For backward compatibility with YANG version 1, a submodule is
allowed to include another submodule belonging to the same module,
but this is not in YANG version 1.1 (see Section 5.1).
o There MUST NOT be any circular chains of imports. For example, if
module "a" imports module "b", "b" cannot import "a".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
It is currently not possible to compile models for Nokia SROS using yanger. This is because they typically have multiple submodules belonging to the same module, including each other.
Reproduction
The Nokia SROS Yang models are accessible from github:
url: https://github.com/nokia/7x50_YangModels.git
checkout: sros_20.5.r1
subdir: YANG
cd YANG && yanger nokia-conf.yang
Proposed change:
YANG 1.1 submodules including each other should not cause circular
dep errors, but YANG 1.0 submodules should.
Testing
Minimal version of the Nokia YANG models attached and are run as lux tests
RFC Support: