简体   繁体   English

子模块可以属于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? 是否可以在多个模块中使用一个子模块,该怎么做?

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 RFC7950,第5.1节,模块和子模块

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 RFC7950,第7.2.2节“属于”语句

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM