-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-bjorklund-netmod-yang-tree-diagrams.xml
executable file
·170 lines (156 loc) · 5.6 KB
/
draft-bjorklund-netmod-yang-tree-diagrams.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<rfc category="info" ipr="trust200902"
docName="draft-bjorklund-netmod-yang-tree-diagrams-00">
<front>
<title abbrev="YANG Tree Diagrams">YANG Tree Diagrams</title>
<author initials="M" surname="Bjorklund" fullname='Martin Bjorklund' >
<organization>Tail-f Systems</organization>
<address>
<email>mbj@tail-f.com</email>
</address>
</author>
<author initials='L.' surname="Berger" fullname='Lou Berger' role='editor'>
<organization>LabN Consulting, L.L.C.</organization>
<address>
<email>lberger@labn.net</email>
</address>
</author>
<date/>
<abstract>
<t>
This document captures the current syntax used in YANG module
Tree Diagrams. The purpose of the 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.
</t>
</abstract>
</front>
<middle>
<section anchor="sec-intro" title="Introduction">
<t>
YANG Tree Diagrams were first published in <xref
target="RFC7223"/>. Such diagrams are commonly used to provided
a simplified graphical representation of a data model and can be
automatically generated via tools such as "pyang". (See <eref
target="https://github.com/mbj4668/pyang"/>). This document
provides the syntax used in YANG Tree Diagrams. It is
expected that this document will be updated or replaced as
changes to the YANG language, see <xref target="RFC7950"/>,
necessitate.
</t>
<t>
Today's Common practice is 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 and the
purpose of the 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 such changes are easily
identified and suitably agreed upon.
</t>
<t>
An example tree diagram can be found in <xref
target="RFC7223"/> Section 3. A portion of which follows:
<figure>
<artwork>
+--rw interfaces
| +--rw interface* [name]
| +--rw name string
| +--rw description? string
| +--rw type identityref
| +--rw enabled? boolean
| +--rw link-up-down-trap-enable? enumeration
</artwork>
</figure>
</t>
<t>
The remainder of this document contains YANG Tree Diagram syntax
based on output from pyang version 1.7.1.
</t>
</section>
<section anchor="sec-syntax" title="Tree Diagram Syntax">
<t>
This section provides the meaning of the symbols used in YANG
Tree diagrams.
</t>
<t>
Each node in a YANG module is printed as:
<figure>
<artwork><![CDATA[
<status> <flags> <name> <opts> <type> <if-features>
<status> is one of:
+ for current
x for deprecated
o for obsolete
<flags> is one of:
rw for configuration data
ro for non-configuration data
-x for rpcs and actions
-n for notifications
<name> is the name of the node
(<name>) means that the node is a choice node
:(<name>) means that the node is a case node
If the node is augmented into the tree from another module, its
name is printed as <prefix>:<name>.
<opts> is one of:
? for an optional leaf, choice, anydata or anyxml
! for a presence container
* for a leaf-list or list
[<keys>] for a list's keys
<type> is the name of the type for leafs and leaf-lists
If the type is a leafref, the type is printed as "-> TARGET",
where TARGET is either the leafref path, with prefixed removed
if possible.
<if-features> is the list of features this node depends on,
printed within curly brackets and a question mark "{...}?"
]]>
</artwork>
</figure>
</t>
</section>
<section anchor="sec-next" title="Next Steps">
<t>
Authors' note: This draft is currently a bit rough. The
next/future version is expected to add text covering different
types of trees and when to use them; for example, complete
module trees, subtrees, trees for groupings etc. Maybe also how
to deal with the limited line lengths in RFCs.
</t>
</section>
<!--
<section anchor="sec-pyang" title="pyang Tree Options">
<t>
This previous section was generated using pyang. Pyang
also has other tree related options that may be useful to
YANG module authors and users. They include:
<figure>
<artwork>
Tree output specific options:
TBD
</artwork>
</figure>
</t>
</section>
-->
<section anchor="sec-iana" title="IANA Considerations">
<t>There are no IANA requests or assignments included in this document.</t>
</section>
</middle>
<?rfc needLines="20"?>
<back>
<references title="Informative References">
<?rfc include="reference.RFC.7223"?>
<?rfc include="reference.RFC.7950"?>
</references>
</back>
</rfc>
<!-- Local Variables: -->
<!-- fill-column:72 -->
<!-- End: -->