SlideShare a Scribd company logo
1 of 10
Download to read offline
RFC8340(YANG Tree Diagrams)ベースの勉強資料です。
下線、ハイライトは個人的に重要そうなところ。斜体、#はメモ。
原文のMUST/REQUIRED/SHALL/SHOULD/MAY/OPTIONAL等の​RFC2119​用語は原文のまま残しています。
 MUST、REQUIRED、SHALL:絶対的な要求事項
 MUST NOT:絶対的な禁止事項
 SHOULD、RECOMMENDED:慎重に重要性を判断するべき要求事項
 SHOULD NOT、NOT RECOMMENDED:慎重に重要性を判断するべき禁止事項
 MAY、OPTIONAL:オプション。
間違っていたらコメントをお願いします。
元ネタ(RFC6243)
https://tools.ietf.org/html/rfc8340
Errata
https://www.rfc-editor.org/errata_search.php?rfc=8340
「​2.6. Node Representation​」を見れば大体OK。
NETCONF Call Home and RESTCONF Call Home
Abstract
 This document captures the current syntax used in YANG module tree diagrams. The purpose of
this document is to provide a single location for this definition. This syntax may be updated
from time to time based on the evolution of the YANG language.
 YANG module tree diagramのsyntaxを示す。SyntaxはYANG言語のアップデートにより更新される可能性がある。
Table of Contents
Abstract 1
Table of Contents 1
1. Introduction 2
2. Tree Diagram Syntax 2
2.1. Submodules 4
2.2. Groupings 4
2.3. yang-data 5
2.4. Collapsed Node Representation 5
2.5. Comments 5
2.6. Node Representation 5
3. Usage Guidelines for RFCs 6
3.1. Wrapping Long Lines 7
3.2. Groupings 7
3.3. Long Diagrams 7
4. YANG Schema Mount Tree Diagrams 8
4.1. Representation of Mounted Schema Trees 9
1
1. Introduction
 YANG tree diagrams were first published in RFC 6536. Such diagrams are used to provide a
simplified graphical representation of a data model and can be automatically generated via
tools such as "pyang" [PYANG]. This document describes the syntax used in YANG tree diagrams.
It is expected that this document will be updated or replaced as changes to the YANG language
[RFC7950] necessitate.
 YANG tree diagramはRFC6536で最初に公開された。データモデルをグラフィカルに表現するために使用され、"pyang"等
のツールで自動生成される。本RFCではYANG tree diagramで使用されるsyntaxの説明をする。YANG言語[RFC7950]の変更
時には本RFCも更新される。
 Today's common practice is to include the definition of the syntax used to represent a YANG
module in every document that provides a tree diagram. This practice has several
disadvantages; therefore, the purpose of this document is to provide a single location for
this definition. It is not the intent of this document to restrict future changes, but rather
to ensure that such changes are easily identified and suitably agreed upon.
 ​YANG moduleをtree diagramで表現することは一般的である。本RFCの目的はこれを定義することである。
 An example tree diagram can be found in Section 3 of [RFC8343]; the following is a portion
of it:
 ​Tree diagramの例はRFC8343のsection 3にある。以下はその一部である。
+--rw interfaces
+--rw interface* [name]
+--rw name string
+--rw description? string
+--rw type identityref
+--rw enabled? boolean
+--rw link-up-down-trap-enable? enumeration {if-mib}?
2. Tree Diagram Syntax
 This section describes the meaning of the symbols used in YANG tree diagrams.
 YANG tree diagramで使用される記号の意味を説明する。
 A full tree diagram of a module represents all elements. It includes the name of the module
and sections for top-level module statements (typically containers), augmentations, rpcs, and
notifications all identified under a module statement. Module trees may be included in a
document as a whole, by one or more sections, or even by subsets of nodes.
 Moduleのfull tree diagramは全てのelementを表現する。これには、module name, top-level module
statement, augmentation, rpc, notificationが含まれる。
 A module is identified by "module:" followed by the module-name. This is followed by one or
more sections, in order:
 Moduleは"module:"とそれに続くmodule-nameで識別される。さらに順番に以下のsectionが続く。以下は2つのスペース
でインデントされる。
2
1. The top-level data nodes defined in the module, offset by two spaces.
 Moduleのtop-levelのdata node。
2. Augmentations, offset by two spaces and identified by the keyword "augment" followed by
the augment target node and a colon (":") character.
 Augmentation。"augment <target-node>:"と表記。
3. RPCs, offset by two spaces and identified by "rpcs:".
 RPC。"rpcs:"と表記。
4. Notifications, offset by two spaces and identified by "notifications:".
 Notification。"notifications:"と表記。
5. Groupings, offset by two spaces and identified by the keyword "grouping" followed by
the name of the grouping and a colon (":") character.
 Grouping。"grouping <grouping-name>:"と表記。
6. yang-data, offset by two spaces and identified by the keyword "yang-data" followed by
the name of the yang-data structure and a colon (":") character.
 yang-data。"yang-data <yang-data-name>:"と表記。
The relative organization of each section is provided using a text-based format that is
typical of a file system directory tree display command. Each node in the tree is prefaced
with "+--". Schema nodes that are children of another node are offset from the parent by
three spaces. Sibling schema nodes are listed with the same space offset and, when separated
by lines, are linked via a vertical bar ("|") character.
 各sectionはファイルシステムのdirectory tree displayコマンドと同様のフォーマットで表現される。nodeは"+--"で
始まる。別のnodeの子のschema nodeは親から3つのスペースでインデントされる。兄弟schema nodeは同じスペースでイン
デントされ、行が間にある場合は"|"で繋がれる。
 The full format, including spacing conventions, is:
 スペースによるインデントを含むフォーマットは以下である。わかりやすいように一部スペースを”​0​”にしています。
module: <module-name>
00​+--<node> //1番目:Moduleのtop-levelのdata node
|​00​+--<node> //兄弟schema nodeは同じスペースでインデントされ、”|”で繋ぐ
| ​000​+--<node> //子のschema nodeは3つのスペースでインデント
+--<node>
+--<node>
+--<node>
00​augment <target-node>: //2番目:Augmentations
+--<node>
​000​+--<node>
+--<node>
​000​+--<node>
00​augment <target-node>:
+--<node>
00​rpcs: //3番目:RPCs
3
+--<rpc-node>
+--<rpc-node>
+--<node>
| +--<node> //兄弟schema nodeは同じスペースでインデントされ、”|”で繋ぐ
+--<node>
notifications: //4番目:Notifications
+--<notification-node>
+--<notification-node>
+--<node>
| +--<node>
+--<node>
grouping <grouping-name>: //5番目:Groupings
+--<node>
+--<node>
| +--<node>
+--<node>
grouping <grouping-name>:
+--<node>
yang-data <yang-data-name>: //6番目:yang-data
+--<node>
+--<node>
| +--<node>
+--<node>
yang-data <yang-data-name>:
+--<node>
2.1. Submodules
 Submodules are represented in the same fashion as modules but are identified by "submodule:"
followed by the (sub)module-name. For example:
 Submoduleはmoduleと同じように表現される。"submodule:"によって識別される。以下は例である。
submodule: <module-name>
+--<node>
| +--<node>
| +--<node>
2.2. Groupings
 Nodes within a used grouping are normally expanded as if the nodes were defined at the
location of the "uses" statement. However, it is also possible to not expand the "uses"
statement but to instead print the name of the grouping.
 Groupingのnodeは"uses" statementに定義されているように展開される。ただし、"uses" statementを展開せずに
groupingの名前を表示してもよい。
 For example, the following diagram shows the "tls-transport" grouping from [RFC7407]
unexpanded:
 以下は"tls-transport"の展開されていない例である。
+--rw tls
+---u tls-transport
 If the grouping is expanded, it could be printed as:
4
 以下は"tls-transport"の展開されている例である。
+--rw tls
+--rw port? inet:port-number
+--rw client-fingerprint? x509c2n:tls-fingerprint
+--rw server-fingerprint? x509c2n:tls-fingerprint
+--rw server-identity? snmp:admin-string
 Groupings may optionally be present in the "groupings" section.
 Groupingは"groupings"でoptionで存在する。
2.3. yang-data
 If the module defines a "yang-data" structure [RFC8040], these structures may optionally be
present in the "yang-data" section.
 Moduleが"yang-data" structureを定義している場合、"yang-data" sectionに存在する。
2.4. Collapsed Node Representation
 At times when the composition of the nodes within a module schema is not important in the
context of the presented tree, sibling nodes and their children can be collapsed using the
notation "..." in place of the text lines used to represent the summarized nodes. For
example:
 Module schema内のnodeが重要でない場合、兄弟nodeとその子nodeは"..."で省略してもよい。
+--<node>
| ...
+--<node>
+--<node>
+--<node>
2.5. Comments
 Single line comments, starting with "//" (possibly indented) and ending at the end of the
line, may be used in the tree notation.
 "//"で始まり、一行で終わるコメントを使用してよい。
2.6. Node Representation
 Each node in a YANG module is printed as:
 YANG moduleの各nodeは以下のように表現される。
<status>--<flags> <name><opts> <type> <if-features>
<status>
右記の一つ
+ current
x deprecated
o obsolete
5
<flags>
右記の一つ
※Case nodeには<flags>は無い
rw configuration data node and choice node
ro non-configuration data node and choice node
output parameter to rpc and action
notification parameter
-w input parameter to rpc and action
-u uses of a grouping
-x rpc and action
-n notification
mp node containing a "mount-point" extension statement
<name>
Node名
Nodeが別のmoduleからtreeに展開されている
場合、その名前は"<prefix>:<name>"で出力
される。"<prefix>"はnodeが定義されている
moduleで定義されているprefixである。
※Case nodeの場合、<name>の前にスペース
は無い。
(<name>) choice node
:(<name>) case node
<opts>
右記の一つ
? optional leaf, choice, anydata, or anyxml
! presence container
* leaf-list or list
[<keys>] list's keys
/ top-level data node in a mounted module
@ top-level data node of a module identified in a
mount point parent reference
<type> leaf, leaf-listsのtype名
typeがleafrefの場合、"-> TARGET"で表記される。TARGETは
leafref pathまたは"leafref"
<if-features> このnodeが依存しているfeatureのlistで、"{...}?"で表現される。
 Arbitrary whitespace is allowed between any of the whitespace-separated fields (e.g., <opts>
and <type>). Additional whitespace may, for example, be used to "column align" fields (e.g.,
within a list or container) to improve readability.
 任意のスペースをスペースで区切られたフィールド(例:<opts>と<type>の間)に追加してよい。例えば、スペースはフィー
ルドの列を揃えるために使用される。
3. Usage Guidelines for RFCs
 This section provides general guidelines related to the use of tree diagrams in RFCs.
 RFCにおけるtree diagramの使用方法に関するガイドラインを説明する。
6
3.1. Wrapping Long Lines
 Internet-Drafts and RFCs limit the number of characters that may appear in a line of text to
72 characters. When the tree representation of a node results in a line being longer than
this limit, the line should be broken between <opts> and <type> or between <type> and
<if-feature>. The new line should be indented so that it starts below <name> with a
whitespace offset of at least two characters. For example:
 RFCでは1行の文字を72文字に制限している。Nodeのtree diagramが72文字より多くなる場合、​その行は<opts>と<type>
の間、または<type>と<if-feature>の間で分割されることが推奨される。​改行は、2文字以上のスペースでインデントされ、
<name>の下から始まるようにする。
notifications:
+---n yang-library-change
+--ro module-set-id
-> /modules-state/module-set-id
 Long paths (e.g., leafref paths or augment targets) can be split and printed on more than
one line. For example:
 Long path(例:leafref pathやaugment target)は分割して複数行で表現してよい。
augment /nat:nat/nat:instances/nat:instance/nat:mapping-table
/nat:mapping-entry:
 The previously mentioned "pyang" command can be helpful in producing such output; for
example, the notification diagram above was produced using:
 pyangコマンドでは以下のように出力する。
pyang -f tree --tree-line-length 50 ietf-yang-library.yang
 When a tree diagram is included as a figure in an Internet-Draft or RFC, "--tree-line-length
69" works well.
 RFCの場合は"--tree-line-length 69"がよい。
3.2. Groupings
 If the YANG module is comprised of groupings only, then the tree diagram should contain the
groupings. The "pyang" compiler can be used to produce a tree diagram with groupings using
the "-f tree --tree-print-groupings" command-line parameters.
 YANG moduleがgroupingのみで構成される場合、tree diagramにgroupingが含まれる。pyangを使用する場合、"-f
tree --tree-print-groupings"でgroupingしたtree diagramを作成できる。
3.3. Long Diagrams
Tree diagrams can be split into sections to correspond to document structure. As tree
diagrams are intended to provide a simplified view of a module, diagrams longer than a page
should generally be avoided. If the complete tree diagram for a module becomes too long, the
diagram can be split into several smaller diagrams. For example, it might be possible to have
one diagram with the data node and another with all notifications. If the data nodes tree is
7
too long, it is also possible to split the diagram into smaller diagrams for different
subtrees. When long diagrams are included in a document, authors should consider whether to
include the long diagram in the main body of the document or in an appendix.
 Tree diagramは、document構造に対応するようにsectionで分割できる。Tree diagramはmoduleの簡略図を示すこと
を目的としているため、1ページより長い図は避けるべきである。例えば、一つの図にdata node、もう一つの図に
notificationを記載する。Data node treeが長い場合はsubtreeにして分割してもよい。
 An example of such a split can be found in [RFC7407], where Section 2.4 of that document
shows the diagram for "engine configuration":
 分割の例はRFC7407にある。Section 2.4が"engine configuration"のdiagramである。
+--rw snmp
+--rw engine ​//engine configurationだけ抽出している。詳細はRFC7407 Secion 2.4参照
// more parameters from the "engine" subtree here
 Further, Section 2.5 of [RFC7407] shows the diagram for "target configuration":
 RFC7407 Section 2.5の"target configuration"も同様。
+--rw snmp
+--rw target* [name] ​//target configurationだけ抽出している。詳細はRFC7407 Secion 2.5参照
// more parameters from the "target" subtree here
 The previously mentioned "pyang" command can be helpful in producing such output; for
example, the above example was produced using:
 pyangでは以下のコマンドで出力される。
pyang -f tree --tree-path /snmp/target ietf-snmp.yang
4. YANG Schema Mount Tree Diagrams
"YANG schema mount" is defined in [SCHEMA-MOUNT] and warrants some specific discussion.
Schema mount is a generic mechanism that allows for the mounting of one or more YANG modules
at a specified location of another (parent) schema. The specific location is referred to as a
"mount point", and any container or list node in a schema may serve as a mount point. Mount
points are identified via the inclusion of the "mount-point" extension statement as a
substatement under a container or list node. Mount point nodes are thus directly identified
in a module schema definition and can be identified in a tree diagram as indicated above using
the "mp" flag.
 ​"YANG schema mount"[RFC8528]​は、他の親schemaの指定された場所に一つ以上のYANG moduleをマウントできるメカ
ニズムである。指定した場所は"mount point"と呼ばれ、schema内のcontainerまたはlist nodeはmount pointとして
機能する。Mount pointはcontainerまたはlist nodeのsubstatementとして"mount-point" extension
statementを設定することで識別される。"mp" flagによって以下のようにtree diagramで表現される。
 In the following example taken from [YANG-NIs], "vrf-root" is a container that includes the
"mount-point" extension statement as part of its definition:
 ​以下の例は、"vrf-root"は定義の一部に"mount-point" extenstion statementを含むcontainerである。
module: ietf-network-instance
8
+--rw network-instances
+--rw network-instance* [name]
+--rw name string
+--rw enabled? boolean
+--rw description? string
+--rw (ni-type)?
+--rw (root-type)
+--:(vrf-root)
| +--mp vrf-root //mount-point
4.1. Representation of Mounted Schema Trees
 The actual modules made available under a mount point are controlled by a server and are
provided to clients. This information is typically provided via the schema mount module
("ietf-yang-schema-mount") defined in [SCHEMA-MOUNT]. The schema mount module supports the
exposure of both mounted schema and "parent-references". Parent references are used for XML
Path Language (XPath) evaluation within mounted modules and do not represent
client-accessible paths; the referenced information is available to clients via the parent
schema. Schema mount also defines an "inline" type of mount point, where mounted modules are
exposed via the YANG library module.
 Mount pointによって利用可能になったmoduleはサーバーによって制御され、クライアントに
"ietf-yang-schema-mount"を介して提供される。Schema mount moduleはマウントされたschemaと
"parent-references"の両方の公開をサポートする。"parent-references"はマウントされたmodule内のXPathの評価に
使用され、クライアントからのアクセス可能パスを示すものではない。Schema mountでは、マウントされたmoduleがYANG
library moduleを介して公開される"inline" typeのmount pointも定義されている。
 Although the modules made available under a mount point are not specified in YANG modules
that include mount points, the document defining the module will describe the intended use of
the module and may identify both modules that will be mounted and parent modules that can be
referenced by mounted modules. An example of such a description can be found in [YANG-NIs].
A specific implementation of a module containing mount points will also support a specific
list of mounted and referenced modules. In describing both intended use and actual
implementations, it is helpful to show how mounted modules would be instantiated and
referenced under a mount point using tree diagrams.
 Mount pointで利用可能になるmoduleはmount pointを含むYANG moduleでは規定されないが、moduleを定義するRFC
ではmountされるmoduleとmountされたmoduleによって参照される親module、moduleの両方について同様に使用方法を説明
してよい。Mount pointを含むmoduleの実装によってはmountされて参照されるmoduleのlistもサポートする。
 In such diagrams, the mount point should be treated much like a container that uses a
grouping. The flags should also be set based on the "config" leaf mentioned above, and the
mount-related options indicated above should be shown for the top-level nodes in a mounted or
referenced module. The following example, taken from [YANG-NIs], represents the prior example
with the YANG modules "ietf-routing" [YANG-Routing] and "ietf-ospf" [OSPF-YANG] mounted, nodes
from the YANG module "ietf-interfaces" [RFC8343] accessible via a parent-reference, and
"config" indicating "true":
 Mount pointはgroupingを使用するcontainerのように扱う必要がある。Flagは"config" leafに基づいて設定する必
要がある。また、mountされているか参照されているmoduleのtop-level nodeにはmount関連オプションを示す必要があ
る。以下の例はYANG module"ietf-routing"および"ietf-ospf"をマウントし、YANG module "ietf-interfaces"か
らparent-referenceでアクセス可能であり、"config"が"true"を示している。
module: ietf-network-instance
+--rw network-instances
+--rw network-instance* [name]
9
+--rw name string
+--rw enabled? boolean
+--rw description? string
+--rw (ni-type)?
+--rw (root-type)
+--:(vrf-root)
+--mp vrf-root //mount point, config = trueなのでrw
+--ro rt:routing-state/
| +--ro router-id?
| +--ro control-plane-protocols
| +--ro control-plane-protocol* [type name]
| +--ro ospf:ospf
| +--ro instance* [af]
| ...
+--rw rt:routing/
| +--rw router-id?
| +--rw control-plane-protocols
| +--rw control-plane-protocol* [type name]
| +--rw ospf:ospf
| +--rw instance* [af]
| ...
+--ro if:interfaces@
| ...
+--ro if:interfaces-state@
| ...
 It is worth highlighting that the "ietf-ospf" module augments the "ietf-routing" module, and
although it is listed in the schema mount module (or inline YANG library), there is no special
mount-related notation in the tree diagram.
 "ietf-ospf" moduleは、"ietf-routing" moduleを拡張しており、schema mount moduleまたはlinline YANG
libraryにlistされているが、tree diagramにmountに関する表記は無い。
 A mount point definition alone is not sufficient to identify whether the mounted modules are
used for configuration data or for non-configuration data. This is determined by the
"ietf-yang-schema-mount" module's "config" leaf associated with the specific mount point and
is indicated on the top-level mounted nodes.
  Mount pointの定義だけではmountされているmoduleがconfig dataに使用されているかnon-config dataに使用さ
れているのか区別できない。これは、特定のmount pointに関連付けられた"ietf-yang-schema-mount"の"config"
leafによって決定される。
 For example, in the above tree, when the "config" leaf for the "ietf-routing" module
indicates "false", the nodes in the "rt:routing" subtree would have different flags:
 例えば上記のtreeで"ietf-rouing" moduleの"config" leafが"false"の場合、"rt:routing"のnodeには以下の
flagが設定される。
+--ro rt:routing/ ​//config = falseなのでro
| +--ro router-id?
| +--ro control-plane-protocols
...
10

More Related Content

What's hot

フロー技術によるネットワーク管理
フロー技術によるネットワーク管理フロー技術によるネットワーク管理
フロー技術によるネットワーク管理Motonori Shindo
 
大規模DCのネットワークデザイン
大規模DCのネットワークデザイン大規模DCのネットワークデザイン
大規模DCのネットワークデザインMasayuki Kobayashi
 
コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門Kohei Tokunaga
 
ネットワークコンフィグ分析ツール Batfish との付き合い方
ネットワークコンフィグ分析ツール Batfish との付き合い方ネットワークコンフィグ分析ツール Batfish との付き合い方
ネットワークコンフィグ分析ツール Batfish との付き合い方akira6592
 
イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化Gosuke Miyashita
 
Elasticsearchを使うときの注意点 公開用スライド
Elasticsearchを使うときの注意点 公開用スライドElasticsearchを使うときの注意点 公開用スライド
Elasticsearchを使うときの注意点 公開用スライド崇介 藤井
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線Motonori Shindo
 
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)NTT DATA Technology & Innovation
 
DPDKを用いたネットワークスタック,高性能通信基盤開発
DPDKを用いたネットワークスタック,高性能通信基盤開発DPDKを用いたネットワークスタック,高性能通信基盤開発
DPDKを用いたネットワークスタック,高性能通信基盤開発slankdev
 
NEDIA_SNIA_CXL_講演資料.pdf
NEDIA_SNIA_CXL_講演資料.pdfNEDIA_SNIA_CXL_講演資料.pdf
NEDIA_SNIA_CXL_講演資料.pdfYasunori Goto
 
トランザクションをSerializableにする4つの方法
トランザクションをSerializableにする4つの方法トランザクションをSerializableにする4つの方法
トランザクションをSerializableにする4つの方法Kumazaki Hiroki
 
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装Salesforce Developers Japan
 
データベース設計徹底指南
データベース設計徹底指南データベース設計徹底指南
データベース設計徹底指南Mikiya Okuno
 
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudyネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudyYahoo!デベロッパーネットワーク
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Akihiro Suda
 
Doma SQLテンプレートのしくみ
Doma SQLテンプレートのしくみDoma SQLテンプレートのしくみ
Doma SQLテンプレートのしくみToshihiro Nakamura
 
ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術Drecom Co., Ltd.
 
VyOSで作るIPv4 Router/IPv6 Bridge
VyOSで作るIPv4 Router/IPv6 BridgeVyOSで作るIPv4 Router/IPv6 Bridge
VyOSで作るIPv4 Router/IPv6 BridgeKLab Inc. / Tech
 

What's hot (20)

フロー技術によるネットワーク管理
フロー技術によるネットワーク管理フロー技術によるネットワーク管理
フロー技術によるネットワーク管理
 
大規模DCのネットワークデザイン
大規模DCのネットワークデザイン大規模DCのネットワークデザイン
大規模DCのネットワークデザイン
 
NETCONFとYANGの話
NETCONFとYANGの話NETCONFとYANGの話
NETCONFとYANGの話
 
コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門コンテナ未経験新人が学ぶコンテナ技術入門
コンテナ未経験新人が学ぶコンテナ技術入門
 
ネットワークコンフィグ分析ツール Batfish との付き合い方
ネットワークコンフィグ分析ツール Batfish との付き合い方ネットワークコンフィグ分析ツール Batfish との付き合い方
ネットワークコンフィグ分析ツール Batfish との付き合い方
 
EVPN & VXLAN for Cloud Builders
EVPN & VXLAN for Cloud BuildersEVPN & VXLAN for Cloud Builders
EVPN & VXLAN for Cloud Builders
 
イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化イベント駆動プログラミングとI/O多重化
イベント駆動プログラミングとI/O多重化
 
Elasticsearchを使うときの注意点 公開用スライド
Elasticsearchを使うときの注意点 公開用スライドElasticsearchを使うときの注意点 公開用スライド
Elasticsearchを使うときの注意点 公開用スライド
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線
 
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
入門 Kubeflow ~Kubernetesで機械学習をはじめるために~ (NTT Tech Conference #4 講演資料)
 
DPDKを用いたネットワークスタック,高性能通信基盤開発
DPDKを用いたネットワークスタック,高性能通信基盤開発DPDKを用いたネットワークスタック,高性能通信基盤開発
DPDKを用いたネットワークスタック,高性能通信基盤開発
 
NEDIA_SNIA_CXL_講演資料.pdf
NEDIA_SNIA_CXL_講演資料.pdfNEDIA_SNIA_CXL_講演資料.pdf
NEDIA_SNIA_CXL_講演資料.pdf
 
トランザクションをSerializableにする4つの方法
トランザクションをSerializableにする4つの方法トランザクションをSerializableにする4つの方法
トランザクションをSerializableにする4つの方法
 
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
Apache Kafka on Herokuを活用したイベント駆動アーキテクチャの設計と実装
 
データベース設計徹底指南
データベース設計徹底指南データベース設計徹底指南
データベース設計徹底指南
 
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudyネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
ネットワークの自動化・監視の取り組みについて #netopscoding #npstudy
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行
 
Doma SQLテンプレートのしくみ
Doma SQLテンプレートのしくみDoma SQLテンプレートのしくみ
Doma SQLテンプレートのしくみ
 
ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術
 
VyOSで作るIPv4 Router/IPv6 Bridge
VyOSで作るIPv4 Router/IPv6 BridgeVyOSで作るIPv4 Router/IPv6 Bridge
VyOSで作るIPv4 Router/IPv6 Bridge
 

Similar to RFC8340(YANG Tree Diagrams)の勉強資料

RFC8528(YANG Schema Mount)の勉強資料
RFC8528(YANG Schema Mount)の勉強資料RFC8528(YANG Schema Mount)の勉強資料
RFC8528(YANG Schema Mount)の勉強資料Tetsuya Hasegawa
 
RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料
RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料
RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料Tetsuya Hasegawa
 
PHP AST 徹底解説
PHP AST 徹底解説PHP AST 徹底解説
PHP AST 徹底解説do_aki
 
次世代DaoフレームワークDoma
次世代DaoフレームワークDoma次世代DaoフレームワークDoma
次世代DaoフレームワークDomaToshihiro Nakamura
 
C#coding guideline その2_20130325
C#coding guideline その2_20130325C#coding guideline その2_20130325
C#coding guideline その2_20130325Yoshihisa Ozaki
 
Oracle Cloud Developers Meetup@東京
Oracle Cloud Developers Meetup@東京Oracle Cloud Developers Meetup@東京
Oracle Cloud Developers Meetup@東京tuchimur
 
20110820 metaprogramming
20110820 metaprogramming20110820 metaprogramming
20110820 metaprogrammingMasanori Kado
 
RFC6243(With-defaults Capability for NETCONF)の勉強資料
RFC6243(With-defaults Capability for NETCONF)の勉強資料RFC6243(With-defaults Capability for NETCONF)の勉強資料
RFC6243(With-defaults Capability for NETCONF)の勉強資料Tetsuya Hasegawa
 
Patterns and Matching in Rust
Patterns and Matching in RustPatterns and Matching in Rust
Patterns and Matching in RustDaichiMukai1
 
JavaScript (ECMAScript) 2013
JavaScript (ECMAScript) 2013JavaScript (ECMAScript) 2013
JavaScript (ECMAScript) 2013dynamis
 
RDBでのツリー表現入門
RDBでのツリー表現入門RDBでのツリー表現入門
RDBでのツリー表現入門Kent Ohashi
 
Kanazawa.js.Next
Kanazawa.js.NextKanazawa.js.Next
Kanazawa.js.Nextdynamis
 
ECMAScript 6 Features(PDF 版)
ECMAScript 6 Features(PDF 版)ECMAScript 6 Features(PDF 版)
ECMAScript 6 Features(PDF 版)taskie
 
RのffでGLMしてみたけど...
RのffでGLMしてみたけど...RのffでGLMしてみたけど...
RのffでGLMしてみたけど...Kazuya Wada
 
【学習メモ#3rd】12ステップで作る組込みOS自作入門
【学習メモ#3rd】12ステップで作る組込みOS自作入門【学習メモ#3rd】12ステップで作る組込みOS自作入門
【学習メモ#3rd】12ステップで作る組込みOS自作入門sandai
 

Similar to RFC8340(YANG Tree Diagrams)の勉強資料 (18)

RFC8528(YANG Schema Mount)の勉強資料
RFC8528(YANG Schema Mount)の勉強資料RFC8528(YANG Schema Mount)の勉強資料
RFC8528(YANG Schema Mount)の勉強資料
 
RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料
RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料
RFC7951(JSON Encoding of Data Modeled with YANG)の勉強資料
 
PHP AST 徹底解説
PHP AST 徹底解説PHP AST 徹底解説
PHP AST 徹底解説
 
次世代DaoフレームワークDoma
次世代DaoフレームワークDoma次世代DaoフレームワークDoma
次世代DaoフレームワークDoma
 
C#coding guideline その2_20130325
C#coding guideline その2_20130325C#coding guideline その2_20130325
C#coding guideline その2_20130325
 
Oracle Cloud Developers Meetup@東京
Oracle Cloud Developers Meetup@東京Oracle Cloud Developers Meetup@東京
Oracle Cloud Developers Meetup@東京
 
20110820 metaprogramming
20110820 metaprogramming20110820 metaprogramming
20110820 metaprogramming
 
d-kami x86-1
d-kami x86-1d-kami x86-1
d-kami x86-1
 
RFC6243(With-defaults Capability for NETCONF)の勉強資料
RFC6243(With-defaults Capability for NETCONF)の勉強資料RFC6243(With-defaults Capability for NETCONF)の勉強資料
RFC6243(With-defaults Capability for NETCONF)の勉強資料
 
Patterns and Matching in Rust
Patterns and Matching in RustPatterns and Matching in Rust
Patterns and Matching in Rust
 
JavaScript (ECMAScript) 2013
JavaScript (ECMAScript) 2013JavaScript (ECMAScript) 2013
JavaScript (ECMAScript) 2013
 
それRxJSでできるよ
それRxJSでできるよそれRxJSでできるよ
それRxJSでできるよ
 
RDBでのツリー表現入門
RDBでのツリー表現入門RDBでのツリー表現入門
RDBでのツリー表現入門
 
Kanazawa.js.Next
Kanazawa.js.NextKanazawa.js.Next
Kanazawa.js.Next
 
ECMAScript 6 Features(PDF 版)
ECMAScript 6 Features(PDF 版)ECMAScript 6 Features(PDF 版)
ECMAScript 6 Features(PDF 版)
 
RのffでGLMしてみたけど...
RのffでGLMしてみたけど...RのffでGLMしてみたけど...
RのffでGLMしてみたけど...
 
R_note_01_ver1.1
R_note_01_ver1.1 R_note_01_ver1.1
R_note_01_ver1.1
 
【学習メモ#3rd】12ステップで作る組込みOS自作入門
【学習メモ#3rd】12ステップで作る組込みOS自作入門【学習メモ#3rd】12ステップで作る組込みOS自作入門
【学習メモ#3rd】12ステップで作る組込みOS自作入門
 

More from Tetsuya Hasegawa

CVE-2021-3156 Baron samedit (sudoの脆弱性)
CVE-2021-3156 Baron samedit (sudoの脆弱性)CVE-2021-3156 Baron samedit (sudoの脆弱性)
CVE-2021-3156 Baron samedit (sudoの脆弱性)Tetsuya Hasegawa
 
面白いセキュリティツール その2
面白いセキュリティツール その2面白いセキュリティツール その2
面白いセキュリティツール その2Tetsuya Hasegawa
 
RFC7589(NETCONF Protocol over TLS)の勉強資料
RFC7589(NETCONF Protocol over TLS)の勉強資料RFC7589(NETCONF Protocol over TLS)の勉強資料
RFC7589(NETCONF Protocol over TLS)の勉強資料Tetsuya Hasegawa
 
RFC8632(A YANG Data Model for Alarm Management)の勉強資料
RFC8632(A YANG Data Model for Alarm Management)の勉強資料RFC8632(A YANG Data Model for Alarm Management)の勉強資料
RFC8632(A YANG Data Model for Alarm Management)の勉強資料Tetsuya Hasegawa
 
RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料
RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料
RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料Tetsuya Hasegawa
 
RFC8341(Network Configuration Access Control Model)の勉強資料。
RFC8341(Network Configuration Access Control Model)の勉強資料。RFC8341(Network Configuration Access Control Model)の勉強資料。
RFC8341(Network Configuration Access Control Model)の勉強資料。Tetsuya Hasegawa
 
RFC8525(YANG Library)の勉強資料。
RFC8525(YANG Library)の勉強資料。RFC8525(YANG Library)の勉強資料。
RFC8525(YANG Library)の勉強資料。Tetsuya Hasegawa
 
3GPP F1インターフェース(TS38.470-f50)の概要
3GPP F1インターフェース(TS38.470-f50)の概要3GPP F1インターフェース(TS38.470-f50)の概要
3GPP F1インターフェース(TS38.470-f50)の概要Tetsuya Hasegawa
 
SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)
SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)
SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)Tetsuya Hasegawa
 
RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料
RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料
RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料Tetsuya Hasegawa
 
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料Tetsuya Hasegawa
 
5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向
5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向
5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向Tetsuya Hasegawa
 
MCPC第5回イノベーションチャレンジセミナーメモ
MCPC第5回イノベーションチャレンジセミナーメモMCPC第5回イノベーションチャレンジセミナーメモ
MCPC第5回イノベーションチャレンジセミナーメモTetsuya Hasegawa
 
面白いセキュリティツール
面白いセキュリティツール面白いセキュリティツール
面白いセキュリティツールTetsuya Hasegawa
 
3GPP TS 38.300-100まとめ
3GPP TS 38.300-100まとめ3GPP TS 38.300-100まとめ
3GPP TS 38.300-100まとめTetsuya Hasegawa
 
Infer:人工知能を使った静的コードチェック
Infer:人工知能を使った静的コードチェックInfer:人工知能を使った静的コードチェック
Infer:人工知能を使った静的コードチェックTetsuya Hasegawa
 
3GPP TR23.711-e00まとめ
3GPP TR23.711-e00まとめ3GPP TR23.711-e00まとめ
3GPP TR23.711-e00まとめTetsuya Hasegawa
 
3GPP TR38.801-e00まとめ
3GPP TR38.801-e00まとめ3GPP TR38.801-e00まとめ
3GPP TR38.801-e00まとめTetsuya Hasegawa
 
Web applicationpenetrationtest その5
Web applicationpenetrationtest その5Web applicationpenetrationtest その5
Web applicationpenetrationtest その5Tetsuya Hasegawa
 

More from Tetsuya Hasegawa (20)

CVE-2021-3156 Baron samedit (sudoの脆弱性)
CVE-2021-3156 Baron samedit (sudoの脆弱性)CVE-2021-3156 Baron samedit (sudoの脆弱性)
CVE-2021-3156 Baron samedit (sudoの脆弱性)
 
面白いセキュリティツール その2
面白いセキュリティツール その2面白いセキュリティツール その2
面白いセキュリティツール その2
 
RFC7589(NETCONF Protocol over TLS)の勉強資料
RFC7589(NETCONF Protocol over TLS)の勉強資料RFC7589(NETCONF Protocol over TLS)の勉強資料
RFC7589(NETCONF Protocol over TLS)の勉強資料
 
RFC8632(A YANG Data Model for Alarm Management)の勉強資料
RFC8632(A YANG Data Model for Alarm Management)の勉強資料RFC8632(A YANG Data Model for Alarm Management)の勉強資料
RFC8632(A YANG Data Model for Alarm Management)の勉強資料
 
RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料
RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料
RFC5717(Partial Lock Remote Procedure Call (RPC) for NETCONF)の勉強資料
 
RFC8341(Network Configuration Access Control Model)の勉強資料。
RFC8341(Network Configuration Access Control Model)の勉強資料。RFC8341(Network Configuration Access Control Model)の勉強資料。
RFC8341(Network Configuration Access Control Model)の勉強資料。
 
RFC8525(YANG Library)の勉強資料。
RFC8525(YANG Library)の勉強資料。RFC8525(YANG Library)の勉強資料。
RFC8525(YANG Library)の勉強資料。
 
3GPP F1インターフェース(TS38.470-f50)の概要
3GPP F1インターフェース(TS38.470-f50)の概要3GPP F1インターフェース(TS38.470-f50)の概要
3GPP F1インターフェース(TS38.470-f50)の概要
 
SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)
SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)
SSHパケットの復号ツールを作ろう_v1(Decrypt SSH .pcap File)
 
RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料
RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料
RFC8071(NETCONF Call Home and RESTCONF Call Home)の勉強資料
 
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
 
5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向
5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向
5Gを含む将来ネットワークにおけるAI活用に関する国際標準化動向
 
MCPC第5回イノベーションチャレンジセミナーメモ
MCPC第5回イノベーションチャレンジセミナーメモMCPC第5回イノベーションチャレンジセミナーメモ
MCPC第5回イノベーションチャレンジセミナーメモ
 
RFC5996(IKEv2)第2版
RFC5996(IKEv2)第2版RFC5996(IKEv2)第2版
RFC5996(IKEv2)第2版
 
面白いセキュリティツール
面白いセキュリティツール面白いセキュリティツール
面白いセキュリティツール
 
3GPP TS 38.300-100まとめ
3GPP TS 38.300-100まとめ3GPP TS 38.300-100まとめ
3GPP TS 38.300-100まとめ
 
Infer:人工知能を使った静的コードチェック
Infer:人工知能を使った静的コードチェックInfer:人工知能を使った静的コードチェック
Infer:人工知能を使った静的コードチェック
 
3GPP TR23.711-e00まとめ
3GPP TR23.711-e00まとめ3GPP TR23.711-e00まとめ
3GPP TR23.711-e00まとめ
 
3GPP TR38.801-e00まとめ
3GPP TR38.801-e00まとめ3GPP TR38.801-e00まとめ
3GPP TR38.801-e00まとめ
 
Web applicationpenetrationtest その5
Web applicationpenetrationtest その5Web applicationpenetrationtest その5
Web applicationpenetrationtest その5
 

RFC8340(YANG Tree Diagrams)の勉強資料

  • 1. RFC8340(YANG Tree Diagrams)ベースの勉強資料です。 下線、ハイライトは個人的に重要そうなところ。斜体、#はメモ。 原文のMUST/REQUIRED/SHALL/SHOULD/MAY/OPTIONAL等の​RFC2119​用語は原文のまま残しています。  MUST、REQUIRED、SHALL:絶対的な要求事項  MUST NOT:絶対的な禁止事項  SHOULD、RECOMMENDED:慎重に重要性を判断するべき要求事項  SHOULD NOT、NOT RECOMMENDED:慎重に重要性を判断するべき禁止事項  MAY、OPTIONAL:オプション。 間違っていたらコメントをお願いします。 元ネタ(RFC6243) https://tools.ietf.org/html/rfc8340 Errata https://www.rfc-editor.org/errata_search.php?rfc=8340 「​2.6. Node Representation​」を見れば大体OK。 NETCONF Call Home and RESTCONF Call Home Abstract  This document captures the current syntax used in YANG module tree diagrams. The purpose of this document is to provide a single location for this definition. This syntax may be updated from time to time based on the evolution of the YANG language.  YANG module tree diagramのsyntaxを示す。SyntaxはYANG言語のアップデートにより更新される可能性がある。 Table of Contents Abstract 1 Table of Contents 1 1. Introduction 2 2. Tree Diagram Syntax 2 2.1. Submodules 4 2.2. Groupings 4 2.3. yang-data 5 2.4. Collapsed Node Representation 5 2.5. Comments 5 2.6. Node Representation 5 3. Usage Guidelines for RFCs 6 3.1. Wrapping Long Lines 7 3.2. Groupings 7 3.3. Long Diagrams 7 4. YANG Schema Mount Tree Diagrams 8 4.1. Representation of Mounted Schema Trees 9 1
  • 2. 1. Introduction  YANG tree diagrams were first published in RFC 6536. Such diagrams are used to provide a simplified graphical representation of a data model and can be automatically generated via tools such as "pyang" [PYANG]. This document describes the syntax used in YANG tree diagrams. It is expected that this document will be updated or replaced as changes to the YANG language [RFC7950] necessitate.  YANG tree diagramはRFC6536で最初に公開された。データモデルをグラフィカルに表現するために使用され、"pyang"等 のツールで自動生成される。本RFCではYANG tree diagramで使用されるsyntaxの説明をする。YANG言語[RFC7950]の変更 時には本RFCも更新される。  Today's common practice is to include the definition of the syntax used to represent a YANG module in every document that provides a tree diagram. This practice has several disadvantages; therefore, the purpose of this document is to provide a single location for this definition. It is not the intent of this document to restrict future changes, but rather to ensure that such changes are easily identified and suitably agreed upon.  ​YANG moduleをtree diagramで表現することは一般的である。本RFCの目的はこれを定義することである。  An example tree diagram can be found in Section 3 of [RFC8343]; the following is a portion of it:  ​Tree diagramの例はRFC8343のsection 3にある。以下はその一部である。 +--rw interfaces +--rw interface* [name] +--rw name string +--rw description? string +--rw type identityref +--rw enabled? boolean +--rw link-up-down-trap-enable? enumeration {if-mib}? 2. Tree Diagram Syntax  This section describes the meaning of the symbols used in YANG tree diagrams.  YANG tree diagramで使用される記号の意味を説明する。  A full tree diagram of a module represents all elements. It includes the name of the module and sections for top-level module statements (typically containers), augmentations, rpcs, and notifications all identified under a module statement. Module trees may be included in a document as a whole, by one or more sections, or even by subsets of nodes.  Moduleのfull tree diagramは全てのelementを表現する。これには、module name, top-level module statement, augmentation, rpc, notificationが含まれる。  A module is identified by "module:" followed by the module-name. This is followed by one or more sections, in order:  Moduleは"module:"とそれに続くmodule-nameで識別される。さらに順番に以下のsectionが続く。以下は2つのスペース でインデントされる。 2
  • 3. 1. The top-level data nodes defined in the module, offset by two spaces.  Moduleのtop-levelのdata node。 2. Augmentations, offset by two spaces and identified by the keyword "augment" followed by the augment target node and a colon (":") character.  Augmentation。"augment <target-node>:"と表記。 3. RPCs, offset by two spaces and identified by "rpcs:".  RPC。"rpcs:"と表記。 4. Notifications, offset by two spaces and identified by "notifications:".  Notification。"notifications:"と表記。 5. Groupings, offset by two spaces and identified by the keyword "grouping" followed by the name of the grouping and a colon (":") character.  Grouping。"grouping <grouping-name>:"と表記。 6. yang-data, offset by two spaces and identified by the keyword "yang-data" followed by the name of the yang-data structure and a colon (":") character.  yang-data。"yang-data <yang-data-name>:"と表記。 The relative organization of each section is provided using a text-based format that is typical of a file system directory tree display command. Each node in the tree is prefaced with "+--". Schema nodes that are children of another node are offset from the parent by three spaces. Sibling schema nodes are listed with the same space offset and, when separated by lines, are linked via a vertical bar ("|") character.  各sectionはファイルシステムのdirectory tree displayコマンドと同様のフォーマットで表現される。nodeは"+--"で 始まる。別のnodeの子のschema nodeは親から3つのスペースでインデントされる。兄弟schema nodeは同じスペースでイン デントされ、行が間にある場合は"|"で繋がれる。  The full format, including spacing conventions, is:  スペースによるインデントを含むフォーマットは以下である。わかりやすいように一部スペースを”​0​”にしています。 module: <module-name> 00​+--<node> //1番目:Moduleのtop-levelのdata node |​00​+--<node> //兄弟schema nodeは同じスペースでインデントされ、”|”で繋ぐ | ​000​+--<node> //子のschema nodeは3つのスペースでインデント +--<node> +--<node> +--<node> 00​augment <target-node>: //2番目:Augmentations +--<node> ​000​+--<node> +--<node> ​000​+--<node> 00​augment <target-node>: +--<node> 00​rpcs: //3番目:RPCs 3
  • 4. +--<rpc-node> +--<rpc-node> +--<node> | +--<node> //兄弟schema nodeは同じスペースでインデントされ、”|”で繋ぐ +--<node> notifications: //4番目:Notifications +--<notification-node> +--<notification-node> +--<node> | +--<node> +--<node> grouping <grouping-name>: //5番目:Groupings +--<node> +--<node> | +--<node> +--<node> grouping <grouping-name>: +--<node> yang-data <yang-data-name>: //6番目:yang-data +--<node> +--<node> | +--<node> +--<node> yang-data <yang-data-name>: +--<node> 2.1. Submodules  Submodules are represented in the same fashion as modules but are identified by "submodule:" followed by the (sub)module-name. For example:  Submoduleはmoduleと同じように表現される。"submodule:"によって識別される。以下は例である。 submodule: <module-name> +--<node> | +--<node> | +--<node> 2.2. Groupings  Nodes within a used grouping are normally expanded as if the nodes were defined at the location of the "uses" statement. However, it is also possible to not expand the "uses" statement but to instead print the name of the grouping.  Groupingのnodeは"uses" statementに定義されているように展開される。ただし、"uses" statementを展開せずに groupingの名前を表示してもよい。  For example, the following diagram shows the "tls-transport" grouping from [RFC7407] unexpanded:  以下は"tls-transport"の展開されていない例である。 +--rw tls +---u tls-transport  If the grouping is expanded, it could be printed as: 4
  • 5.  以下は"tls-transport"の展開されている例である。 +--rw tls +--rw port? inet:port-number +--rw client-fingerprint? x509c2n:tls-fingerprint +--rw server-fingerprint? x509c2n:tls-fingerprint +--rw server-identity? snmp:admin-string  Groupings may optionally be present in the "groupings" section.  Groupingは"groupings"でoptionで存在する。 2.3. yang-data  If the module defines a "yang-data" structure [RFC8040], these structures may optionally be present in the "yang-data" section.  Moduleが"yang-data" structureを定義している場合、"yang-data" sectionに存在する。 2.4. Collapsed Node Representation  At times when the composition of the nodes within a module schema is not important in the context of the presented tree, sibling nodes and their children can be collapsed using the notation "..." in place of the text lines used to represent the summarized nodes. For example:  Module schema内のnodeが重要でない場合、兄弟nodeとその子nodeは"..."で省略してもよい。 +--<node> | ... +--<node> +--<node> +--<node> 2.5. Comments  Single line comments, starting with "//" (possibly indented) and ending at the end of the line, may be used in the tree notation.  "//"で始まり、一行で終わるコメントを使用してよい。 2.6. Node Representation  Each node in a YANG module is printed as:  YANG moduleの各nodeは以下のように表現される。 <status>--<flags> <name><opts> <type> <if-features> <status> 右記の一つ + current x deprecated o obsolete 5
  • 6. <flags> 右記の一つ ※Case nodeには<flags>は無い rw configuration data node and choice node ro non-configuration data node and choice node output parameter to rpc and action notification parameter -w input parameter to rpc and action -u uses of a grouping -x rpc and action -n notification mp node containing a "mount-point" extension statement <name> Node名 Nodeが別のmoduleからtreeに展開されている 場合、その名前は"<prefix>:<name>"で出力 される。"<prefix>"はnodeが定義されている moduleで定義されているprefixである。 ※Case nodeの場合、<name>の前にスペース は無い。 (<name>) choice node :(<name>) case node <opts> 右記の一つ ? optional leaf, choice, anydata, or anyxml ! presence container * leaf-list or list [<keys>] list's keys / top-level data node in a mounted module @ top-level data node of a module identified in a mount point parent reference <type> leaf, leaf-listsのtype名 typeがleafrefの場合、"-> TARGET"で表記される。TARGETは leafref pathまたは"leafref" <if-features> このnodeが依存しているfeatureのlistで、"{...}?"で表現される。  Arbitrary whitespace is allowed between any of the whitespace-separated fields (e.g., <opts> and <type>). Additional whitespace may, for example, be used to "column align" fields (e.g., within a list or container) to improve readability.  任意のスペースをスペースで区切られたフィールド(例:<opts>と<type>の間)に追加してよい。例えば、スペースはフィー ルドの列を揃えるために使用される。 3. Usage Guidelines for RFCs  This section provides general guidelines related to the use of tree diagrams in RFCs.  RFCにおけるtree diagramの使用方法に関するガイドラインを説明する。 6
  • 7. 3.1. Wrapping Long Lines  Internet-Drafts and RFCs limit the number of characters that may appear in a line of text to 72 characters. When the tree representation of a node results in a line being longer than this limit, the line should be broken between <opts> and <type> or between <type> and <if-feature>. The new line should be indented so that it starts below <name> with a whitespace offset of at least two characters. For example:  RFCでは1行の文字を72文字に制限している。Nodeのtree diagramが72文字より多くなる場合、​その行は<opts>と<type> の間、または<type>と<if-feature>の間で分割されることが推奨される。​改行は、2文字以上のスペースでインデントされ、 <name>の下から始まるようにする。 notifications: +---n yang-library-change +--ro module-set-id -> /modules-state/module-set-id  Long paths (e.g., leafref paths or augment targets) can be split and printed on more than one line. For example:  Long path(例:leafref pathやaugment target)は分割して複数行で表現してよい。 augment /nat:nat/nat:instances/nat:instance/nat:mapping-table /nat:mapping-entry:  The previously mentioned "pyang" command can be helpful in producing such output; for example, the notification diagram above was produced using:  pyangコマンドでは以下のように出力する。 pyang -f tree --tree-line-length 50 ietf-yang-library.yang  When a tree diagram is included as a figure in an Internet-Draft or RFC, "--tree-line-length 69" works well.  RFCの場合は"--tree-line-length 69"がよい。 3.2. Groupings  If the YANG module is comprised of groupings only, then the tree diagram should contain the groupings. The "pyang" compiler can be used to produce a tree diagram with groupings using the "-f tree --tree-print-groupings" command-line parameters.  YANG moduleがgroupingのみで構成される場合、tree diagramにgroupingが含まれる。pyangを使用する場合、"-f tree --tree-print-groupings"でgroupingしたtree diagramを作成できる。 3.3. Long Diagrams Tree diagrams can be split into sections to correspond to document structure. As tree diagrams are intended to provide a simplified view of a module, diagrams longer than a page should generally be avoided. If the complete tree diagram for a module becomes too long, the diagram can be split into several smaller diagrams. For example, it might be possible to have one diagram with the data node and another with all notifications. If the data nodes tree is 7
  • 8. too long, it is also possible to split the diagram into smaller diagrams for different subtrees. When long diagrams are included in a document, authors should consider whether to include the long diagram in the main body of the document or in an appendix.  Tree diagramは、document構造に対応するようにsectionで分割できる。Tree diagramはmoduleの簡略図を示すこと を目的としているため、1ページより長い図は避けるべきである。例えば、一つの図にdata node、もう一つの図に notificationを記載する。Data node treeが長い場合はsubtreeにして分割してもよい。  An example of such a split can be found in [RFC7407], where Section 2.4 of that document shows the diagram for "engine configuration":  分割の例はRFC7407にある。Section 2.4が"engine configuration"のdiagramである。 +--rw snmp +--rw engine ​//engine configurationだけ抽出している。詳細はRFC7407 Secion 2.4参照 // more parameters from the "engine" subtree here  Further, Section 2.5 of [RFC7407] shows the diagram for "target configuration":  RFC7407 Section 2.5の"target configuration"も同様。 +--rw snmp +--rw target* [name] ​//target configurationだけ抽出している。詳細はRFC7407 Secion 2.5参照 // more parameters from the "target" subtree here  The previously mentioned "pyang" command can be helpful in producing such output; for example, the above example was produced using:  pyangでは以下のコマンドで出力される。 pyang -f tree --tree-path /snmp/target ietf-snmp.yang 4. YANG Schema Mount Tree Diagrams "YANG schema mount" is defined in [SCHEMA-MOUNT] and warrants some specific discussion. Schema mount is a generic mechanism that allows for the mounting of one or more YANG modules at a specified location of another (parent) schema. The specific location is referred to as a "mount point", and any container or list node in a schema may serve as a mount point. Mount points are identified via the inclusion of the "mount-point" extension statement as a substatement under a container or list node. Mount point nodes are thus directly identified in a module schema definition and can be identified in a tree diagram as indicated above using the "mp" flag.  ​"YANG schema mount"[RFC8528]​は、他の親schemaの指定された場所に一つ以上のYANG moduleをマウントできるメカ ニズムである。指定した場所は"mount point"と呼ばれ、schema内のcontainerまたはlist nodeはmount pointとして 機能する。Mount pointはcontainerまたはlist nodeのsubstatementとして"mount-point" extension statementを設定することで識別される。"mp" flagによって以下のようにtree diagramで表現される。  In the following example taken from [YANG-NIs], "vrf-root" is a container that includes the "mount-point" extension statement as part of its definition:  ​以下の例は、"vrf-root"は定義の一部に"mount-point" extenstion statementを含むcontainerである。 module: ietf-network-instance 8
  • 9. +--rw network-instances +--rw network-instance* [name] +--rw name string +--rw enabled? boolean +--rw description? string +--rw (ni-type)? +--rw (root-type) +--:(vrf-root) | +--mp vrf-root //mount-point 4.1. Representation of Mounted Schema Trees  The actual modules made available under a mount point are controlled by a server and are provided to clients. This information is typically provided via the schema mount module ("ietf-yang-schema-mount") defined in [SCHEMA-MOUNT]. The schema mount module supports the exposure of both mounted schema and "parent-references". Parent references are used for XML Path Language (XPath) evaluation within mounted modules and do not represent client-accessible paths; the referenced information is available to clients via the parent schema. Schema mount also defines an "inline" type of mount point, where mounted modules are exposed via the YANG library module.  Mount pointによって利用可能になったmoduleはサーバーによって制御され、クライアントに "ietf-yang-schema-mount"を介して提供される。Schema mount moduleはマウントされたschemaと "parent-references"の両方の公開をサポートする。"parent-references"はマウントされたmodule内のXPathの評価に 使用され、クライアントからのアクセス可能パスを示すものではない。Schema mountでは、マウントされたmoduleがYANG library moduleを介して公開される"inline" typeのmount pointも定義されている。  Although the modules made available under a mount point are not specified in YANG modules that include mount points, the document defining the module will describe the intended use of the module and may identify both modules that will be mounted and parent modules that can be referenced by mounted modules. An example of such a description can be found in [YANG-NIs]. A specific implementation of a module containing mount points will also support a specific list of mounted and referenced modules. In describing both intended use and actual implementations, it is helpful to show how mounted modules would be instantiated and referenced under a mount point using tree diagrams.  Mount pointで利用可能になるmoduleはmount pointを含むYANG moduleでは規定されないが、moduleを定義するRFC ではmountされるmoduleとmountされたmoduleによって参照される親module、moduleの両方について同様に使用方法を説明 してよい。Mount pointを含むmoduleの実装によってはmountされて参照されるmoduleのlistもサポートする。  In such diagrams, the mount point should be treated much like a container that uses a grouping. The flags should also be set based on the "config" leaf mentioned above, and the mount-related options indicated above should be shown for the top-level nodes in a mounted or referenced module. The following example, taken from [YANG-NIs], represents the prior example with the YANG modules "ietf-routing" [YANG-Routing] and "ietf-ospf" [OSPF-YANG] mounted, nodes from the YANG module "ietf-interfaces" [RFC8343] accessible via a parent-reference, and "config" indicating "true":  Mount pointはgroupingを使用するcontainerのように扱う必要がある。Flagは"config" leafに基づいて設定する必 要がある。また、mountされているか参照されているmoduleのtop-level nodeにはmount関連オプションを示す必要があ る。以下の例はYANG module"ietf-routing"および"ietf-ospf"をマウントし、YANG module "ietf-interfaces"か らparent-referenceでアクセス可能であり、"config"が"true"を示している。 module: ietf-network-instance +--rw network-instances +--rw network-instance* [name] 9
  • 10. +--rw name string +--rw enabled? boolean +--rw description? string +--rw (ni-type)? +--rw (root-type) +--:(vrf-root) +--mp vrf-root //mount point, config = trueなのでrw +--ro rt:routing-state/ | +--ro router-id? | +--ro control-plane-protocols | +--ro control-plane-protocol* [type name] | +--ro ospf:ospf | +--ro instance* [af] | ... +--rw rt:routing/ | +--rw router-id? | +--rw control-plane-protocols | +--rw control-plane-protocol* [type name] | +--rw ospf:ospf | +--rw instance* [af] | ... +--ro if:interfaces@ | ... +--ro if:interfaces-state@ | ...  It is worth highlighting that the "ietf-ospf" module augments the "ietf-routing" module, and although it is listed in the schema mount module (or inline YANG library), there is no special mount-related notation in the tree diagram.  "ietf-ospf" moduleは、"ietf-routing" moduleを拡張しており、schema mount moduleまたはlinline YANG libraryにlistされているが、tree diagramにmountに関する表記は無い。  A mount point definition alone is not sufficient to identify whether the mounted modules are used for configuration data or for non-configuration data. This is determined by the "ietf-yang-schema-mount" module's "config" leaf associated with the specific mount point and is indicated on the top-level mounted nodes.   Mount pointの定義だけではmountされているmoduleがconfig dataに使用されているかnon-config dataに使用さ れているのか区別できない。これは、特定のmount pointに関連付けられた"ietf-yang-schema-mount"の"config" leafによって決定される。  For example, in the above tree, when the "config" leaf for the "ietf-routing" module indicates "false", the nodes in the "rt:routing" subtree would have different flags:  例えば上記のtreeで"ietf-rouing" moduleの"config" leafが"false"の場合、"rt:routing"のnodeには以下の flagが設定される。 +--ro rt:routing/ ​//config = falseなのでro | +--ro router-id? | +--ro control-plane-protocols ... 10