Can a submodule belong to multiple modules in YANG?
Can a submodule belong to multiple modules in YANG?
I have a submodule which I would like to be used in two modules. Is it possible to use the one submodule in multiple modules and how to do that?
1 Answer
1
No. A submodule may only belong to one module and may be included only by its main module or a submodule that belongs to the same main module.
Submodules are partial modules that contribute definitions to a
module. A module may include any number of submodules, but each
submodule may belong to only one module.
RFC7950, Section 5.1, Modules and submodules
A submodule MUST only be included by either the module to which it
belongs or another submodule that belongs to that module.
RFC7950, Section 7.2.2, The "belongs-to" statement
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
This question is perfectly clear and should not be closed.
– predi
Jul 2 at 6:41