1. RFC8525(YANG Library)ベースの勉強資料です。
下線、ハイライトは個人的に重要そうなところ。斜体、#はメモ。
原文のMUST/REQUIRED/SHALL/SHOULD/MAY/OPTIONAL等のRFC2119用語は原文のまま残しています。
MUST、REQUIRED、SHALL:絶対的な要求事項
MUST NOT:絶対的な禁止事項
SHOULD、RECOMMENDED:慎重に重要性を判断するべき要求事項
SHOULD NOT、NOT RECOMMENDED:慎重に重要性を判断するべき禁止事項
MAY、OPTIONAL:オプション。
間違っていたらコメントをお願いします。
元ネタ(RFC8525)
https://tools.ietf.org/html/rfc8525
Errata
https://www.rfc-editor.org/errata_search.php?rfc=8525
YANG Library
Abstract
This document describes a YANG library that provides information about the YANG modules,
datastores, and datastore schemas used by a network management server. Simple caching
mechanisms are provided to allow clients to minimize retrieval of this information. This
version of the YANG library supports the Network Management Datastore Architecture (NMDA) by
listing all datastores supported by a network management server and the schema that is used by
each of these datastores.
ネットワーク管理サーバーで使用されるYANG module、datastore、datastore schemaに関する情報を提供するYANG
libraryについて説明する。クライアントによる情報の取得を最小限にするためのシンプルなキャッシュメカニズムが提供され
る。本バージョンのYANG libraryは、ネットワーク管理サーバーでサポートされている全てのdatastoreと各datastoreで
使用されているschemaをリストすることによるNetwork Management Datastore Architecture (NMDA)をサポートす
る。
This document obsoletes RFC 7895.
RFC 7895を廃止する。
Table of Contents
Abstract 1
Table of Contents 1
1. Introduction 2
1.1. Terminology 3
2. Objectives 3
3. YANG Library Data Model 4
4. YANG Library YANG Module 7
・typedef 16
revision-identifier 16
・grouping 16
1
2. module-identification-leafs 16
location-leaf-list 17
module-implementation-parameters 17
module-set-parameters 17
yang-library-parameters 19
・Top-level container 20
・Notifications 20
・Legacy groupings 21
grouping module-list 21
grouping common-leafs 22
grouping schema-leaf 23
・Legacy operational state data nodes 23
・Legacy notifications 23
5. IANA Considerations 24
6. Security Considerations 24
Appendix A. Summary of Changes from RFC 7895 25
Appendix B. Example YANG Library Instance for a Basic Server 26
Appendix C. Example YANG Library Instance for an Advanced Server 27
Appendix D. 5.6.5. Implementing a Module 30
1. Introduction
There is a need for a standard mechanism to expose which YANG modules [RFC7950], datastores
[RFC8342], and datastore schemas [RFC8342] are in use by a network management server.
ネットワーク管理サーバーが使用するYANG module [RFC7950], datastore [RFC8342]、datastore schema
[RFC8342]を公開するための標準的なメカニズムが必要である。
This document defines the YANG module "ietf-yang-library" that provides this information.
This version of the YANG library is compatible with the Network Management Datastore
Architecture (NMDA) [RFC8342]. The previous version of the YANG library, defined in
[RFC7895], is not compatible with the NMDA since it assumes that all datastores have exactly
the same schema. This is not necessarily true in the NMDA since dynamic configuration
datastores may have their own datastore schema. Furthermore, the operational state datastore
may support non-configurable YANG modules in addition to the YANG modules supported by
conventional configuration datastores.
それらの情報を提供するYANG module "ietf-yang-library"を定義する。このバージョンのYANG libraryはNetwork
Management Datastore Architecture (NMDA) [RFC8342]と互換性がある。[RFC7895]で定義されている以前のYANG
libraryは全てのdatastoreが同じschemaを持つことを前提としているため、NMDAと互換性が無い。Dynamic
configuration datastoreは独自のdatastore schemaの場合もあるため、NMDAではこの前提が当てはまらない。さら
に、operational state datastoreは、従来のconfiguration datastoreでサポートされるYANG moduleに加えて
non-configurable YANG moduleをサポートできる。
The old YANG library definitions have been retained (for backwards-compatibility reasons), but
the definitions have been marked as deprecated. For backwards compatibility, an
NMDA-supporting server SHOULD populate the deprecated "/modules-state" tree in a
backwards-compatible manner. The new "/yang-library" tree will be ignored by legacy clients
2
3. but will provide all the data needed for NMDA-aware clients (which will ignore the
"/modules-state" tree). The recommended approach to populate "/modules-state" is to report
the YANG modules with "config true" data nodes that are configurable via conventional
configuration datastores and the YANG modules with "config false" data nodes that are returned
via a Network Configuration Protocol (NETCONF) <get> operation or equivalent.
古いYANG libraryの定義は後方互換性のために保持されるが、その定義は非推奨とされる。後方互換性のために、NMDAをサ
ポートするサーバーは後方互換性のあるように"/modules-state" treeにデータを追加すること(SHOULD)。新しい
"/yang-library" treeについて、古いクライアントからは無視され、NMDA対応のクライアント("/modules-state"
treeは無視する)からは必要なデータを取得のために使用される。"/modules-state"を生成するための推奨方法は、
configuration datastoreで"config true"のdata nodeを含むYANG moduleと、NETCONFで<get>等で返される
"config false" data nodeを含むYANG moduleをreportすることである。
The YANG library information can be different on every server, and it can change at runtime or
across a server reboot. If a server implements multiple network management protocols to
access the server's datastores, then each such protocol may have its own conceptual
instantiation of the YANG library.
YANG libraryの情報は各サーバーでことなう場合があり、運用時や再起動時に変わる可能性がある。サーバーがサーバーの
datastoreにアクセスするために複数のネットワーク管理プロトコルを実装している場合、各プロトコルはYANG libraryの概
念的なインスタンスをもつ。
If a large number of YANG modules are utilized by a server, then the YANG library contents can
be relatively large. Since the YANG library contents change very infrequently, it is
important that clients be able to cache the YANG library contents and easily identify whether
their cache is out of date.
多数のYANG moduleがサーバーによって利用されている場合、YANG libraryのコンテンツは大きくなる場合がある。YANG
libraryのコンテンツはあまり変更されないため、クライアントがYANG libraryの内容をキャッシュして、キャッシュが期限
切れか簡単に確認できることが重要である。
1.1. Terminology
YANG library サーバーによって使用されるYANG module、submodule、
datastore、datastore schema。
YANG library content identifier サーバーが生成するYANG libraryのコンテンツの識別子。
2. Objectives
The following information is needed by a client application (for each YANG module in the
library) to fully utilize the YANG data modeling language:
クライアントは各YANG moduleの以下の情報を必要とする。
● name: The name of the YANG module.
YANG module name。
● revision: If defined in the YANG module or submodule, the revision is derived from the
most recent revision statement within the module or submodule.
YANG module/submoduleで定義されている場合、revisionは最新のrivision statementである。
● submodule list: The name and (if defined) revision of each submodule used by the module
must be identified.
Moduleが使用する各submodule nameと定義されている場合revisionによって識別される。
3
4. ● feature list: The name of each YANG feature supported by the server must be identified.
サーバーがサポートするYANG feature。
● deviation list: The name of each YANG module with deviation statements affecting a given
YANG module must be identified.
YANG moduleに影響のあるdeviation statementを含むYANG module name。
In addition, the following information is needed by a client application for each datastore
supported by a server:
サーバーでサポートされるdata storeに関しては以下の情報も必要である。
● identity: The YANG identity for the datastore.
DatastoreのYANG identity。
● schema: The schema (i.e., the set of modules) implemented by the datastore.
Datastoreに実装されるschema(module)。
In order to select one out of several possible designs for the YANG library data model, the
following criteria were used:
YANG library data modelの設計のために以下の基準を用いる。
1. The information must be efficient for a client to consume. Since the size of the YANG
library can be quite large, it should be possible for clients to cache the YANG library
information.
クライアントが情報を効率的に使用できること。YANG libraryのサイズは大きくなる可能性があるため、クライアントが
YANG library情報をキャッシュすることが可能であること。
2. A dynamic configuration datastore must be able to implement a module or feature that is
not implemented in the conventional configuration datastores.
Dynamic configuration datastoreは、従来のconfiguration datastoreに実装されていないmodule,
featureを実装できること。
3. It must be possible to not implement a module or feature in <operational>, even if it is
implemented in some other datastore. This is required for transition purposes; a server
that wants to implement <operational> should not have to implement all modules at once.
他のdatastoreに実装されている場合であっても、<operational>にmodule, featureを実装しないことが可能であ
ること。<operational>を実装するサーバーは一度に全てのmoduleを実装する必要がない。
4. A given module can only be implemented in one revision in all datastores. If a module is
implemented in more than one datastore, the same revision is implemented in all these
datastores.
特定のmoduleは全てのdatastoreの1つのrevisionにのみ実装できる。Moduleが複数のdatastoreに実装されている
場合、同じrevisionが全てのdatastoreに実装される。
5. Multiple revisions can be used for import, if import-by revision is used.
Import-by revisionが使用されている場合、importに複数のrevisionを使用できる。
#implementじゃなくてimportの場合は複数revisionあってもいいってことか。
6. It must be possible to use the YANG library by schema mount[RFC8528].
Schema mountでYANG libraryを使用できる。
3. YANG Library Data Model
The "ietf-yang-library" YANG module provides information about the modules, submodules,
datastores, and datastore schemas supported by a server. All data nodes in the
4
5. "ietf-yang-library" module are "config false" and thus only accessible in the operational
state datastore.
“ietf-yang-library” YANG moduleは、サーバーでサポートされているmodule、submodule、datastore、
datastore schemaに関する情報を提供する。”ietf-yang-library” moduleの全てのdata nodeは”config false”で
ある。そのため、operational state datastoreでのみアクセスが可能である。
The conceptual model of the YANG library is depicted in Figure 1. Following the NMDA, every
datastore has an associated datastore schema. A datastore schema is a union of module sets,
and every module set is a collection of modules and submodules, including the modules and
submodules used for imports. Note that multiple datastores may refer to the same datastore
schema. Furthermore, it is possible for individual datastore schemas to share module sets. A
common use case is the operational state datastore schema, which is a superset of the schema
used by conventional configuration datastores.
YANG libraryのコンセプト図を上記に示す。Datastoreに関連するdatastore schemaがある。Datastore schemaは
module setを統合したものである。全てのmodule setはmodule、submoduleの集合である。複数のdatastoreが同じ
datastore schemaを参照する可能性がある。また、複数のdatastore schemaがmodule setを共有することも可能であ
る。例えば、operational state datastore schemaは、configuration datastoreのスーパーセットである(前者が
が後者を含むということ)。
Below is the YANG tree diagram for the "ietf-yang-library" module, excluding the deprecated
"/modules-state" tree:
以下は、廃止予定の”/modules-state” treeを除いた”ietf-yang-library” moduleのYANG tree diagramである。
module: ietf-yang-library
+--ro yang-library
+--ro module-set* [name]
| +--ro name string
| +--ro module* [name]
| | +--ro name yang:yang-identifier
| | +--ro revision? revision-identifier
| | +--ro namespace inet:uri
| | +--ro location* inet:uri
| | +--ro submodule* [name]
| | | +--ro name yang:yang-identifier
| | | +--ro revision? revision-identifier
| | | +--ro location* inet:uri
| | +--ro feature* yang:yang-identifier
| | +--ro deviation* -> ../../module/name
| +--ro import-only-module* [name revision]
| +--ro name yang:yang-identifier
| +--ro revision union
| +--ro namespace inet:uri
| +--ro location* inet:uri
| +--ro submodule* [name]
| +--ro name yang:yang-identifier
| +--ro revision? revision-identifier
5
6. | +--ro location* inet:uri
+--ro schema* [name]
| +--ro name string
| +--ro module-set* -> ../../module-set/name
+--ro datastore* [name]
| +--ro name ds:datastore-ref
| +--ro schema -> ../../schema/name
+--ro content-id string
notifications:
+---n yang-library-update
+--ro content-id -> /yang-library/content-id
The "/yang-library" container holds the entire YANG library. The container has the following
child nodes:
“/yang-library” containerはYANG library全てを持つ。Containerには以下のchild nodeがある。
/yang-library/module-set The "/yang-library/module-set" contains entries representing
module sets. The list "/yang-library/module-set/module"
enumerates the modules that belong to the module set. A
module is listed together with its submodules (if any), a set
of features, and any deviation modules. The list
"/yang-library/module-set/import-only-module" lists all
modules (and their submodules) used only for imports. The
assignment of a module to a module set is at the server's
discretion. This revision of the YANG library attaches no
semantics as to which module set a module is listed in.
Module setのエントリを含む。list
“/yang-library/module-set/module”はmodule setに属するmoduleであ
る。Moduleはsubmodule、feature、deviation modueleとともに示され
る。
List “/yang-library/module-set/import-only-module”はimportにの
み使用される全てのmodule、submoduleを示す。Module setへのmoduleの割
り当てはサーバーに任される。
/yang-library/schema The "/yang-library/schema" list contains an entry for each
datastore schema supported by the server. All conventional
configuration datastores use the same "schema" list entry. A
dynamic configuration datastore may use a different datastore
schema from the conventional configuration datastores and
hence may require a separate "schema" entry. A "schema"
entry has a leaf-list of references to entries in the
"module-set" list. The schema consists of the union of all
modules in all referenced module sets.
サーバーがサポートするdatastore schemaのエントリを含む。全ての従来の
configuration datastoreは同じ”schema” listエントリを使用する。
Dynamic configuration datastoreは、従来のconfiguration
datastoreとは異なるdatastore schemaを使用でき、異なる”schema”エント
リを使用する場合がある。”schema”エントリは”module-set” list内のエント
リを参照するleaf-listをもつ。schemaは参照される全てのmodule set内の全
てのmoduleで構成される。
#datastore schema -(union of)-> module set のこと。
/yang-library/datastore The "/yang-library/datastore" list contains one entry for
each datastore supported by the server, and it identifies the
datastore schema associated with a datastore via a reference
6
7. to an entry in the "schema" list. Each supported
conventional configuration datastore has a separate entry,
pointing to the same "schema" list element.
サーバーがサポートするdatastore毎に1エントリある。”schema” listのエン
トリへの参照でdatastoreに関連付くdatastore schemaを指定する。サポート
される従来のconfiguration datastoreのエントリは同じ”schema” listエ
ントリを参照する。
#running、startupとかの標準的なconfig datastoreは同じ”schema”
/yang-library/content-id The "/yang-library/content-id" leaf contains the YANG library
content identifier, which is an implementation-specific
identifier representing the current information in the YANG
library on a specific server. The value of this leaf MUST
change whenever the information in the YANG library changes.
There is no requirement that the same information always
result in the same "content-id" value. This leaf allows a
client to fetch all schema information once, cache it, and
only refetch it if the value of this leaf has been changed.
If the value of this leaf changes, the server also generates
a "yang-library-update" notification.
YANG libraryのcontent identifierが含まれる。これはサーバーのYANG
libraryの現在の情報を示すインプリ固有の識別子である。このleafの値はYANG
library内の情報が変わったら変更する必要がある(MUST)。同じYANG
libraryが常に同じ”content-id”の値になる必要はない。クライアントはこの
leafを用いて一度全てのschemaを取得したらその情報をキャッシュし、このleaf
の値が変更されたら再度取得することができる。このleafの値が変わるとサーバー
は”yang-library-update” notificationを生成する。
Note that for a NETCONF server implementing the NETCONF extensions to support the NMDA
[RFC8526], a change of the YANG library content identifier results in a new value for the
:yang-library:1.1 capability defined in [RFC8526]. Thus, if such a server implements NETCONF
notifications [RFC5277] and the "netconf-capability-change" notification [RFC6470], a
"netconf-capability-change" notification is generated whenever the YANG library content
identifier changes.
NMDAをサポートするためにNETCONF extensionをサポートするNETCONFサーバーでは、YANG libraryのcontent-idを変
更すると[RFC 8826]で定義された”:yang-library:1.1” capabilityに新しい値が通知される。サーバーがNETCONF
notificationと”netconf-capability-change” notificationを実装する場合、”netconf-capability-change”
notificationがYANG library content-idが変わるたびに生成される。
4. YANG Library YANG Module
The "ietf-yang-library" YANG module imports definitions from the "ietf-yang-types" and
"ietf-inet-types" modules defined in [RFC6991] and from the "ietf-datastores" module defined
in [RFC8342]. While the YANG module is defined using YANG version 1.1, the YANG library
supports YANG modules written in any version of YANG.
“ietf-yang-library” YANG moduleはRFC6991で定義される”ietf-yang-types”と”ietf-inet-types”および
RFC8342で定義される”ietf-datastores”から定義をimportする。YANG moduleはYANG version 1.1を使用して定義さ
れるが、YANG libraryは任意のYANG versionのYANG moduleをサポートする。
<CODE BEGINS> file "ietf-yang-library@2019-01-04.yang"
7
8. module ietf-yang-library {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
prefix yanglib;
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-datastores {
prefix ds;
reference
"RFC 8342: Network Management Datastore Architecture
(NMDA)";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Author: Andy Bierman
<mailto:andy@yumaworks.com>
Author: Martin Bjorklund
<mailto:mbj@tail-f.com>
Author: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Author: Kent Watsen
<mailto:kent+ietf@watsen.net>
Author: Robert Wilton
<mailto:rwilton@cisco.com>";
description
"This module provides information about the YANG modules,
datastores, and datastore schemas used by a network
management server.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.
Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8525; see
8
9. the RFC itself for full legal notices.";
revision 2019-01-04 {
description
"Added support for multiple datastores according to the
Network Management Datastore Architecture (NMDA).";
reference
"RFC 8525: YANG Library";
}
revision 2016-04-09 {
description
"Initial revision.";
reference
"RFC 7895: YANG Module Library";
}
/*
* Typedefs
*/
typedef revision-identifier {
type string {
pattern 'd{4}-d{2}-d{2}';
}
description
"Represents a specific date in YYYY-MM-DD format.";
}
/*
* Groupings
*/
grouping module-identification-leafs {
description
"Parameters for identifying YANG modules and submodules.";
leaf name {
type yang:yang-identifier;
mandatory true;
description
"The YANG module or submodule name.";
}
leaf revision {
type revision-identifier;
description
"The YANG module or submodule revision date. If no revision
statement is present in the YANG module or submodule, this
leaf is not instantiated.";
}
}
grouping location-leaf-list {
description
"Common leaf-list parameter for the locations of modules and
submodules.";
leaf-list location {
type inet:uri;
description
"Contains a URL that represents the YANG schema
resource for this module or submodule.
This leaf will only be present if there is a URL
available for retrieval of the schema for this entry.";
}
}
9
10. grouping module-implementation-parameters {
description
"Parameters for describing the implementation of a module.";
leaf-list feature {
type yang:yang-identifier;
description
"List of all YANG feature names from this module that are
supported by the server, regardless whether they are defined
in the module or any included submodule.";
}
leaf-list deviation {
type leafref {
path "../../module/name";
}
description
"List of all YANG deviation modules used by this server to
modify the conformance of the module associated with this
entry. Note that the same module can be used for deviations
for multiple modules, so the same entry MAY appear within
multiple 'module' entries.
This reference MUST NOT (directly or indirectly)
refer to the module being deviated.
Robust clients may want to make sure that they handle a
situation where a module deviates itself (directly or
indirectly) gracefully.";
}
}
grouping module-set-parameters {
description
"A set of parameters that describe a module set.";
leaf name {
type string;
description
"An arbitrary name of the module set.";
}
list module {
key "name";
description
"An entry in this list represents a module implemented by the
server, as per Section 5.6.5 of RFC 7950, with a particular
set of supported features and deviations.";
reference
"RFC 7950: The YANG 1.1 Data Modeling Language";
uses module-identification-leafs;
leaf namespace {
type inet:uri;
mandatory true;
description
"The XML namespace identifier for this module.";
}
uses location-leaf-list;
list submodule {
key "name";
description
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs;
uses location-leaf-list;
}
10
11. uses module-implementation-parameters;
}
list import-only-module {
key "name revision";
description
"An entry in this list indicates that the server imports
reusable definitions from the specified revision of the
module but does not implement any protocol-accessible
objects from this revision.
Multiple entries for the same module name MAY exist. This
can occur if multiple modules import the same module but
specify different revision dates in the import statements.";
leaf name {
type yang:yang-identifier;
description
"The YANG module name.";
}
leaf revision {
type union {
type revision-identifier;
type string {
length "0";
}
}
description
"The YANG module revision date.
A zero-length string is used if no revision statement
is present in the YANG module.";
}
leaf namespace {
type inet:uri;
mandatory true;
description
"The XML namespace identifier for this module.";
}
uses location-leaf-list;
list submodule {
key "name";
description
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs;
uses location-leaf-list;
}
}
}
grouping yang-library-parameters {
description
"The YANG library data structure is represented as a grouping
so it can be reused in configuration or another monitoring
data structure.";
list module-set {
key "name";
description
"A set of modules that may be used by one or more schemas.
A module set does not have to be referentially complete,
i.e., it may define modules that contain import statements
for other modules not included in the module set.";
uses module-set-parameters;
}
11
12. list schema {
key "name";
description
"A datastore schema that may be used by one or more
datastores.
The schema must be valid and referentially complete, i.e.,
it must contain modules to satisfy all used import
statements for all modules specified in the schema.";
leaf name {
type string;
description
"An arbitrary name of the schema.";
}
leaf-list module-set {
type leafref {
path "../../module-set/name";
}
description
"A set of module-sets that are included in this schema.
If a non-import-only module appears in multiple module
sets, then the module revision and the associated features
and deviations must be identical.";
}
}
list datastore {
key "name";
description
"A datastore supported by this server.
Each datastore indicates which schema it supports.
The server MUST instantiate one entry in this list per
specific datastore it supports.
Each datastore entry with the same datastore schema SHOULD
reference the same schema.";
leaf name {
type ds:datastore-ref;
description
"The identity of the datastore.";
}
leaf schema {
type leafref {
path "../../schema/name";
}
mandatory true;
description
"A reference to the schema supported by this datastore.
All non-import-only modules of the schema are implemented
with their associated features and deviations.";
}
}
}
/*
* Top-level container
*/
container yang-library {
config false;
description
"Container holding the entire YANG library of this server.";
uses yang-library-parameters;
12
13. leaf content-id {
type string;
mandatory true;
description
"A server-generated identifier of the contents of the
'/yang-library' tree. The server MUST change the value of
this leaf if the information represented by the
'/yang-library' tree, except '/yang-library/content-id', has
changed.";
}
}
/*
* Notifications
*/
notification yang-library-update {
description
"Generated when any YANG library information on the
server has changed.";
leaf content-id {
type leafref {
path "/yanglib:yang-library/yanglib:content-id";
}
mandatory true;
description
"Contains the YANG library content identifier for the updated
YANG library at the time the notification is generated.";
}
}
/*
* Legacy groupings
*/
#Legacyはdeprecatedされているので参照しないこと。互換性のために残っている。
#https://tools.ietf.org/html/rfc7950#section-7.21.2
grouping module-list {
status deprecated;
description
"The module data structure is represented as a grouping
so it can be reused in configuration or another monitoring
data structure.";
grouping common-leafs {
status deprecated;
description
"Common parameters for YANG modules and submodules.";
leaf name {
type yang:yang-identifier;
status deprecated;
description
"The YANG module or submodule name.";
}
leaf revision {
type union {
type revision-identifier;
type string {
length "0";
}
}
status deprecated;
description
"The YANG module or submodule revision date.
13
14. A zero-length string is used if no revision statement
is present in the YANG module or submodule.";
}
}
grouping schema-leaf {
status deprecated;
description
"Common schema leaf parameter for modules and submodules.";
leaf schema {
type inet:uri;
description
"Contains a URL that represents the YANG schema
resource for this module or submodule.
This leaf will only be present if there is a URL
available for retrieval of the schema for this entry.";
}
}
list module {
key "name revision";
status deprecated;
description
"Each entry represents one revision of one module
currently supported by the server.";
uses common-leafs {
status deprecated;
}
uses schema-leaf {
status deprecated;
}
leaf namespace {
type inet:uri;
mandatory true;
status deprecated;
description
"The XML namespace identifier for this module.";
}
leaf-list feature {
type yang:yang-identifier;
status deprecated;
description
"List of YANG feature names from this module that are
supported by the server, regardless of whether they are
defined in the module or any included submodule.";
}
list deviation {
key "name revision";
status deprecated;
description
"List of YANG deviation module names and revisions
used by this server to modify the conformance of
the module associated with this entry. Note that
the same module can be used for deviations for
multiple modules, so the same entry MAY appear
within multiple 'module' entries.
The deviation module MUST be present in the 'module'
list, with the same name and revision values.
The 'conformance-type' value will be 'implement' for
the deviation module.";
uses common-leafs {
status deprecated;
14
15. }
}
leaf conformance-type {
type enumeration {
enum implement {
description
"Indicates that the server implements one or more
protocol-accessible objects defined in the YANG module
identified in this entry. This includes deviation
statements defined in the module.
For YANG version 1.1 modules, there is at most one
'module' entry with conformance type 'implement' for a
particular module name, since YANG 1.1 requires that
at most one revision of a module is implemented.
For YANG version 1 modules, there SHOULD NOT be more
than one 'module' entry for a particular module
name.";
}
enum import {
description
"Indicates that the server imports reusable definitions
from the specified revision of the module but does
not implement any protocol-accessible objects from
this revision.
Multiple 'module' entries for the same module name MAY
exist. This can occur if multiple modules import the
same module but specify different revision dates in
the import statements.";
}
}
mandatory true;
status deprecated;
description
"Indicates the type of conformance the server is claiming
for the YANG module identified by this entry.";
}
list submodule {
key "name revision";
status deprecated;
description
"Each entry represents one submodule within the
parent module.";
uses common-leafs {
status deprecated;
}
uses schema-leaf {
status deprecated;
}
}
}
}
/*
* Legacy operational state data nodes
*/
container modules-state {
config false;
status deprecated;
description
"Contains YANG module monitoring information.";
15
16. leaf module-set-id {
type string;
mandatory true;
status deprecated;
description
"Contains a server-specific identifier representing
the current set of modules and submodules. The
server MUST change the value of this leaf if the
information represented by the 'module' list instances
has changed.";
}
uses module-list {
status deprecated;
}
}
/*
* Legacy notifications
*/
notification yang-library-change {
status deprecated;
description
"Generated when the set of modules and submodules supported
by the server has changed.";
leaf module-set-id {
type leafref {
path "/yanglib:modules-state/yanglib:module-set-id";
}
mandatory true;
status deprecated;
description
"Contains the module-set-id value representing the
set of modules and submodules supported at the server
at the time the notification is generated.";
}
}
}
<CODE ENDS>
以下にパラメーターの説明を記載する。
・typedef
revision-identifier
typedef revision-identifier Represents a specific date in YYYY-MM-DD format.
YYYY-MM-DD形式の日付。
・grouping
module-identification-leafs
YANG module、submoduleを識別するグループ。
16
17. grouping module-identification-leafs Parameters for identifying YANG modules and
submodules.
YANG moduleとsubmoduleを識別するためのパラメーター。
+--ro name string The YANG module or submodule name.
YANG module、submoduleの名前。
+--ro revision? revision-identifier The YANG module or submodule revision date. If no
revision statement is present in the YANG module or
submodule, this leaf is not instantiated.
YANG module、submoduleのrevision。無い場合は無い。
location-leaf-list
YANG module、submoduleのlocation情報のグループ。
grouping location-leaf-list Common leaf-list parameter for the locations of
modules and submodules.
Module、submoduleのlocationを示すleaf-list。
+--ro location* inet:uri Contains a URL that represents the YANG schema
resource for this module or submodule.This leaf
will only be present if there is a URL available
for retrieval of the schema for this entry.
Module、submoduleのYANG schemaのURL。Schemaの取得に使用
できるURLがある場合にのみ存在する。
module-implementation-parameters
Moduleの実装に関する情報のグループ。
grouping module-implementation-parameters Parameters for describing the implementation of a
module.
Moduleの実装に関するパラメーター。
+--ro feature* yang:yang-identifier List of all YANG feature names from this module
that are supported by the server, regardless
whether they are defined in the module or any
included submodule.
サーバーがサポートするこのmoduleのYANG featureのリスト。
+--ro deviation* -> "../../module/name" List of all YANG deviation modules used by this
server to modify the conformance of the module
associated with this entry. Note that the same
module can be used for deviations for multiple
modules, so the same entry MAY appear within
multiple 'module' entries.
このmoduleに使用されるdeviation moduleのリスト。同じエント
リが複数の’module’にあってもよい(MAY)。
This reference MUST NOT (directly or indirectly)
refer to the module being deviated.
このleafrefは直接的、間接的に関わらずdeviationしている
moduleを参照しないこと(MUST NOT)。
module-set-parameters
Module set情報のグループ。
grouping module-set-parameters A set of parameters that describe a module set.
17
18. Module set情報のパラメーター。
+--ro name* string An arbitrary name of the module set.
Module setの任意の名前。
+--ro module* [name] An entry in this list represents a module
implemented by the server, as per Section 5.6.5 of
RFC 7950, with a particular set of supported
features and deviations.
サーバーに実装されたmodule、feature、deviationの名前。
詳細Appendix D. 5.6.5. Implementing a Module。
+-- u module-identification-leafs YANG module、submoduleを識別するグループ。
+--ro namespace inet:uri The XML namespace identifier for this module.
ModuleのXML namespace。
+-- u location-leaf-list YANG module、submoduleのlocation情報のグループ。
+--ro submodule* [name] Each entry represents one submodule within the
parent module.
Submodule。
+-- u module-identification-leafs YANG module、submoduleを識別するグループ。
+-- u location-leaf-list YANG module、submoduleのlocation情報のグループ。
+-- u module-implementation-parameters Moduleの実装に関する情報のグループ。
+--ro import-only-module* [name revision] An entry in this list indicates that the server
imports reusable definitions from the specified
revision of the module but does not implement any
protocol-accessible objects from this revision.
サーバーがmoduleの指定されたリビジョンをimportするが、そのリ
ビジョンからはプロトコルでアクセス可能なオブジェクトを実装しない
moduleのリスト。
Multiple entries for the same module name MAY
exist. This can occur if multiple modules import
the same module but specify different revision
dates in the import statements.
同じmodule nameの複数のエントリが存在してよい(MAY)。これ
は、複数のmoduleが同じmoduleをimportし、import statement
で異なるリビジョンを指定している場合に発生する。
+--ro name yang:yang-identifier The YANG module name.
YANG module name。
+--ro revision union(revision-identifier,
string(length 0)
The YANG module revision date. A zero-length
string is used if no revision statement is present
in the YANG module.
YANG moduleのリビジョン日。YANG moduleにrevision
statementが無い場合はzero-length stringになる。
+--ro namespace inet:uri The XML namespace identifier for this module.
ModuleのXML namespace。
+-- u location-leaf-list YANG module、submoduleのlocation情報のグループ。
+--ro submodule* [name] Each entry represents one submodule within the
parent module.
Submodule。
18
19. +-- u module-identification-leafs YANG module、submoduleを識別するグループ。
+-- u location-leaf-list YANG module、submoduleのlocation情報のグループ。
yang-library-parameters
YANG libraryのデータ構造のグループ。
grouping yang-library-parameters The YANG library data structure is represented as a
grouping so it can be reused in configuration or
another monitoring data structure.
YANG libraryのデータ構造はgroupingされるため、再利用でき
る。
+--ro module-set* [name] A set of modules that may be used by one or more
schemas.
Schemaで使用されるmodule set。
A module set does not have to be referentially
complete, i.e., it may define modules that contain
import statements for other modules not included in
the module set.
Module setは完結している必要はなく、import先のmoduleが無く
てもよい。
+-- u module-set-parameters Module set情報のグループ。
+--ro schema* [name] A datastore schema that may be used by one or more
datastores.
Datastoreで使用されるdatastore schema。
The schema must be valid and referentially
complete, i.e., it must contain modules to satisfy
all used import statements for all modules
specified in the schema.
Schemaは完結している必要がある。Schemaの全てのmoduleについて
importしている全てのmoduleが含まれること。
+--ro name string An arbitrary name of the schema.
Schemaの任意の名前。
+--ro module-set* -> "../../module-set/name" A set of module-sets that are included in this
schema. If a non-import-only module appears in
multiple module sets, then the module revision and
the associated features and deviations must be
identical.
Schemaに含まれるmodule set。import-only moduleでない
module(non-import-only module)が複数のmoduleに含まれて
いる場合、revision、feature、deviationは同じであること。
+--ro datastore* [name] A datastore supported by this server. Each
datastore indicates which schema it supports. The
server MUST instantiate one entry in this list per
specific datastore it supports. Each datastore
entry with the same datastore schema SHOULD
reference the same schema.
サーバーがサポートするdatastore。Datastoreはサポートする
schemaを指定する。サーバーはサポートするdatastore毎に1つのエ
ントリをもつこと(MUST)。同じdatastore schemaのdatastore
エントリは同じschemaを参照することが推奨される(SHOULD)。
#同じschemaを異なるschemaエントリにするなということ?
19
20. +--ro name string The identity of the datastore.
Datastoreの識別子。
+--ro schema -> "../../schema/name" A reference to the schema supported by this
datastore. All non-import-only modules of the
schema are implemented with their associated
features and deviations.
Datastoreでサポートされるschemaへの参照。Schemaの全ての
non-import-only moduleはfeature、deviationも含めて実装
される。
・Top-level container
サーバーのYANG libraryを格納するコンテナ。
module: ietf-yang-library
+--ro yang-library
Container holding the entire YANG library of this
server.
サーバーのYANG libraryを格納するコンテナ。
+--ro module-set* [name]
| +--ro name string
| +--ro module* [name]
| | +--ro name yang:yang-identifier
| | +--ro revision? revision-identifier
| | +--ro namespace inet:uri
| | +--ro location* inet:uri
| | +--ro submodule* [name]
| | | +--ro name yang:yang-identifier
| | | +--ro revision? revision-identifier
| | | +--ro location* inet:uri
| | +--ro feature* yang:yang-identifier
| | +--ro deviation* -> ../../module/name
| +--ro import-only-module* [name revision]
| +--ro name yang:yang-identifier
| +--ro revision union
| +--ro namespace inet:uri
| +--ro location* inet:uri
| +--ro submodule* [name]
| +--ro name yang:yang-identifier
| +--ro revision? revision-identifier
| +--ro location* inet:uri
+--ro schema* [name]
| +--ro name string
| +--ro module-set* -> ../../module-set/name
+--ro datastore* [name]
| +--ro name ds:datastore-ref
| +--ro schema -> ../../schema/name
u yang-library-parameters
YANG libraryのデータ構造のグループ。
+--ro content-id string A server-generated identifier of the contents of
the '/yang-library' tree. The server MUST change
the value of this leaf if the information
represented by the '/yang-library' tree, except
'/yang-library/content-id', has changed.
‘/yang-library’ treeのコンテンツを識別するサーバーが生成す
る識別子。’/yang-library/content-id’以外の’
/yang-library’ treeの情報が変わった場合、サーバーはこの
leafの値を変更すること(MUST)。
・Notifications
サーバーのYANG library情報が変わったときに生成されるnotification。
20
21. module: ietf-yang-library
notifications:
+---n yang-library-update
Generated when any YANG library information on the
server has changed.
サーバーのYANG library情報が変わったときに生成される
notification。
+--ro content-id -> /yang-library/content-id Contains the YANG library content identifier for
the updated YANG library at the time the
notification is generated.
Notificationが生成された時点の更新されたcontent-id。
・Legacy groupings
grouping module-list
Moduleのデータ構造のグループ。
grouping module-list The module data structure is represented as a
grouping so it can be reused in configuration or
another monitoring data structure.
Moduleのデータ構造はgroupingされるため、再利用できる。
+-- u common-leafs YANG module、submoduleの共通のパラメーターのグループ。
+-- u schema-leaf YANG module、Submoduleの共通のschemaパラメーターのグルー
プ。
+--ro module* [name revision] Each entry represents one revision of one module
currently supported by the server.
サーバーでサポートされるリビジョン指定のmodule。
+-- u common-leafs YANG module、submoduleの共通のパラメーターのグループ。
+-- u schema-leaf YANG module、Submoduleの共通のschemaパラメーターのグルー
プ。
+--ro namespace inet:uri The XML namespace identifier for this module.
ModuleのXML namespace。
+--ro feature* yang:yang-identifier List of YANG feature names from this module that
are supported by the server, regardless of whether
they are defined in the module or any included
submodule.
サーバーでサポートされるmoduleのfeature。
+--ro deviation* [name revision] List of YANG deviation module names and revisions
used by this server to modify the conformance of
the module associated with this entry. Note that
the same module can be used for deviations for
multiple modules, so the same entry MAY appear
within multiple 'module' entries.
Deviation module nameとリビジョン。同じmoduleを複数の
moduleのdeviationに使用できるため、同じエントリが複数の’
module’エントリにあってもよい。
The deviation module MUST be present in the
'module' list, with the same name and revision
values. The 'conformance-type' value will be
'implement' for the deviation module.
Deviation moduleは同じname、revisionで’module’に存在し
ないこと(MUST)。’conformance-type’はdeviation module
の場合は’implement’になる。
21
22. +-- u schema-leaf YANG module、Submoduleの共通のschemaパラメーターのグルー
プ。
+--ro conformance-type enumeration
(implement/import)
Indicates the type of conformance the server is
claiming for the YANG module identified by this
entry.
Moduleがサーバーからどのように使われているかを示す。
・implement
Indicates that the server implements one or more
protocol-accessible objects defined in the YANG
module identified in this entry. This includes
deviation statements defined in the module.
Moduleで定義されている1つ以上のオブジェクトをサーバーが実装
し、アクセス可能であることを示す。これにはdeviation
statementも含まれる。
For YANG version 1.1 modules, there is at most one
'module' entry with conformance type 'implement'
for a particular module name, since YANG 1.1
requires that at most one revision of a module is
implemented.
YANG version 1.1 moduleの場合、moduleは1 revisionだけが
実装されている必要があるため、特定のmoduleに対して’
implement’の’module’は1つだけである。
For YANG version 1 modules, there SHOULD NOT be
more than one 'module' entry for a particular
module name.
YANG version 1 moduleの場合、特定のmodule名に複数の’
module’エントリが無いこと(SHOULD NOT)。
・import
Indicates that the server imports reusable
definitions from the specified revision of the
module but does not implement any
protocol-accessible objects from this revision.
サーバーはmoduleの指定されたリビジョンからimportするが、アク
セス可能なオブジェクトを実装しない。
Multiple 'module' entries for the same module name
MAY exist. This can occur if multiple modules
import the same module but specify different
revision dates in the import statements.
同じmodule名に対する複数の’module’エントリがあってもよい(
MAY)。これは複数のmoduleが同じmoduleをimportするが、
import statementで異なるrevisionを指定した場合に発生する。
+--ro submodule* [name revision] Each entry represents one submodule within the
parent module.
Submodule。
+-- u common-leafs YANG module、submoduleの共通のパラメーターのグループ。
+-- u schema-leaf YANG module、Submoduleの共通のschemaパラメーターのグルー
プ。
grouping common-leafs
YANG module、submoduleの共通のパラメーターのグループ。
grouping schema-leaf Common parameters for YANG modules and submodules.
YANG module、submoduleの共通のパラメーター。
22
23. +--ro name yang:yang-identifier The YANG module or submodule name.
YANG module、submoduleの名前。
+--ro revision union(revision-identifier,
string(length 0)
The YANG module or submodule revision date. A
zero-length string is used if no revision statement
is present in the YANG module or submodule.
YANG module、submoduleのリビジョン。Revision statement
が存在しない場合はzero-length string。
grouping schema-leaf
YANG module、Submoduleの共通のschemaパラメーターのグループ。
grouping schema-leaf Common schema leaf parameter for modules and
submodules.
YANG module、Submoduleの共通のschemaパラメーター。
+--ro schema? inet:uri Contains a URL that represents the YANG schema
resource for this module or submodule.
This leaf will only be present if there is a URL
available for retrieval of the schema for this
entry.
・Legacy operational state data nodes
YANG moduleのモニタリング情報。
container modules-state Contains YANG module monitoring information.
YANG moduleのモニタリング情報。
+--ro module-set-id string Contains a server-specific identifier representing
the current set of modules and submodules. The
server MUST change the value of this leaf if the
information represented by the 'module' list
instances has changed.
現在のmoduleとsubmoduleを示すサーバーが生成する識別子。’
module’ listインスタンスの情報が変わった場合、サーバーはこの
leafの値を経脳すること(MUST)。
+-- u module-list Moduleのデータ構造のグループ。
・Legacy notifications
サーバーでサポートされるmodule、submoduleが変わったときに生成されるnotification。
notification yang-library-change Generated when the set of modules and submodules
supported by the server has changed.
サーバーでサポートされるmodule、submoduleが変わったときに生
成されるnotification。
+--ro module-set-id ->
/yanglib:modules-state/yanglib:module-set-id
Contains the module-set-id value representing the
set of modules and submodules supported at the
server at the time the notification is generated.
Notificationが生成されたときにサーバーでサポートされている
module、submoduleを表すmodule-set-id。
23
24. 5. IANA Considerations
RFC 7895 previously registered one URI in the "IETF XML Registry" [RFC3688]. This document
takes over this registration entry made by RFC 7895 and changes the Registrant Contact to the
IESG according to Section 4 of [RFC3688].
RFC7895のURIを引き継ぎ、Registrant Contactを変更する。
URI: urn:ietf:params:xml:ns:yang:ietf-yang-library
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
This document registers a YANG module in the "YANG Module Names" registry [RFC6020]:
YANG moduleを”YANG Module Names” registryに登録する。
name: ietf-yang-library
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
prefix: yanglib
reference: RFC 8525
6. Security Considerations
The YANG module specified in this document defines a schema for data that is designed to be
accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040].
The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the
mandatory-to-implement secure transport is TLS[RFC8446].
YANG moduleはNETCONFまたはRESTCONFのようなネットワーク管理プロトコルでアクセスされる。NETCONFはSSH、
RESTCONFはTLSである。
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict
access for particular NETCONF or RESTCONF users to a preconfigured subset of all available
NETCONF or RESTCONF protocol operations and content.
NACM[RFC8341]はNETCONF、RESTCONFにアクセス制限を提供する。
Some of the readable data nodes in this YANG module may be considered sensitive or vulnerable
in some network environments. It is thus important to control read access (e.g., via get,
get-config, or notification) to these data nodes. These are the subtrees and data nodes and
their sensitivity/vulnerability:
YANG moduleのRead可能なデータ(get、get-config、notification)には機密性が高かったり、脆弱性につながるものが
ある場合がある。そのため、これらのdata nodeへのアクセスを制御することが重要である。
The "/yang-library" subtree of the YANG library may help an attacker identify the server
capabilities and server implementations with known bugs since the set of YANG modules
supported by a server may reveal the kind of device and the manufacturer of the device.
Although some of this information may be available to all NETCONF
users via the NETCONF <hello> message (or similar messages in other management protocols),
this YANG module potentially exposes additional details that could be of some assistance to an
attacker. Server vulnerabilities may be specific to particular modules, module revisions,
module features, or even module deviations. For example,
if a particular operation on a particular data node is known to cause a server to crash or
significantly degrade device performance, then the "module" list information will help an
24
25. attacker identify server implementations with such a defect, in order to launch a
denial-of-service attack on the device.
YANG libraryの”/yang-library” subtreeはYANG moduleによってサーバーのデバイス種別やベンダーが判別可能になる
場合があるため、攻撃者が既知のバグを攻撃するのに使用される。NETCONF <hello>にこのYANG moduleを追加することで攻
撃者に何らかの情報を与える可能性がある。
Appendix A. Summary of Changes from RFC 7895
This document changes [RFC7895] in the following ways:
RFC7895への変更点は下記。
Renamed document title from "YANG Module Library" to "YANG Library".
ドキュメントのタイトルを”YANG Module Library” ⇒ “YANG Library”。
Added a new top-level "/yang-library" container to hold the entire YANG library providing
information about module sets, schemas, and datastores.
Module set、schema、datastoreに関する情報を提供するYANG library全体を保持する新しいトップレベルの”
/yang-library” containerを追加。
Refactored the "/modules-state" container into a new "/yang-library/module-set" list.
“/modules-state” containerを新規の”/yang-library/module-set” listにリファクタリング。
Added a new "/yang-library/schema" list and a new "/yang-library/datastore" list.
“/yang-library/schema” list、”/yang-library/datastore” listを追加。
Added a set of new groupings as replacements for the deprecated groupings.
廃止予定のgroupingの代わりに新しいgroupingを追加。
Added a "yang-library-update" notification as a replacement for the deprecated
"yang-library-change" notification.
廃止予定の”yang-library-change” notificationの代わりに”yang-library-update”を追加。
Deprecated the "/modules-state" tree.
“/modules-state” treeを削除。
Deprecated the "/module-list" grouping.
“/module-list” treeを削除。
Deprecated the "/yang-library-change" notification.
“/yang-library-change” notificationを削除。
Appendix B. Example YANG Library Instance for a Basic Server
The following example shows the YANG library of a basic server implementing the
"ietf-interfaces" [RFC8343] and "ietf-ip" [RFC8344] modules in the <running>, <startup>, and
25
28. “ietf-network”、”ietf-network-topology”のみがdynamic configuration protocolでconfig可能な
dynamic configuration datastore “example-ds-ephemeral”をサポートする。
● Shows an example of datastore-specific deviations. The
"example-vendor-hardware-deviations" module is included in the schema for <operational> to
remove data nodes that cannot be supported by the server.
datastore固有のdeviationの例を示す。サーバーでサポートできないmoduleを削除するために、”
example-vendor-hardware-deviations” moduleが<operational> schemaに含まれる。
● Shows how module-sets can be used to organize related modules together.
Module setを使用して関連するmoduleを整理する方法を示す。
Newline characters in leaf values are added for formatting reasons.
改行はフォーマットのために追加している。
<yang-library
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"
xmlns:ex-ds-eph="urn:example:ds-ephemeral">
<module-set>
<name>config-state-modules</name>
<module>
<name>ietf-interfaces</name>
<revision>2018-02-20</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-interfaces
</namespace>
</module>
<module>
<name>ietf-ip</name>
<revision>2018-02-22</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-ip
</namespace>
</module>
<module>
<name>ietf-routing</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-routing
</namespace>
</module>
<import-only-module>
<name>ietf-yang-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-yang-types
</namespace>
</import-only-module>
<import-only-module>
<name>ietf-inet-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-inet-types
</namespace>
</import-only-module>
</module-set>
<module-set>
<name>config-only-modules</name>
28
31. サーバーはmoduleの複数のrevisionを実装しないこと(MUST)。
If a server implements a module A that imports a module B, and A uses any node from B in an
"augment" or "path" statement that the server supports, then the server MUST implement a
revision of module B that has these nodes defined. This is regardless of whether module B is
imported by revision or not.
サーバーがmodule Bをimportするmodule Aを実装し、Aがサーバーがサポートする’augment’または’path’でBのnodeを
使用する場合、サーバーはそれらのnodeが定義されたmodule Bのrevisionを実装すること(MUST)。
If a server implements a module A that imports a module C without specifying the revision date
of module C and the server does not implement C (e.g., if C only defines some typedefs), the
server MUST list module C in the "/modules-state/module" list from "ietf-yang-library"
[RFC7895], and it MUST set the leaf "conformance-type" to "import" for this module.
サーバーがmodule Cのrevisionを指定せずにmodule Cをimportするmodule Aを実装し、サーバーがCを実装しない場合
(例:Cのtypedefのみを使用する)、サーバーは”ietf-yang-library”におけるmodule Cの”conformance-type”に”
import”を設定すること(MUST)。
If a server lists a module C in the "/modules-state/module" list from "ietf-yang-library" and
there are other modules Ms listed that import C without specifying the revision date of module
C, the server MUST use the definitions from the most recent revision of C listed for modules
Ms.
サーバーが”ietf-yang-library”の”/modules-state/module” listにmodule Cを設定し、module Cのrevisionを
指定せずにCをimportする他のmodule Mがある場合、サーバーはModule Cの最新のrevisionを使用すること(MUST)。
#実装される特定のmoduleは全て同じrevision使えということ。
The reason for these rules is that clients need to be able to know the specific data model
structure and types of all leafs and leaf-lists implemented in a server.
このルールの理由は、クライアントがサーバーに実装された全てのleafとleaf-listのデータモデル構造とtypeを知る必要があ
るため。
For example, with these modules:
以下にmoduleの例を示す。
31
32. module a {
yang-version 1.1;
namespace "urn:example:a";
prefix "a";
import b {
revision-date 2015-01-01;
}
import c;
revision 2015-01-01;
feature foo;
augment "/b:x" {
if-feature foo;
leaf y {
type b:myenum;
}
}
container a {
leaf x {
type c:bar;
}
}
}
module b {
yang-version 1.1;
namespace "urn:example:b";
prefix "b";
32
33. revision 2015-01-01;
typedef myenum {
type enumeration {
enum zero;
}
}
container x {
}
}
module b {
yang-version 1.1;
namespace "urn:example:b";
prefix "b";
revision 2015-04-04;
revision 2015-01-01;
typedef myenum {
type enumeration {
enum zero; // added in 2015-01-01
enum one; // added in 2015-04-04
}
}
container x { // added in 2015-01-01
container y; // added in 2015-04-04
}
}
module c {
yang-version 1.1;
namespace "urn:example:c";
prefix "c";
revision 2015-02-02;
typedef bar {
...
}
}
module c {
yang-version 1.1;
namespace "urn:example:c";
prefix "c";
revision 2015-03-03;
revision 2015-02-02;
typedef bar {
...
}
}
33
34. A server that implements revision "2015-01-01" of module "a" and supports feature "foo" can
implement revision "2015-01-01" or "2015-04-04" of module "b". Since "b" was imported by
revision, the type of leaf "/b:x/a:y" is the same, regardless of which revision of "b" the
server implements.
サーバーはmodule “a”のrevision “2015-01-01”を実装し、feature “foo”をサポートする。Module “b”のrevision
”2015-01-01”または”2015-04-04”を実装できる。”b”はrevision指定でimportされているため、leaf “/b:x/a:y”は
サーバーが実装している”b”のrevisionに関わらず変わらない。
A server that implements module "a" but does not support feature "foo" does not have to
implement module "b".
サーバーがmodule “a”を実装しているがfeature “foo”をサポートしていない場合、module “b”を実装する必要はない。
#if-feature foo で augment "/b:x" だから。
A server that implements revision "2015-01-01" of module "a" picks any revision of module "c"
and lists it in the "/modules-state/module" list from "ietf-yang-library".
サーバーがmodule “a”のrevision “2015-01-01”を実装し、module “c”の任意のrevisionを選択し、”
/modules-state/module”に設定する。
The following XML encoding example shows valid data for the "/modules-state/module" list for a
server that implements module "a":
以下のXMLはmodule “a”を実装するサーバーの”/modules-state/module”の例である。
<modules-state
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
<module-set-id>ee1ecb017370cafd</module-set-id>
<module>
<name>a</name>
<revision>2015-01-01</revision>
<namespace>urn:example:a</namespace>
<feature>foo</feature>
<conformance-type>implement</conformance-type>
</module>
<module>
<name>b</name>
<revision>2015-04-04</revision>
<namespace>urn:example:b</namespace>
<conformance-type>implement</conformance-type>
</module>
<module>
<name>c</name>
<revision>2015-02-02</revision>
<namespace>urn:example:c</namespace>
<conformance-type>import</conformance-type>
</module>
</modules-state>
34