draft-ietf-netmod-yang-tree-diagrams-03.txt | draft-ietf-netmod-yang-tree-diagrams-04.txt | |||
---|---|---|---|---|
Network Working Group M. Bjorklund | Network Working Group M. Bjorklund | |||
Internet-Draft Tail-f Systems | Internet-Draft Tail-f Systems | |||
Intended status: Best Current Practice L. Berger, Ed. | Intended status: Best Current Practice L. Berger, Ed. | |||
Expires: June 22, 2018 LabN Consulting, L.L.C. | Expires: June 24, 2018 LabN Consulting, L.L.C. | |||
December 19, 2017 | December 21, 2017 | |||
YANG Tree Diagrams | YANG Tree Diagrams | |||
draft-ietf-netmod-yang-tree-diagrams-03 | draft-ietf-netmod-yang-tree-diagrams-04 | |||
Abstract | Abstract | |||
This document captures the current syntax used in YANG module Tree | This document captures the current syntax used in YANG module Tree | |||
Diagrams. The purpose of the document is to provide a single | Diagrams. The purpose of the document is to provide a single | |||
location for this definition. This syntax may be updated from time | location for this definition. This syntax may be updated from time | |||
to time based on the evolution of the YANG language. | to time based on the evolution of the YANG language. | |||
Status of This Memo | Status of This Memo | |||
skipping to change at page 1, line 34 ¶ | skipping to change at page 1, line 34 ¶ | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on June 22, 2018. | This Internet-Draft will expire on June 24, 2018. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2017 IETF Trust and the persons identified as the | Copyright (c) 2017 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
skipping to change at page 2, line 21 ¶ | skipping to change at page 2, line 21 ¶ | |||
2.3. yang-data . . . . . . . . . . . . . . . . . . . . . . . . 6 | 2.3. yang-data . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
2.4. Collapsed Node Representation . . . . . . . . . . . . . . 6 | 2.4. Collapsed Node Representation . . . . . . . . . . . . . . 6 | |||
2.5. Comments . . . . . . . . . . . . . . . . . . . . . . . . 6 | 2.5. Comments . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
2.6. Node Representation . . . . . . . . . . . . . . . . . . . 6 | 2.6. Node Representation . . . . . . . . . . . . . . . . . . . 6 | |||
3. Usage Guidelines For RFCs . . . . . . . . . . . . . . . . . . 7 | 3. Usage Guidelines For RFCs . . . . . . . . . . . . . . . . . . 7 | |||
3.1. Wrapping Long Lines . . . . . . . . . . . . . . . . . . . 7 | 3.1. Wrapping Long Lines . . . . . . . . . . . . . . . . . . . 7 | |||
3.2. Groupings . . . . . . . . . . . . . . . . . . . . . . . . 8 | 3.2. Groupings . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
3.3. Long Diagrams . . . . . . . . . . . . . . . . . . . . . . 8 | 3.3. Long Diagrams . . . . . . . . . . . . . . . . . . . . . . 8 | |||
4. YANG Schema Mount Tree Diagrams . . . . . . . . . . . . . . . 9 | 4. YANG Schema Mount Tree Diagrams . . . . . . . . . . . . . . . 9 | |||
4.1. Representation of Mounted Schema Trees . . . . . . . . . 9 | 4.1. Representation of Mounted Schema Trees . . . . . . . . . 9 | |||
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 | |||
6. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | 6. Security Considerations . . . . . . . . . . . . . . . . . . . 12 | |||
7. Informative References . . . . . . . . . . . . . . . . . . . 11 | 7. Informative References . . . . . . . . . . . . . . . . . . . 12 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
1. Introduction | 1. Introduction | |||
YANG Tree Diagrams were first published in [RFC6536]. Such diagrams | YANG Tree Diagrams were first published in [RFC6536]. Such diagrams | |||
are commonly used to provided a simplified graphical representation | are commonly used to provided a simplified graphical representation | |||
of a data model and can be automatically generated via tools such as | of a data model and can be automatically generated via tools such as | |||
"pyang". (See <https://github.com/mbj4668/pyang>). This document | "pyang". (See <https://github.com/mbj4668/pyang>). This document | |||
provides the syntax used in YANG Tree Diagrams. It is expected that | provides the syntax used in YANG Tree Diagrams. It is expected that | |||
this document will be updated or replaced as changes to the YANG | this document will be updated or replaced as changes to the YANG | |||
skipping to change at page 7, line 32 ¶ | skipping to change at page 7, line 32 ¶ | |||
<opts> is one of: | <opts> is one of: | |||
? for an optional leaf, choice, anydata or anyxml | ? for an optional leaf, choice, anydata or anyxml | |||
! for a presence container | ! for a presence container | |||
* for a leaf-list or list | * for a leaf-list or list | |||
[<keys>] for a list's keys | [<keys>] for a list's keys | |||
/ for a top-level data node in a mounted module | / for a top-level data node in a mounted module | |||
@ for a top-level data node in a parent referenced module | @ for a top-level data node in a parent referenced module | |||
<type> is the name of the type for leafs and leaf-lists | <type> is the name of the type for leafs and leaf-lists | |||
If the type is a leafref, the type is printed as "-> TARGET", | If the type is a leafref, the type is either printed as | |||
where TARGET is either the leafref path, with prefixes removed | "-> TARGET", where TARGET is the leafref path, with prefixes | |||
if possible. | removed if possible, or printed as "leafref". | |||
<if-features> is the list of features this node depends on, | <if-features> is the list of features this node depends on, | |||
printed within curly brackets and a question mark "{...}?" | printed within curly brackets and a question mark "{...}?" | |||
3. Usage Guidelines For RFCs | 3. Usage Guidelines For RFCs | |||
This section provides general guidelines related to the use of tree | This section provides general guidelines related to the use of tree | |||
diagrams in RFCs. | diagrams in RFCs. | |||
3.1. Wrapping Long Lines | 3.1. Wrapping Long Lines | |||
skipping to change at page 8, line 10 ¶ | skipping to change at page 8, line 10 ¶ | |||
node results in line being longer than this limit the line should be | node results in line being longer than this limit the line should be | |||
broken between <opts> and <type>. The type should be indented so | broken between <opts> and <type>. The type should be indented so | |||
that the new line starts below <name> with a white space offset of at | that the new line starts below <name> with a white space offset of at | |||
least two characters. For example: | least two characters. For example: | |||
notifications: | notifications: | |||
+---n yang-library-change | +---n yang-library-change | |||
+--ro module-set-id | +--ro module-set-id | |||
-> /modules-state/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: | ||||
augment /nat:nat/nat:instances/nat:instance/nat:mapping-table | ||||
/nat:mapping-entry: | ||||
The previously mentioned "pyang" command can be helpful in producing | The previously mentioned "pyang" command can be helpful in producing | |||
such output, for example the above example was produced using: | such output, for example the notification diagram above was produced | |||
using: | ||||
pyang -f tree --tree-line-length 50 ietf-yang-library.yang | 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 | 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" works well. | |||
3.2. Groupings | 3.2. Groupings | |||
If the YANG module is comprised of groupings only, then the tree | If the YANG module is comprised of groupings only, then the tree | |||
diagram should contain the groupings. The 'pyang' compiler can be | diagram should contain the groupings. The 'pyang' compiler can be | |||
skipping to change at page 11, line 45 ¶ | skipping to change at page 12, line 27 ¶ | |||
Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft- | Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft- | |||
ietf-netmod-schema-mount-08 (work in progress), October | ietf-netmod-schema-mount-08 (work in progress), October | |||
2017. | 2017. | |||
[I-D.ietf-rtgwg-ni-model] | [I-D.ietf-rtgwg-ni-model] | |||
Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. | Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. | |||
Liu, "YANG Network Instances", draft-ietf-rtgwg-ni- | Liu, "YANG Network Instances", draft-ietf-rtgwg-ni- | |||
model-05 (work in progress), December 2017. | model-05 (work in progress), December 2017. | |||
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration | [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration | |||
Protocol (NETCONF) Access Control Model", RFC 6536, | Protocol (NETCONF) Access Control Model", RFC 6536, DOI | |||
DOI 10.17487/RFC6536, March 2012, <https://www.rfc- | 10.17487/RFC6536, March 2012, <https://www.rfc- | |||
editor.org/info/rfc6536>. | editor.org/info/rfc6536>. | |||
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface | [RFC7223] Bjorklund, M., "A YANG Data Model for Interface | |||
Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, | Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, | |||
<https://www.rfc-editor.org/info/rfc7223>. | <https://www.rfc-editor.org/info/rfc7223>. | |||
[RFC7407] Bjorklund, M. and J. Schoenwaelder, "A YANG Data Model for | [RFC7407] Bjorklund, M. and J. Schoenwaelder, "A YANG Data Model for | |||
SNMP Configuration", RFC 7407, DOI 10.17487/RFC7407, | SNMP Configuration", RFC 7407, DOI 10.17487/RFC7407, | |||
December 2014, <https://www.rfc-editor.org/info/rfc7407>. | December 2014, <https://www.rfc-editor.org/info/rfc7407>. | |||
End of changes. 8 change blocks. | ||||
13 lines changed or deleted | 20 lines changed or added | |||
This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |