draft-ietf-netmod-yang-06.txt | draft-ietf-netmod-yang-07.txt | |||
---|---|---|---|---|
Network Working Group M. Bjorklund, Ed. | Network Working Group M. Bjorklund, Ed. | |||
Internet-Draft Tail-f Systems | Internet-Draft Tail-f Systems | |||
Intended status: Standards Track June 25, 2009 | Intended status: Standards Track July 13, 2009 | |||
Expires: December 27, 2009 | Expires: January 14, 2010 | |||
YANG - A data modeling language for NETCONF | YANG - A data modeling language for NETCONF | |||
draft-ietf-netmod-yang-06 | draft-ietf-netmod-yang-07 | |||
Status of this Memo | Status of this Memo | |||
This Internet-Draft is submitted to IETF in full conformance with the | This Internet-Draft is submitted to IETF in full conformance with the | |||
provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF), its areas, and its working groups. Note that | Task Force (IETF), its areas, and its working groups. Note that | |||
other groups may also distribute working documents as Internet- | other groups may also distribute working documents as Internet- | |||
Drafts. | Drafts. | |||
skipping to change at page 1, line 32 | skipping to change at page 1, line 32 | |||
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." | |||
The list of current Internet-Drafts can be accessed at | The list of current Internet-Drafts can be accessed at | |||
http://www.ietf.org/ietf/1id-abstracts.txt. | http://www.ietf.org/ietf/1id-abstracts.txt. | |||
The list of Internet-Draft Shadow Directories can be accessed at | The list of Internet-Draft Shadow Directories can be accessed at | |||
http://www.ietf.org/shadow.html. | http://www.ietf.org/shadow.html. | |||
This Internet-Draft will expire on December 27, 2009. | This Internet-Draft will expire on January 14, 2010. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2009 IETF Trust and the persons identified as the | Copyright (c) 2009 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 in effect on the date of | Provisions Relating to IETF Documents in effect on the date of | |||
publication of this document (http://trustee.ietf.org/license-info). | publication of this document (http://trustee.ietf.org/license-info). | |||
Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
skipping to change at page 3, line 9 | skipping to change at page 3, line 9 | |||
6.1. Lexicographical Tokenization . . . . . . . . . . . . . . 35 | 6.1. Lexicographical Tokenization . . . . . . . . . . . . . . 35 | |||
6.1.1. Comments . . . . . . . . . . . . . . . . . . . . . . 35 | 6.1.1. Comments . . . . . . . . . . . . . . . . . . . . . . 35 | |||
6.1.2. Tokens . . . . . . . . . . . . . . . . . . . . . . . 35 | 6.1.2. Tokens . . . . . . . . . . . . . . . . . . . . . . . 35 | |||
6.1.3. Quoting . . . . . . . . . . . . . . . . . . . . . . . 35 | 6.1.3. Quoting . . . . . . . . . . . . . . . . . . . . . . . 35 | |||
6.2. Identifiers . . . . . . . . . . . . . . . . . . . . . . . 37 | 6.2. Identifiers . . . . . . . . . . . . . . . . . . . . . . . 37 | |||
6.2.1. Identifiers and their namespaces . . . . . . . . . . 37 | 6.2.1. Identifiers and their namespaces . . . . . . . . . . 37 | |||
6.3. Statements . . . . . . . . . . . . . . . . . . . . . . . 38 | 6.3. Statements . . . . . . . . . . . . . . . . . . . . . . . 38 | |||
6.3.1. Language Extensions . . . . . . . . . . . . . . . . . 38 | 6.3.1. Language Extensions . . . . . . . . . . . . . . . . . 38 | |||
6.4. XPath Evaluations . . . . . . . . . . . . . . . . . . . . 38 | 6.4. XPath Evaluations . . . . . . . . . . . . . . . . . . . . 38 | |||
6.4.1. XPath Context . . . . . . . . . . . . . . . . . . . . 39 | 6.4.1. XPath Context . . . . . . . . . . . . . . . . . . . . 39 | |||
7. YANG Statements . . . . . . . . . . . . . . . . . . . . . . . 40 | 6.5. Schema Node Identifier . . . . . . . . . . . . . . . . . 39 | |||
7.1. The module Statement . . . . . . . . . . . . . . . . . . 40 | 7. YANG Statements . . . . . . . . . . . . . . . . . . . . . . . 41 | |||
7.1.1. The module's Substatements . . . . . . . . . . . . . 41 | 7.1. The module Statement . . . . . . . . . . . . . . . . . . 41 | |||
7.1.2. The yang-version Statement . . . . . . . . . . . . . 42 | 7.1.1. The module's Substatements . . . . . . . . . . . . . 42 | |||
7.1.3. The namespace Statement . . . . . . . . . . . . . . . 42 | 7.1.2. The yang-version Statement . . . . . . . . . . . . . 43 | |||
7.1.4. The prefix Statement . . . . . . . . . . . . . . . . 43 | 7.1.3. The namespace Statement . . . . . . . . . . . . . . . 43 | |||
7.1.5. The import Statement . . . . . . . . . . . . . . . . 43 | 7.1.4. The prefix Statement . . . . . . . . . . . . . . . . 44 | |||
7.1.6. The include Statement . . . . . . . . . . . . . . . . 44 | 7.1.5. The import Statement . . . . . . . . . . . . . . . . 44 | |||
7.1.7. The organization Statement . . . . . . . . . . . . . 45 | 7.1.6. The include Statement . . . . . . . . . . . . . . . . 45 | |||
7.1.8. The contact Statement . . . . . . . . . . . . . . . . 45 | 7.1.7. The organization Statement . . . . . . . . . . . . . 46 | |||
7.1.9. The revision Statement . . . . . . . . . . . . . . . 45 | 7.1.8. The contact Statement . . . . . . . . . . . . . . . . 46 | |||
7.1.10. Usage Example . . . . . . . . . . . . . . . . . . . . 46 | 7.1.9. The revision Statement . . . . . . . . . . . . . . . 46 | |||
7.2. The submodule Statement . . . . . . . . . . . . . . . . . 46 | 7.1.10. Usage Example . . . . . . . . . . . . . . . . . . . . 47 | |||
7.2.1. The submodule's Substatements . . . . . . . . . . . . 47 | 7.2. The submodule Statement . . . . . . . . . . . . . . . . . 47 | |||
7.2.2. The belongs-to Statement . . . . . . . . . . . . . . 48 | 7.2.1. The submodule's Substatements . . . . . . . . . . . . 48 | |||
7.2.3. Usage Example . . . . . . . . . . . . . . . . . . . . 49 | 7.2.2. The belongs-to Statement . . . . . . . . . . . . . . 49 | |||
7.3. The typedef Statement . . . . . . . . . . . . . . . . . . 49 | 7.2.3. Usage Example . . . . . . . . . . . . . . . . . . . . 50 | |||
7.3.1. The typedef's Substatements . . . . . . . . . . . . . 50 | 7.3. The typedef Statement . . . . . . . . . . . . . . . . . . 50 | |||
7.3.2. The typedef's type Statement . . . . . . . . . . . . 50 | 7.3.1. The typedef's Substatements . . . . . . . . . . . . . 51 | |||
7.3.3. The units Statement . . . . . . . . . . . . . . . . . 50 | 7.3.2. The typedef's type Statement . . . . . . . . . . . . 51 | |||
7.3.4. The typedef's default Statement . . . . . . . . . . . 50 | 7.3.3. The units Statement . . . . . . . . . . . . . . . . . 51 | |||
7.3.5. Usage Example . . . . . . . . . . . . . . . . . . . . 51 | 7.3.4. The typedef's default Statement . . . . . . . . . . . 51 | |||
7.4. The type Statement . . . . . . . . . . . . . . . . . . . 51 | 7.3.5. Usage Example . . . . . . . . . . . . . . . . . . . . 52 | |||
7.4.1. The type's Substatements . . . . . . . . . . . . . . 51 | 7.4. The type Statement . . . . . . . . . . . . . . . . . . . 52 | |||
7.5. The container Statement . . . . . . . . . . . . . . . . . 51 | 7.4.1. The type's Substatements . . . . . . . . . . . . . . 52 | |||
7.5.1. Containers with Presence . . . . . . . . . . . . . . 52 | 7.5. The container Statement . . . . . . . . . . . . . . . . . 52 | |||
7.5.2. The container's Substatements . . . . . . . . . . . . 53 | 7.5.1. Containers with Presence . . . . . . . . . . . . . . 53 | |||
7.5.3. The must Statement . . . . . . . . . . . . . . . . . 53 | 7.5.2. The container's Substatements . . . . . . . . . . . . 54 | |||
7.5.4. The must's Substatements . . . . . . . . . . . . . . 55 | 7.5.3. The must Statement . . . . . . . . . . . . . . . . . 54 | |||
7.5.5. The presence Statement . . . . . . . . . . . . . . . 56 | 7.5.4. The must's Substatements . . . . . . . . . . . . . . 56 | |||
7.5.6. The container's Child Node Statements . . . . . . . . 56 | 7.5.5. The presence Statement . . . . . . . . . . . . . . . 57 | |||
7.5.7. XML Mapping Rules . . . . . . . . . . . . . . . . . . 56 | 7.5.6. The container's Child Node Statements . . . . . . . . 57 | |||
7.5.8. NETCONF <edit-config> Operations . . . . . . . . . . 56 | 7.5.7. XML Mapping Rules . . . . . . . . . . . . . . . . . . 57 | |||
7.5.9. Usage Example . . . . . . . . . . . . . . . . . . . . 57 | 7.5.8. NETCONF <edit-config> Operations . . . . . . . . . . 57 | |||
7.6. The leaf Statement . . . . . . . . . . . . . . . . . . . 58 | 7.5.9. Usage Example . . . . . . . . . . . . . . . . . . . . 58 | |||
7.6.1. The leaf's Substatements . . . . . . . . . . . . . . 59 | 7.6. The leaf Statement . . . . . . . . . . . . . . . . . . . 59 | |||
7.6.2. The leaf's type Statement . . . . . . . . . . . . . . 59 | 7.6.1. The leaf's Substatements . . . . . . . . . . . . . . 60 | |||
7.6.3. The leaf's default Statement . . . . . . . . . . . . 59 | 7.6.2. The leaf's type Statement . . . . . . . . . . . . . . 60 | |||
7.6.4. The leaf's mandatory Statement . . . . . . . . . . . 59 | 7.6.3. The leaf's default Statement . . . . . . . . . . . . 60 | |||
7.6.5. XML Mapping Rules . . . . . . . . . . . . . . . . . . 60 | 7.6.4. The leaf's mandatory Statement . . . . . . . . . . . 60 | |||
7.6.6. NETCONF <edit-config> Operations . . . . . . . . . . 60 | 7.6.5. XML Mapping Rules . . . . . . . . . . . . . . . . . . 61 | |||
7.6.7. Usage Example . . . . . . . . . . . . . . . . . . . . 61 | 7.6.6. NETCONF <edit-config> Operations . . . . . . . . . . 61 | |||
7.7. The leaf-list Statement . . . . . . . . . . . . . . . . . 61 | 7.6.7. Usage Example . . . . . . . . . . . . . . . . . . . . 62 | |||
7.7.1. Ordering . . . . . . . . . . . . . . . . . . . . . . 62 | 7.7. The leaf-list Statement . . . . . . . . . . . . . . . . . 62 | |||
7.7.2. The leaf-list's Substatements . . . . . . . . . . . . 63 | 7.7.1. Ordering . . . . . . . . . . . . . . . . . . . . . . 63 | |||
7.7.3. The min-elements Statement . . . . . . . . . . . . . 63 | 7.7.2. The leaf-list's Substatements . . . . . . . . . . . . 64 | |||
7.7.4. The max-elements Statement . . . . . . . . . . . . . 63 | 7.7.3. The min-elements Statement . . . . . . . . . . . . . 64 | |||
7.7.5. The ordered-by Statement . . . . . . . . . . . . . . 64 | 7.7.4. The max-elements Statement . . . . . . . . . . . . . 64 | |||
7.7.6. XML Mapping Rules . . . . . . . . . . . . . . . . . . 64 | 7.7.5. The ordered-by Statement . . . . . . . . . . . . . . 65 | |||
7.7.7. NETCONF <edit-config> operations . . . . . . . . . . 64 | 7.7.6. XML Mapping Rules . . . . . . . . . . . . . . . . . . 65 | |||
7.7.8. Usage Example . . . . . . . . . . . . . . . . . . . . 65 | 7.7.7. NETCONF <edit-config> operations . . . . . . . . . . 65 | |||
7.8. The list Statement . . . . . . . . . . . . . . . . . . . 67 | 7.7.8. Usage Example . . . . . . . . . . . . . . . . . . . . 66 | |||
7.8.1. The list's Substatements . . . . . . . . . . . . . . 68 | 7.8. The list Statement . . . . . . . . . . . . . . . . . . . 68 | |||
7.8.2. The list's key Statement . . . . . . . . . . . . . . 68 | 7.8.1. The list's Substatements . . . . . . . . . . . . . . 69 | |||
7.8.3. The list's unique Statement . . . . . . . . . . . . . 69 | 7.8.2. The list's key Statement . . . . . . . . . . . . . . 69 | |||
7.8.4. The list's Child Node Statements . . . . . . . . . . 70 | 7.8.3. The list's unique Statement . . . . . . . . . . . . . 70 | |||
7.8.5. XML Mapping Rules . . . . . . . . . . . . . . . . . . 70 | 7.8.4. The list's Child Node Statements . . . . . . . . . . 71 | |||
7.8.6. NETCONF <edit-config> operations . . . . . . . . . . 71 | 7.8.5. XML Mapping Rules . . . . . . . . . . . . . . . . . . 71 | |||
7.8.7. Usage Example . . . . . . . . . . . . . . . . . . . . 71 | 7.8.6. NETCONF <edit-config> operations . . . . . . . . . . 72 | |||
7.9. The choice Statement . . . . . . . . . . . . . . . . . . 75 | 7.8.7. Usage Example . . . . . . . . . . . . . . . . . . . . 72 | |||
7.9.1. The choice's Substatements . . . . . . . . . . . . . 75 | 7.9. The choice Statement . . . . . . . . . . . . . . . . . . 76 | |||
7.9.2. The choice's case Statement . . . . . . . . . . . . . 75 | 7.9.1. The choice's Substatements . . . . . . . . . . . . . 76 | |||
7.9.3. The choice's default Statement . . . . . . . . . . . 77 | 7.9.2. The choice's case Statement . . . . . . . . . . . . . 76 | |||
7.9.4. The choice's mandatory Statement . . . . . . . . . . 78 | 7.9.3. The choice's default Statement . . . . . . . . . . . 78 | |||
7.9.5. XML Mapping Rules . . . . . . . . . . . . . . . . . . 79 | 7.9.4. The choice's mandatory Statement . . . . . . . . . . 79 | |||
7.9.6. NETCONF <edit-config> operations . . . . . . . . . . 79 | 7.9.5. XML Mapping Rules . . . . . . . . . . . . . . . . . . 80 | |||
7.9.7. Usage Example . . . . . . . . . . . . . . . . . . . . 79 | 7.9.6. NETCONF <edit-config> operations . . . . . . . . . . 80 | |||
7.10. The anyxml Statement . . . . . . . . . . . . . . . . . . 80 | 7.9.7. Usage Example . . . . . . . . . . . . . . . . . . . . 80 | |||
7.10.1. The anyxml's Substatements . . . . . . . . . . . . . 81 | 7.10. The anyxml Statement . . . . . . . . . . . . . . . . . . 81 | |||
7.10.2. XML Mapping Rules . . . . . . . . . . . . . . . . . . 81 | 7.10.1. The anyxml's Substatements . . . . . . . . . . . . . 82 | |||
7.10.3. NETCONF <edit-config> operations . . . . . . . . . . 81 | 7.10.2. XML Mapping Rules . . . . . . . . . . . . . . . . . . 82 | |||
7.10.4. Usage Example . . . . . . . . . . . . . . . . . . . . 82 | 7.10.3. NETCONF <edit-config> operations . . . . . . . . . . 82 | |||
7.11. The grouping Statement . . . . . . . . . . . . . . . . . 82 | 7.10.4. Usage Example . . . . . . . . . . . . . . . . . . . . 83 | |||
7.11.1. The grouping's Substatements . . . . . . . . . . . . 83 | 7.11. The grouping Statement . . . . . . . . . . . . . . . . . 83 | |||
7.11.2. Usage Example . . . . . . . . . . . . . . . . . . . . 83 | 7.11.1. The grouping's Substatements . . . . . . . . . . . . 84 | |||
7.12. The uses Statement . . . . . . . . . . . . . . . . . . . 83 | 7.11.2. Usage Example . . . . . . . . . . . . . . . . . . . . 84 | |||
7.12.1. The uses's Substatements . . . . . . . . . . . . . . 84 | 7.12. The uses Statement . . . . . . . . . . . . . . . . . . . 84 | |||
7.12.2. The refine Statement . . . . . . . . . . . . . . . . 84 | 7.12.1. The uses's Substatements . . . . . . . . . . . . . . 85 | |||
7.12.3. XML Mapping Rules . . . . . . . . . . . . . . . . . . 85 | 7.12.2. The refine Statement . . . . . . . . . . . . . . . . 85 | |||
7.12.4. Usage Example . . . . . . . . . . . . . . . . . . . . 85 | 7.12.3. XML Mapping Rules . . . . . . . . . . . . . . . . . . 86 | |||
7.13. The rpc Statement . . . . . . . . . . . . . . . . . . . . 86 | 7.12.4. Usage Example . . . . . . . . . . . . . . . . . . . . 86 | |||
7.13.1. The rpc's Substatements . . . . . . . . . . . . . . . 87 | 7.13. The rpc Statement . . . . . . . . . . . . . . . . . . . . 87 | |||
7.13.2. The input Statement . . . . . . . . . . . . . . . . . 87 | 7.13.1. The rpc's Substatements . . . . . . . . . . . . . . . 88 | |||
7.13.3. The output Statement . . . . . . . . . . . . . . . . 88 | 7.13.2. The input Statement . . . . . . . . . . . . . . . . . 88 | |||
7.13.4. XML Mapping Rules . . . . . . . . . . . . . . . . . . 89 | 7.13.3. The output Statement . . . . . . . . . . . . . . . . 89 | |||
7.13.5. Usage Example . . . . . . . . . . . . . . . . . . . . 89 | 7.13.4. XML Mapping Rules . . . . . . . . . . . . . . . . . . 90 | |||
7.14. The notification Statement . . . . . . . . . . . . . . . 90 | 7.13.5. Usage Example . . . . . . . . . . . . . . . . . . . . 90 | |||
7.14.1. The notification's Substatements . . . . . . . . . . 91 | 7.14. The notification Statement . . . . . . . . . . . . . . . 91 | |||
7.14.2. XML Mapping Rules . . . . . . . . . . . . . . . . . . 91 | 7.14.1. The notification's Substatements . . . . . . . . . . 92 | |||
7.14.3. Usage Example . . . . . . . . . . . . . . . . . . . . 91 | 7.14.2. XML Mapping Rules . . . . . . . . . . . . . . . . . . 92 | |||
7.15. The augment Statement . . . . . . . . . . . . . . . . . . 92 | 7.14.3. Usage Example . . . . . . . . . . . . . . . . . . . . 92 | |||
7.15.1. The augment's Substatements . . . . . . . . . . . . . 93 | 7.15. The augment Statement . . . . . . . . . . . . . . . . . . 93 | |||
7.15.2. XML Mapping Rules . . . . . . . . . . . . . . . . . . 93 | 7.15.1. The augment's Substatements . . . . . . . . . . . . . 94 | |||
7.15.3. Usage Example . . . . . . . . . . . . . . . . . . . . 93 | 7.15.2. XML Mapping Rules . . . . . . . . . . . . . . . . . . 94 | |||
7.16. The identity Statement . . . . . . . . . . . . . . . . . 95 | 7.15.3. Usage Example . . . . . . . . . . . . . . . . . . . . 94 | |||
7.16.1. The identity's Substatements . . . . . . . . . . . . 96 | 7.16. The identity Statement . . . . . . . . . . . . . . . . . 96 | |||
7.16.2. The base Statement . . . . . . . . . . . . . . . . . 96 | 7.16.1. The identity's Substatements . . . . . . . . . . . . 97 | |||
7.16.3. Usage Example . . . . . . . . . . . . . . . . . . . . 97 | 7.16.2. The base Statement . . . . . . . . . . . . . . . . . 97 | |||
7.17. The extension Statement . . . . . . . . . . . . . . . . . 97 | 7.16.3. Usage Example . . . . . . . . . . . . . . . . . . . . 98 | |||
7.17.1. The extension's Substatements . . . . . . . . . . . . 98 | 7.17. The extension Statement . . . . . . . . . . . . . . . . . 98 | |||
7.17.2. The argument Statement . . . . . . . . . . . . . . . 98 | 7.17.1. The extension's Substatements . . . . . . . . . . . . 99 | |||
7.17.3. Usage Example . . . . . . . . . . . . . . . . . . . . 99 | 7.17.2. The argument Statement . . . . . . . . . . . . . . . 99 | |||
7.18. Conformance-related Statements . . . . . . . . . . . . . 99 | 7.17.3. Usage Example . . . . . . . . . . . . . . . . . . . . 100 | |||
7.18.1. The feature Statement . . . . . . . . . . . . . . . . 99 | 7.18. Conformance-related Statements . . . . . . . . . . . . . 100 | |||
7.18.2. The if-feature Statement . . . . . . . . . . . . . . 101 | 7.18.1. The feature Statement . . . . . . . . . . . . . . . . 100 | |||
7.18.3. The deviation Statement . . . . . . . . . . . . . . . 101 | 7.18.2. The if-feature Statement . . . . . . . . . . . . . . 102 | |||
7.19. Common Statements . . . . . . . . . . . . . . . . . . . . 104 | 7.18.3. The deviation Statement . . . . . . . . . . . . . . . 102 | |||
7.19.1. The config Statement . . . . . . . . . . . . . . . . 104 | 7.19. Common Statements . . . . . . . . . . . . . . . . . . . . 105 | |||
7.19.2. The status Statement . . . . . . . . . . . . . . . . 104 | 7.19.1. The config Statement . . . . . . . . . . . . . . . . 105 | |||
7.19.3. The description Statement . . . . . . . . . . . . . . 105 | 7.19.2. The status Statement . . . . . . . . . . . . . . . . 105 | |||
7.19.4. The reference Statement . . . . . . . . . . . . . . . 105 | 7.19.3. The description Statement . . . . . . . . . . . . . . 106 | |||
7.19.5. The when Statement . . . . . . . . . . . . . . . . . 105 | 7.19.4. The reference Statement . . . . . . . . . . . . . . . 106 | |||
8. Constraints . . . . . . . . . . . . . . . . . . . . . . . . . 107 | 7.19.5. The when Statement . . . . . . . . . . . . . . . . . 106 | |||
8.1. Constraints on Data . . . . . . . . . . . . . . . . . . . 107 | 8. Constraints . . . . . . . . . . . . . . . . . . . . . . . . . 108 | |||
8.2. Hierarchy of Constraints . . . . . . . . . . . . . . . . 107 | 8.1. Constraints on Data . . . . . . . . . . . . . . . . . . . 108 | |||
8.3. Constraint Enforcement Model . . . . . . . . . . . . . . 107 | 8.2. Hierarchy of Constraints . . . . . . . . . . . . . . . . 108 | |||
8.3.1. Payload Parsing . . . . . . . . . . . . . . . . . . . 108 | 8.3. Constraint Enforcement Model . . . . . . . . . . . . . . 108 | |||
8.3.2. NETCONF <edit-config> Processing . . . . . . . . . . 108 | 8.3.1. Payload Parsing . . . . . . . . . . . . . . . . . . . 109 | |||
8.3.3. Validation . . . . . . . . . . . . . . . . . . . . . 109 | 8.3.2. NETCONF <edit-config> Processing . . . . . . . . . . 109 | |||
9. Built-in Types . . . . . . . . . . . . . . . . . . . . . . . 110 | 8.3.3. Validation . . . . . . . . . . . . . . . . . . . . . 110 | |||
9.1. Canonical representation . . . . . . . . . . . . . . . . 110 | 9. Built-in Types . . . . . . . . . . . . . . . . . . . . . . . 111 | |||
9.2. The Integer Built-in Types . . . . . . . . . . . . . . . 110 | 9.1. Canonical representation . . . . . . . . . . . . . . . . 111 | |||
9.2.1. Lexicographic Representation . . . . . . . . . . . . 111 | 9.2. The Integer Built-in Types . . . . . . . . . . . . . . . 111 | |||
9.2.2. Canonical Form . . . . . . . . . . . . . . . . . . . 112 | 9.2.1. Lexicographic Representation . . . . . . . . . . . . 112 | |||
9.2.3. Restrictions . . . . . . . . . . . . . . . . . . . . 112 | 9.2.2. Canonical Form . . . . . . . . . . . . . . . . . . . 113 | |||
9.2.4. The range Statement . . . . . . . . . . . . . . . . . 112 | 9.2.3. Restrictions . . . . . . . . . . . . . . . . . . . . 113 | |||
9.2.5. Usage Example . . . . . . . . . . . . . . . . . . . . 113 | 9.2.4. The range Statement . . . . . . . . . . . . . . . . . 113 | |||
9.3. The decimal64 Built-in Type . . . . . . . . . . . . . . . 113 | 9.2.5. Usage Example . . . . . . . . . . . . . . . . . . . . 114 | |||
9.3.1. Lexicographic Representation . . . . . . . . . . . . 113 | 9.3. The decimal64 Built-in Type . . . . . . . . . . . . . . . 114 | |||
9.3.2. Canonical Form . . . . . . . . . . . . . . . . . . . 113 | 9.3.1. Lexicographic Representation . . . . . . . . . . . . 114 | |||
9.3.3. Restrictions . . . . . . . . . . . . . . . . . . . . 113 | 9.3.2. Canonical Form . . . . . . . . . . . . . . . . . . . 114 | |||
9.3.4. The fraction-digits Statement . . . . . . . . . . . . 114 | 9.3.3. Restrictions . . . . . . . . . . . . . . . . . . . . 114 | |||
9.3.5. Usage Example . . . . . . . . . . . . . . . . . . . . 114 | 9.3.4. The fraction-digits Statement . . . . . . . . . . . . 115 | |||
9.4. The string Built-in Type . . . . . . . . . . . . . . . . 114 | 9.3.5. Usage Example . . . . . . . . . . . . . . . . . . . . 115 | |||
9.4.1. Lexicographic Representation . . . . . . . . . . . . 115 | 9.4. The string Built-in Type . . . . . . . . . . . . . . . . 115 | |||
9.4.2. Canonical Form . . . . . . . . . . . . . . . . . . . 115 | 9.4.1. Lexicographic Representation . . . . . . . . . . . . 116 | |||
9.4.3. Restrictions . . . . . . . . . . . . . . . . . . . . 115 | 9.4.2. Canonical Form . . . . . . . . . . . . . . . . . . . 116 | |||
9.4.4. The length Statement . . . . . . . . . . . . . . . . 115 | 9.4.3. Restrictions . . . . . . . . . . . . . . . . . . . . 116 | |||
9.4.5. Usage Example . . . . . . . . . . . . . . . . . . . . 116 | 9.4.4. The length Statement . . . . . . . . . . . . . . . . 116 | |||
9.4.6. The pattern Statement . . . . . . . . . . . . . . . . 116 | 9.4.5. Usage Example . . . . . . . . . . . . . . . . . . . . 117 | |||
9.4.7. Usage Example . . . . . . . . . . . . . . . . . . . . 117 | 9.4.6. The pattern Statement . . . . . . . . . . . . . . . . 117 | |||
9.5. The boolean Built-in Type . . . . . . . . . . . . . . . . 117 | 9.4.7. Usage Example . . . . . . . . . . . . . . . . . . . . 118 | |||
9.5.1. Lexicographic Representation . . . . . . . . . . . . 117 | 9.5. The boolean Built-in Type . . . . . . . . . . . . . . . . 118 | |||
9.5.2. Canonical Form . . . . . . . . . . . . . . . . . . . 117 | 9.5.1. Lexicographic Representation . . . . . . . . . . . . 118 | |||
9.5.3. Restrictions . . . . . . . . . . . . . . . . . . . . 117 | 9.5.2. Canonical Form . . . . . . . . . . . . . . . . . . . 118 | |||
9.6. The enumeration Built-in Type . . . . . . . . . . . . . . 118 | 9.5.3. Restrictions . . . . . . . . . . . . . . . . . . . . 118 | |||
9.6.1. Lexicographic Representation . . . . . . . . . . . . 118 | 9.6. The enumeration Built-in Type . . . . . . . . . . . . . . 119 | |||
9.6.2. Canonical Form . . . . . . . . . . . . . . . . . . . 118 | 9.6.1. Lexicographic Representation . . . . . . . . . . . . 119 | |||
9.6.3. Restrictions . . . . . . . . . . . . . . . . . . . . 118 | 9.6.2. Canonical Form . . . . . . . . . . . . . . . . . . . 119 | |||
9.6.4. The enum Statement . . . . . . . . . . . . . . . . . 118 | 9.6.3. Restrictions . . . . . . . . . . . . . . . . . . . . 119 | |||
9.6.5. Usage Example . . . . . . . . . . . . . . . . . . . . 119 | 9.6.4. The enum Statement . . . . . . . . . . . . . . . . . 119 | |||
9.7. The bits Built-in Type . . . . . . . . . . . . . . . . . 119 | 9.6.5. Usage Example . . . . . . . . . . . . . . . . . . . . 120 | |||
9.7.1. Restrictions . . . . . . . . . . . . . . . . . . . . 119 | 9.7. The bits Built-in Type . . . . . . . . . . . . . . . . . 120 | |||
9.7.2. Lexicographic Representation . . . . . . . . . . . . 120 | 9.7.1. Restrictions . . . . . . . . . . . . . . . . . . . . 120 | |||
9.7.3. Canonical Form . . . . . . . . . . . . . . . . . . . 120 | 9.7.2. Lexicographic Representation . . . . . . . . . . . . 121 | |||
9.7.4. The bit Statement . . . . . . . . . . . . . . . . . . 120 | 9.7.3. Canonical Form . . . . . . . . . . . . . . . . . . . 121 | |||
9.7.5. Usage Example . . . . . . . . . . . . . . . . . . . . 121 | 9.7.4. The bit Statement . . . . . . . . . . . . . . . . . . 121 | |||
9.8. The binary Built-in Type . . . . . . . . . . . . . . . . 121 | 9.7.5. Usage Example . . . . . . . . . . . . . . . . . . . . 122 | |||
9.8.1. Restrictions . . . . . . . . . . . . . . . . . . . . 121 | 9.8. The binary Built-in Type . . . . . . . . . . . . . . . . 122 | |||
9.8.2. Lexicographic Representation . . . . . . . . . . . . 121 | 9.8.1. Restrictions . . . . . . . . . . . . . . . . . . . . 122 | |||
9.8.3. Canonical Form . . . . . . . . . . . . . . . . . . . 121 | 9.8.2. Lexicographic Representation . . . . . . . . . . . . 122 | |||
9.9. The leafref Built-in Type . . . . . . . . . . . . . . . . 122 | 9.8.3. Canonical Form . . . . . . . . . . . . . . . . . . . 122 | |||
9.9.1. Restrictions . . . . . . . . . . . . . . . . . . . . 122 | 9.9. The leafref Built-in Type . . . . . . . . . . . . . . . . 123 | |||
9.9.2. The path Statement . . . . . . . . . . . . . . . . . 122 | 9.9.1. Restrictions . . . . . . . . . . . . . . . . . . . . 123 | |||
9.9.3. Lexicographic Representation . . . . . . . . . . . . 123 | 9.9.2. The path Statement . . . . . . . . . . . . . . . . . 123 | |||
9.9.4. Canonical Form . . . . . . . . . . . . . . . . . . . 123 | 9.9.3. Lexicographic Representation . . . . . . . . . . . . 124 | |||
9.9.5. Usage Example . . . . . . . . . . . . . . . . . . . . 123 | 9.9.4. Canonical Form . . . . . . . . . . . . . . . . . . . 124 | |||
9.10. The identityref Built-in Type . . . . . . . . . . . . . . 126 | 9.9.5. Usage Example . . . . . . . . . . . . . . . . . . . . 124 | |||
9.10.1. Restrictions . . . . . . . . . . . . . . . . . . . . 126 | 9.10. The identityref Built-in Type . . . . . . . . . . . . . . 128 | |||
9.10.2. The identityref's base Statement . . . . . . . . . . 126 | 9.10.1. Restrictions . . . . . . . . . . . . . . . . . . . . 128 | |||
9.10.3. Lexicographic Representation . . . . . . . . . . . . 127 | 9.10.2. The identityref's base Statement . . . . . . . . . . 128 | |||
9.10.4. Canonical Form . . . . . . . . . . . . . . . . . . . 127 | 9.10.3. Lexicographic Representation . . . . . . . . . . . . 128 | |||
9.10.5. Usage Example . . . . . . . . . . . . . . . . . . . . 127 | 9.10.4. Canonical Form . . . . . . . . . . . . . . . . . . . 128 | |||
9.11. The empty Built-in Type . . . . . . . . . . . . . . . . . 128 | 9.10.5. Usage Example . . . . . . . . . . . . . . . . . . . . 128 | |||
9.11.1. Restrictions . . . . . . . . . . . . . . . . . . . . 128 | 9.11. The empty Built-in Type . . . . . . . . . . . . . . . . . 129 | |||
9.11.2. Lexicographic Representation . . . . . . . . . . . . 128 | 9.11.1. Restrictions . . . . . . . . . . . . . . . . . . . . 130 | |||
9.11.3. Canonical Form . . . . . . . . . . . . . . . . . . . 128 | 9.11.2. Lexicographic Representation . . . . . . . . . . . . 130 | |||
9.11.4. Usage Example . . . . . . . . . . . . . . . . . . . . 128 | 9.11.3. Canonical Form . . . . . . . . . . . . . . . . . . . 130 | |||
9.12. The union Built-in Type . . . . . . . . . . . . . . . . . 128 | 9.11.4. Usage Example . . . . . . . . . . . . . . . . . . . . 130 | |||
9.12.1. Restrictions . . . . . . . . . . . . . . . . . . . . 129 | 9.12. The union Built-in Type . . . . . . . . . . . . . . . . . 130 | |||
9.12.2. Lexicographic Representation . . . . . . . . . . . . 129 | 9.12.1. Restrictions . . . . . . . . . . . . . . . . . . . . 131 | |||
9.12.3. Canonical Form . . . . . . . . . . . . . . . . . . . 129 | 9.12.2. Lexicographic Representation . . . . . . . . . . . . 131 | |||
9.13. The instance-identifier Built-in Type . . . . . . . . . . 129 | 9.12.3. Canonical Form . . . . . . . . . . . . . . . . . . . 131 | |||
9.13.1. Restrictions . . . . . . . . . . . . . . . . . . . . 130 | 9.13. The instance-identifier Built-in Type . . . . . . . . . . 131 | |||
9.13.2. The require-instance Statement . . . . . . . . . . . 130 | 9.13.1. Restrictions . . . . . . . . . . . . . . . . . . . . 132 | |||
9.13.3. Lexicographic Representation . . . . . . . . . . . . 131 | 9.13.2. The require-instance Statement . . . . . . . . . . . 132 | |||
9.13.4. Canonical Form . . . . . . . . . . . . . . . . . . . 131 | 9.13.3. Lexicographic Representation . . . . . . . . . . . . 132 | |||
9.13.5. Usage Example . . . . . . . . . . . . . . . . . . . . 131 | 9.13.4. Canonical Form . . . . . . . . . . . . . . . . . . . 133 | |||
10. Updating a Module . . . . . . . . . . . . . . . . . . . . . . 132 | 9.13.5. Usage Example . . . . . . . . . . . . . . . . . . . . 133 | |||
11. YIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 | 10. Updating a Module . . . . . . . . . . . . . . . . . . . . . . 134 | |||
11.1. Formal YIN Definition . . . . . . . . . . . . . . . . . . 135 | 11. YIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 | |||
11.1.1. Usage Example . . . . . . . . . . . . . . . . . . . . 137 | 11.1. Formal YIN Definition . . . . . . . . . . . . . . . . . . 137 | |||
12. YANG ABNF Grammar . . . . . . . . . . . . . . . . . . . . . . 139 | 11.1.1. Usage Example . . . . . . . . . . . . . . . . . . . . 139 | |||
13. Error Responses for YANG Related Errors . . . . . . . . . . . 160 | 12. YANG ABNF Grammar . . . . . . . . . . . . . . . . . . . . . . 141 | |||
13.1. Error Message for Data that Violates a unique Statement . 160 | 13. Error Responses for YANG Related Errors . . . . . . . . . . . 162 | |||
13.1. Error Message for Data that Violates a unique Statement . 162 | ||||
13.2. Error Message for Data that Violates a max-elements | 13.2. Error Message for Data that Violates a max-elements | |||
Statement . . . . . . . . . . . . . . . . . . . . . . . . 160 | Statement . . . . . . . . . . . . . . . . . . . . . . . . 162 | |||
13.3. Error Message for Data that Violates a min-elements | 13.3. Error Message for Data that Violates a min-elements | |||
Statement . . . . . . . . . . . . . . . . . . . . . . . . 160 | Statement . . . . . . . . . . . . . . . . . . . . . . . . 162 | |||
13.4. Error Message for Data that Violates a must Statement . . 161 | 13.4. Error Message for Data that Violates a must Statement . . 163 | |||
13.5. Error Message for Data that Violates a | 13.5. Error Message for Data that Violates a | |||
require-instance Statement . . . . . . . . . . . . . . . 161 | require-instance Statement . . . . . . . . . . . . . . . 163 | |||
13.6. Error Message for Data that does not Match a leafref | 13.6. Error Message for Data that does not Match a leafref | |||
Type . . . . . . . . . . . . . . . . . . . . . . . . . . 161 | Type . . . . . . . . . . . . . . . . . . . . . . . . . . 163 | |||
13.7. Error Message for Data that Violates a mandatory | 13.7. Error Message for Data that Violates a mandatory | |||
choice Statement . . . . . . . . . . . . . . . . . . . . 161 | choice Statement . . . . . . . . . . . . . . . . . . . . 163 | |||
13.8. Error Message for the "insert" Operation . . . . . . . . 162 | 13.8. Error Message for the "insert" Operation . . . . . . . . 164 | |||
14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 163 | 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 165 | |||
15. Security Considerations . . . . . . . . . . . . . . . . . . . 164 | 15. Security Considerations . . . . . . . . . . . . . . . . . . . 166 | |||
16. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 165 | 16. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 167 | |||
17. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 166 | 17. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 168 | |||
18. References . . . . . . . . . . . . . . . . . . . . . . . . . 167 | 18. References . . . . . . . . . . . . . . . . . . . . . . . . . 169 | |||
18.1. Normative References . . . . . . . . . . . . . . . . . . 167 | 18.1. Normative References . . . . . . . . . . . . . . . . . . 169 | |||
18.2. Non-Normative References . . . . . . . . . . . . . . . . 168 | 18.2. Non-Normative References . . . . . . . . . . . . . . . . 170 | |||
Appendix A. ChangeLog . . . . . . . . . . . . . . . . . . . . . 169 | Appendix A. ChangeLog . . . . . . . . . . . . . . . . . . . . . 171 | |||
A.1. Version -06 . . . . . . . . . . . . . . . . . . . . . . . 169 | A.1. Version -07 . . . . . . . . . . . . . . . . . . . . . . . 171 | |||
A.2. Version -05 . . . . . . . . . . . . . . . . . . . . . . . 169 | A.2. Version -06 . . . . . . . . . . . . . . . . . . . . . . . 171 | |||
A.3. Version -04 . . . . . . . . . . . . . . . . . . . . . . . 169 | A.3. Version -05 . . . . . . . . . . . . . . . . . . . . . . . 171 | |||
A.4. Version -03 . . . . . . . . . . . . . . . . . . . . . . . 170 | A.4. Version -04 . . . . . . . . . . . . . . . . . . . . . . . 171 | |||
A.5. Version -02 . . . . . . . . . . . . . . . . . . . . . . . 170 | A.5. Version -03 . . . . . . . . . . . . . . . . . . . . . . . 172 | |||
A.6. Version -01 . . . . . . . . . . . . . . . . . . . . . . . 171 | A.6. Version -02 . . . . . . . . . . . . . . . . . . . . . . . 172 | |||
A.7. Version -00 . . . . . . . . . . . . . . . . . . . . . . . 172 | A.7. Version -01 . . . . . . . . . . . . . . . . . . . . . . . 173 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 173 | A.8. Version -00 . . . . . . . . . . . . . . . . . . . . . . . 174 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 175 | ||||
1. Introduction | 1. Introduction | |||
YANG is a data modeling language used to model configuration and | YANG is a data modeling language used to model configuration and | |||
state data manipulated by the Network Configuration Protocol | state data manipulated by the Network Configuration Protocol | |||
(NETCONF) protocol, NETCONF remote procedure calls, and NETCONF | (NETCONF) protocol, NETCONF remote procedure calls, and NETCONF | |||
notifications. YANG is used to model the operations and content | notifications. YANG is used to model the operations and content | |||
layers of NETCONF (see the NETCONF Configuration Protocol [RFC4741], | layers of NETCONF (see the NETCONF Configuration Protocol [RFC4741], | |||
section 1.1). | section 1.1). | |||
skipping to change at page 40, line 5 | skipping to change at page 39, line 41 | |||
o The function library is the core function library defined in | o The function library is the core function library defined in | |||
[XPATH], and a function "current()" which returns a node set with | [XPATH], and a function "current()" which returns a node set with | |||
the initial context node. | the initial context node. | |||
o The set of variable bindings is empty. | o The set of variable bindings is empty. | |||
The context node varies with the YANG XPath expression, and is | The context node varies with the YANG XPath expression, and is | |||
specified where the YANG statement with the XPath expression is | specified where the YANG statement with the XPath expression is | |||
defined. | defined. | |||
6.5. Schema Node Identifier | ||||
A schema node identifier is a string that identifies a node in the | ||||
schema tree. It has two forms, "absolute" and "descendant", defined | ||||
by the rules "absolute-schema-nodeid" and "descendant-schema-nodeid" | ||||
in Section 12, respectively. A schema node identifier consists of a | ||||
path of identifiers, separated by slashes ("/"). In an absolute | ||||
schema node identifier, the first identifier after the leading slash | ||||
is any top-level schema node in local module or all imported modules. | ||||
References to identifiers defined in external modules MUST be | ||||
qualified with appropriate prefixes, and references to identifiers | ||||
defined in the current module and its submodules MAY use a prefix. | ||||
For example, to identify the child node "b" of top-level node "a", | ||||
the string "/a/b" can be used. | ||||
7. YANG Statements | 7. YANG Statements | |||
The following sections describe all of the YANG core statements. | The following sections describe all of the YANG core statements. | |||
Note that even a statement which does not have any substatements | Note that even a statement which does not have any substatements | |||
defined in core YANG can have vendor-specific extensions as | defined in core YANG can have vendor-specific extensions as | |||
substatements. For example, the "description" statement does not | substatements. For example, the "description" statement does not | |||
have any substatements defined in core YANG, but the following is | have any substatements defined in core YANG, but the following is | |||
legal: | legal: | |||
skipping to change at page 84, line 30 | skipping to change at page 85, line 30 | |||
7.12.2. The refine Statement | 7.12.2. The refine Statement | |||
Some of the properties of each node in the grouping can be refined | Some of the properties of each node in the grouping can be refined | |||
with the "refine" statement. The argument is a a string which | with the "refine" statement. The argument is a a string which | |||
identifies a node in the grouping. This node is called the refine's | identifies a node in the grouping. This node is called the refine's | |||
target node. If a node in the grouping is not present as target node | target node. If a node in the grouping is not present as target node | |||
of a refine statement, it is not refined, and thus used exactly as it | of a refine statement, it is not refined, and thus used exactly as it | |||
was defined in the grouping. | was defined in the grouping. | |||
The argument string is a schema node identifier. The syntax is | The argument string is a descendant schema node identifier (see | |||
formally defined by the rule "descendant-schema-nodeid" in | Section 6.5). | |||
Section 12. | ||||
The following refinements can be done: | The following refinements can be done: | |||
o A leaf or choice node may get a default value, or a new default | o A leaf or choice node may get a default value, or a new default | |||
value if it already had one. | value if it already had one. | |||
o Any node may get a specialized "description" string. | o Any node may get a specialized "description" string. | |||
o Any node may get a specialized "reference" string. | o Any node may get a specialized "reference" string. | |||
skipping to change at page 92, line 28 | skipping to change at page 93, line 28 | |||
The "augment" statement allows a module or submodule to add to the | The "augment" statement allows a module or submodule to add to the | |||
schema tree defined in an external module, or the current module and | schema tree defined in an external module, or the current module and | |||
its submodules, and to add to the nodes from a grouping in a "uses" | its submodules, and to add to the nodes from a grouping in a "uses" | |||
statement. The argument is a string which identifies a node in the | statement. The argument is a string which identifies a node in the | |||
schema tree. This node is called the augment's target node. The | schema tree. This node is called the augment's target node. The | |||
target node MUST be either a container, list, choice, case, input, | target node MUST be either a container, list, choice, case, input, | |||
output, or notification node. It is augmented with the nodes defined | output, or notification node. It is augmented with the nodes defined | |||
in the substatements that follow the "augment" statement. | in the substatements that follow the "augment" statement. | |||
The argument string is a schema node identifier. The syntax is a | The argument string is a schema node identifier (see Section 6.5). | |||
subset of the XPath abbreviated syntax, formally defined by the rule | If the "augment" statement is on the top-level in a module or | |||
"augment-arg" in Section 12. If the "augment" statement is on the | submodule, the absolute form (defined by the rule | |||
top-level in a module or submodule, the absolute form (defined by the | "absolute-schema-nodeid" in Section 12) of a schema node identifier | |||
rule "absolute-schema-nodeid" in Section 12) of a schema node | MUST be used. If the "augment" statement is a substatement to the | |||
identifier MUST be used. If the "augment" statement is in a "uses" | "uses" statement, the descendant form (defined by the rule | |||
statement, the descendant form (defined by the rule | ||||
"descendant-schema-nodeid" in Section 12) MUST be used. | "descendant-schema-nodeid" in Section 12) MUST be used. | |||
If the target node is a container, list, case, input, output, or | If the target node is a container, list, case, input, output, or | |||
notification node, the "container", "leaf", "list", "leaf-list", | notification node, the "container", "leaf", "list", "leaf-list", | |||
"uses", and "choice" statements can be used within the "augment" | "uses", and "choice" statements can be used within the "augment" | |||
statement. | statement. | |||
If the target node is a choice node, the "case" statement, or a case | If the target node is a choice node, the "case" statement, or a case | |||
shorthand statement (see Section 7.9.2) can be used within the | shorthand statement (see Section 7.9.2) can be used within the | |||
"augment" statement. | "augment" statement. | |||
If the target node is in another module, then nodes added by the | If the target node is in another module, then nodes added by the | |||
augmentation MUST NOT be mandatory nodes (see Section 3.1). | augmentation MUST NOT be mandatory nodes (see Section 3.1). | |||
The augment statement MUST NOT add multiple nodes with the same name | The augment statement MUST NOT add multiple nodes with the same name | |||
from the same module to the target node. | from the same module to the target node. | |||
The "augment" XPath expression is conceptually evaluated in the | ||||
following context, in addition to the definition in Section 6.4.1: | ||||
o The context node is the target node in the schema tree. | ||||
o The accessible tree is made up of all nodes in the schema tree. | ||||
The XPath root node has all top-level schema nodes in all modules | ||||
as children. | ||||
7.15.1. The augment's Substatements | 7.15.1. The augment's Substatements | |||
+--------------+---------+-------------+ | +--------------+---------+-------------+ | |||
| substatement | section | cardinality | | | substatement | section | cardinality | | |||
+--------------+---------+-------------+ | +--------------+---------+-------------+ | |||
| anyxml | 7.10 | 0..n | | | anyxml | 7.10 | 0..n | | |||
| case | 7.9.2 | 0..n | | | case | 7.9.2 | 0..n | | |||
| choice | 7.9 | 0..n | | | choice | 7.9 | 0..n | | |||
| container | 7.5 | 0..n | | | container | 7.5 | 0..n | | |||
| description | 7.19.3 | 0..1 | | | description | 7.19.3 | 0..1 | | |||
skipping to change at page 101, line 40 | skipping to change at page 102, line 40 | |||
definition of the feature. | definition of the feature. | |||
7.18.3. The deviation Statement | 7.18.3. The deviation Statement | |||
The deviation statement defines a hierarchy of the module which the | The deviation statement defines a hierarchy of the module which the | |||
device does not implement faithfully. The argument is a string that | device does not implement faithfully. The argument is a string that | |||
identifies the node in the schema tree where a deviation from the | identifies the node in the schema tree where a deviation from the | |||
module occurs. This node is called the deviation's target node. The | module occurs. This node is called the deviation's target node. The | |||
contents of the deviation statement give details about the deviation. | contents of the deviation statement give details about the deviation. | |||
The argument's syntax is formally defined by the rule "deviation-arg" | The argument string is an absolute schema node identifier (see | |||
in Section 12. | Section 6.5). | |||
Deviations define the way a device or class of devices deviate from | Deviations define the way a device or class of devices deviate from | |||
the standard. This means that deviations MUST never be part of a | the standard. This means that deviations MUST never be part of a | |||
published standard, since they are the mechanism for learning how | published standard, since they are the mechanism for learning how | |||
implementations vary from the standards. | implementations vary from the standards. | |||
Device deviations are strongly discouraged and SHOULD only be used as | Device deviations are strongly discouraged and SHOULD only be used as | |||
a last resort. Telling the application how a device fails to follow | a last resort. Telling the application how a device fails to follow | |||
the standard is no substitute for implementing the standard | the standard is no substitute for implementing the standard | |||
correctly. | correctly. | |||
skipping to change at page 120, line 14 | skipping to change at page 121, line 14 | |||
9.7.2. Lexicographic Representation | 9.7.2. Lexicographic Representation | |||
The lexicographical representation of the bits type is a space | The lexicographical representation of the bits type is a space | |||
separated list of the individual bit values that are set. An empty | separated list of the individual bit values that are set. An empty | |||
string thus represents a value where no bits are set. | string thus represents a value where no bits are set. | |||
9.7.3. Canonical Form | 9.7.3. Canonical Form | |||
In the canonical form, the bit values are separated by a single space | In the canonical form, the bit values are separated by a single space | |||
character and they appear in the same order as they are specified in | character and they appear ordered by their position (see | |||
the "bits" statement. | Section 9.7.4.2). | |||
9.7.4. The bit Statement | 9.7.4. The bit Statement | |||
The "bit" statement, which is a substatement to the "type" statement, | The "bit" statement, which is a substatement to the "type" statement, | |||
MUST be present if the type is "bits". It is repeatedly used to | MUST be present if the type is "bits". It is repeatedly used to | |||
specify each assigned named bit of a bits type. It takes as an | specify each assigned named bit of a bits type. It takes as an | |||
argument a string which is the assigned name of the bit. It is | argument a string which is the assigned name of the bit. It is | |||
followed by a block of substatements which holds detailed bit | followed by a block of substatements which holds detailed bit | |||
information. A bit name follows the same syntax rules as an | information. A bit name follows the same syntax rules as an | |||
identifier (see Section 6.2). | identifier (see Section 6.2). | |||
skipping to change at page 122, line 18 | skipping to change at page 123, line 18 | |||
the data tree. The "path" substatement (Section 9.9.2) selects a set | the data tree. The "path" substatement (Section 9.9.2) selects a set | |||
of leaf instances, and the leafref value space is the set of values | of leaf instances, and the leafref value space is the set of values | |||
of these leaf instances. | of these leaf instances. | |||
If the leaf with the leafref type represents configuration data, the | If the leaf with the leafref type represents configuration data, the | |||
leaf it refers to MUST also represent configuration. Such a leaf | leaf it refers to MUST also represent configuration. Such a leaf | |||
puts a constraint on valid data. All leafref nodes MUST reference | puts a constraint on valid data. All leafref nodes MUST reference | |||
existing leaf instances for the data to be valid. This constraint is | existing leaf instances for the data to be valid. This constraint is | |||
enforced according to the rules in Section 8. | enforced according to the rules in Section 8. | |||
There MUST NOT be any circular chains of leafrefs. | ||||
9.9.1. Restrictions | 9.9.1. Restrictions | |||
A leafref cannot be restricted. | A leafref cannot be restricted. | |||
9.9.2. The path Statement | 9.9.2. The path Statement | |||
The "path" statement, which is a substatement to the "type" | The "path" statement, which is a substatement to the "type" | |||
statement, MUST be present if the type is "leafref". It takes as an | statement, MUST be present if the type is "leafref". It takes as an | |||
argument a string which MUST refer to a leaf or leaf-list node. | argument a string which MUST refer to a leaf or leaf-list node. | |||
skipping to change at page 152, line 19 | skipping to change at page 154, line 19 | |||
[status-stmt stmtsep] | [status-stmt stmtsep] | |||
[description-stmt stmtsep] | [description-stmt stmtsep] | |||
[reference-stmt stmtsep] | [reference-stmt stmtsep] | |||
1*((data-def-stmt stmtsep) / | 1*((data-def-stmt stmtsep) / | |||
(case-stmt stmtsep)) | (case-stmt stmtsep)) | |||
"}" | "}" | |||
augment-arg-str = < a string which matches the rule | augment-arg-str = < a string which matches the rule | |||
augment-arg > | augment-arg > | |||
augment-arg = schema-nodeid | augment-arg = absolute-schema-nodeid | |||
unknown-statement = prefix ":" identifier [sep string] optsep | unknown-statement = prefix ":" identifier [sep string] optsep | |||
(";" / "{" *unknown-statement "}") | (";" / "{" *unknown-statement "}") | |||
when-stmt = when-keyword sep string stmtend | when-stmt = when-keyword sep string stmtend | |||
rpc-stmt = rpc-keyword sep identifier-arg-str optsep | rpc-stmt = rpc-keyword sep identifier-arg-str optsep | |||
(";" / | (";" / | |||
"{" stmtsep | "{" stmtsep | |||
;; these stmts can appear in any order | ;; these stmts can appear in any order | |||
skipping to change at page 169, line 9 | skipping to change at page 171, line 9 | |||
[XSLT] Clark, J., "XSL Transformations (XSLT) Version 1.0", World | [XSLT] Clark, J., "XSL Transformations (XSLT) Version 1.0", World | |||
Wide Web Consortium Recommendation REC-xslt-19991116, | Wide Web Consortium Recommendation REC-xslt-19991116, | |||
November 1999, | November 1999, | |||
<http://www.w3.org/TR/1999/REC-xslt-19991116>. | <http://www.w3.org/TR/1999/REC-xslt-19991116>. | |||
Appendix A. ChangeLog | Appendix A. ChangeLog | |||
RFC Editor: remove this section upon publication as an RFC. | RFC Editor: remove this section upon publication as an RFC. | |||
A.1. Version -06 | A.1. Version -07 | |||
o The argument string of "augment", "refine", and "deviation" is | ||||
described not as an XPath but as a "schema node identifier". | ||||
o Clarified that there must be no circular references in a leafref. | ||||
A.2. Version -06 | ||||
o Various bug fixes, clarifications and editorial fixes after WGLC. | o Various bug fixes, clarifications and editorial fixes after WGLC. | |||
o Removed "require-instance" for leafref. | o Removed "require-instance" for leafref. | |||
o Allow leafrefs to refer to leaf-lists. | o Allow leafrefs to refer to leaf-lists. | |||
o Clarified the XPath context in Section 6.4.1, and for "must", | o Clarified the XPath context in Section 6.4.1, and for "must", | |||
"when", "augment", "path" and "instance-identifier". | "when", "augment", "path" and "instance-identifier". | |||
A.2. Version -05 | A.3. Version -05 | |||
o Replaced the data types "float32" and "float64" with "decimal64". | o Replaced the data types "float32" and "float64" with "decimal64". | |||
o Specified that the elements in the XML encoding of configuration | o Specified that the elements in the XML encoding of configuration | |||
data can occur in any order. | data can occur in any order. | |||
o Clarified that "augment" cannot add multiple nodes with the same | o Clarified that "augment" cannot add multiple nodes with the same | |||
name. | name. | |||
o Clarified what "when" means in RPC input / output. | o Clarified what "when" means in RPC input / output. | |||
o Wrote the IANA Considerations section. | o Wrote the IANA Considerations section. | |||
o Changed requirement for minimum identifier length to 64 | o Changed requirement for minimum identifier length to 64 | |||
characters. | characters. | |||
A.3. Version -04 | A.4. Version -04 | |||
o Using "revision-date" substatement to "import" and "include". | o Using "revision-date" substatement to "import" and "include". | |||
o Corrected grammar and text for instance-identifier. | o Corrected grammar and text for instance-identifier. | |||
o Fixed bugs in some examples. | o Fixed bugs in some examples. | |||
o Rewrote the YIN description to use a declarative style. | o Rewrote the YIN description to use a declarative style. | |||
o Added two error codes in Section 13. | o Added two error codes in Section 13. | |||
skipping to change at page 170, line 15 | skipping to change at page 172, line 23 | |||
o Corrected grammar for key-arg; now allowing optional prefix on | o Corrected grammar for key-arg; now allowing optional prefix on | |||
each leaf identifier. | each leaf identifier. | |||
o Clarified that "unique" constraints only check instances with | o Clarified that "unique" constraints only check instances with | |||
values for all referenced leafs. | values for all referenced leafs. | |||
o Clarified how mandatory and min-elements constraints are enforced. | o Clarified how mandatory and min-elements constraints are enforced. | |||
o Editorial fixes. | o Editorial fixes. | |||
A.4. Version -03 | A.5. Version -03 | |||
o Added import by revision (yang-00413) | o Added import by revision (yang-00413) | |||
o Changed type "keyref" to "leafref", and added the statement | o Changed type "keyref" to "leafref", and added the statement | |||
"require-instance" (yang-01253) | "require-instance" (yang-01253) | |||
o Clarified that data sent from the server must be in the canonical | o Clarified that data sent from the server must be in the canonical | |||
form. | form. | |||
o Clarified when and how constraints in the models are enforced. | o Clarified when and how constraints in the models are enforced. | |||
o Many editorial fixes | o Many editorial fixes | |||
o Added more strict grammar for the "deviate" statement. | o Added more strict grammar for the "deviate" statement. | |||
A.5. Version -02 | A.6. Version -02 | |||
o Added module update rules. (yang-00000) | o Added module update rules. (yang-00000) | |||
o Added "refine" statement as a substatement to "uses". (yang-00088) | o Added "refine" statement as a substatement to "uses". (yang-00088) | |||
o Allow "augment" on top-level and in "uses" only. (yang-00088) | o Allow "augment" on top-level and in "uses" only. (yang-00088) | |||
o Allow "when" on all data defintion statements. (yang-00088) | o Allow "when" on all data defintion statements. (yang-00088) | |||
o Added section "Constraints" and clarified when constraints are | o Added section "Constraints" and clarified when constraints are | |||
skipping to change at page 170, line 43 | skipping to change at page 173, line 4 | |||
o Added module update rules. (yang-00000) | o Added module update rules. (yang-00000) | |||
o Added "refine" statement as a substatement to "uses". (yang-00088) | o Added "refine" statement as a substatement to "uses". (yang-00088) | |||
o Allow "augment" on top-level and in "uses" only. (yang-00088) | o Allow "augment" on top-level and in "uses" only. (yang-00088) | |||
o Allow "when" on all data defintion statements. (yang-00088) | o Allow "when" on all data defintion statements. (yang-00088) | |||
o Added section "Constraints" and clarified when constraints are | o Added section "Constraints" and clarified when constraints are | |||
enforced. (yang-00172) | enforced. (yang-00172) | |||
o Added "feature" and "if-feature" statements. (yang-00750) | o Added "feature" and "if-feature" statements. (yang-00750) | |||
o Added "prefix" as a substatement to "belongs-to". (yang-00755) | o Added "prefix" as a substatement to "belongs-to". (yang-00755) | |||
o Added section on Conformance. (yang-01281) | o Added section on Conformance. (yang-01281) | |||
o Added "deviation" statement. (yang-01281) | o Added "deviation" statement. (yang-01281) | |||
o Added "identity" statement and "identityref" type. (yang-01339) | o Added "identity" statement and "identityref" type. (yang-01339) | |||
o Aligned grammar for "enum" with text. | o Aligned grammar for "enum" with text. | |||
A.6. Version -01 | A.7. Version -01 | |||
o Removed "Appendix A. Derived YANG Types". | o Removed "Appendix A. Derived YANG Types". | |||
o Removed "Appendix C. XML Schema Considerations". | o Removed "Appendix C. XML Schema Considerations". | |||
o Removed "Appendix F. Why We Need a New Modeling Language". | o Removed "Appendix F. Why We Need a New Modeling Language". | |||
o Moved "Appendix B. YIN" to its own section. | o Moved "Appendix B. YIN" to its own section. | |||
o Moved "Appendix D. YANG ABNF Grammar" to its own section. | o Moved "Appendix D. YANG ABNF Grammar" to its own section. | |||
skipping to change at page 172, line 7 | skipping to change at page 174, line 15 | |||
o Fixed whitespace issues in the ABNF grammar. | o Fixed whitespace issues in the ABNF grammar. | |||
o Added the term "mandatory node", and refer to it in the | o Added the term "mandatory node", and refer to it in the | |||
description of augment (see Section 7.15), and choice (see | description of augment (see Section 7.15), and choice (see | |||
Section 7.9.3). | Section 7.9.3). | |||
o Added support for multiple "pattern" statements in "type". | o Added support for multiple "pattern" statements in "type". | |||
o Several clarifications and fixed typos. | o Several clarifications and fixed typos. | |||
A.7. Version -00 | A.8. Version -00 | |||
Changes from draft-bjorklund-netconf-yang-02.txt | Changes from draft-bjorklund-netconf-yang-02.txt | |||
o Fixed bug in grammar for bit-stmt | o Fixed bug in grammar for bit-stmt | |||
o Fixed bugs in example XPath expressions | o Fixed bugs in example XPath expressions | |||
o Added keyword 'presence' to the YIN mapping table | o Added keyword 'presence' to the YIN mapping table | |||
Author's Address | Author's Address | |||
End of changes. 26 change blocks. | ||||
254 lines changed or deleted | 271 lines changed or added | |||
This html diff was produced by rfcdiff 1.35. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |