--- 1/draft-ietf-netmod-yang-tree-diagrams-03.txt 2017-12-21 15:13:08.165959639 -0800 +++ 2/draft-ietf-netmod-yang-tree-diagrams-04.txt 2017-12-21 15:13:08.185959881 -0800 @@ -1,19 +1,19 @@ Network Working Group M. Bjorklund Internet-Draft Tail-f Systems Intended status: Best Current Practice L. Berger, Ed. -Expires: June 22, 2018 LabN Consulting, L.L.C. - December 19, 2017 +Expires: June 24, 2018 LabN Consulting, L.L.C. + December 21, 2017 YANG Tree Diagrams - draft-ietf-netmod-yang-tree-diagrams-03 + draft-ietf-netmod-yang-tree-diagrams-04 Abstract 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. Status of This Memo @@ -23,21 +23,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference 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 (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -56,23 +56,23 @@ 2.3. yang-data . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4. Collapsed Node Representation . . . . . . . . . . . . . . 6 2.5. Comments . . . . . . . . . . . . . . . . . . . . . . . . 6 2.6. Node Representation . . . . . . . . . . . . . . . . . . . 6 3. Usage Guidelines For RFCs . . . . . . . . . . . . . . . . . . 7 3.1. Wrapping Long Lines . . . . . . . . . . . . . . . . . . . 7 3.2. Groupings . . . . . . . . . . . . . . . . . . . . . . . . 8 3.3. Long Diagrams . . . . . . . . . . . . . . . . . . . . . . 8 4. YANG Schema Mount Tree Diagrams . . . . . . . . . . . . . . . 9 4.1. Representation of Mounted Schema Trees . . . . . . . . . 9 - 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 - 6. Security Considerations . . . . . . . . . . . . . . . . . . . 11 - 7. Informative References . . . . . . . . . . . . . . . . . . . 11 + 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 + 6. Security Considerations . . . . . . . . . . . . . . . . . . . 12 + 7. Informative References . . . . . . . . . . . . . . . . . . . 12 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 1. Introduction YANG Tree Diagrams were first published in [RFC6536]. 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 ). 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 @@ -262,23 +262,23 @@ is one of: ? for an optional leaf, choice, anydata or anyxml ! for a presence container * for a leaf-list or list [] for a list's keys / for a top-level data node in a mounted module @ for a top-level data node in a parent referenced module 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 prefixes removed - if possible. + If the type is a leafref, the type is either printed as + "-> TARGET", where TARGET is the leafref path, with prefixes + removed if possible, or printed as "leafref". is the list of features this node depends on, printed within curly brackets and a question mark "{...}?" 3. Usage Guidelines For RFCs This section provides general guidelines related to the use of tree diagrams in RFCs. 3.1. Wrapping Long Lines @@ -288,22 +288,29 @@ node results in line being longer than this limit the line should be broken between and . The type should be indented so that the new line starts below with a white space offset of at least two characters. For example: 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: + + 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 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 When a tree diagram is included as a figure in an Internet Draft or RFC, "--tree-line-length 69" works well. 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 @@ -466,22 +473,22 @@ Bjorklund, M. and L. Lhotka, "YANG Schema Mount", draft- ietf-netmod-schema-mount-08 (work in progress), October 2017. [I-D.ietf-rtgwg-ni-model] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. Liu, "YANG Network Instances", draft-ietf-rtgwg-ni- model-05 (work in progress), December 2017. [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration - Protocol (NETCONF) Access Control Model", RFC 6536, - DOI 10.17487/RFC6536, March 2012, . [RFC7223] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, . [RFC7407] Bjorklund, M. and J. Schoenwaelder, "A YANG Data Model for SNMP Configuration", RFC 7407, DOI 10.17487/RFC7407, December 2014, .