draft-ietf-netmod-dsdl-map-08.txt   draft-ietf-netmod-dsdl-map-09.txt 
NETMOD L. Lhotka, Ed. NETMOD L. Lhotka, Ed.
Internet-Draft CESNET Internet-Draft CESNET
Intended status: Standards Track September 28, 2010 Intended status: Standards Track October 21, 2010
Expires: April 1, 2011 Expires: April 24, 2011
Mapping YANG to Document Schema Definition Languages and Validating Mapping YANG to Document Schema Definition Languages and Validating
NETCONF Content NETCONF Content
draft-ietf-netmod-dsdl-map-08 draft-ietf-netmod-dsdl-map-09
Abstract Abstract
This document specifies the mapping rules for translating YANG data This document specifies the mapping rules for translating YANG data
models into Document Schema Definition Languages (DSDL), a models into Document Schema Definition Languages (DSDL), a
coordinated set of XML schema languages standardized as ISO/IEC coordinated set of XML schema languages standardized as ISO/IEC
19757. The following DSDL schema languages are addressed by the 19757. The following DSDL schema languages are addressed by the
mapping: RELAX NG, Schematron and DSRL. The mapping takes one or mapping: RELAX NG, Schematron and DSRL. The mapping takes one or
more YANG modules and produces a set of DSDL schemas for a selected more YANG modules and produces a set of DSDL schemas for a selected
target document type - datastore content, NETCONF message etc. target document type - datastore content, NETCONF message etc.
skipping to change at page 1, line 39 skipping to change at page 1, line 39
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 April 1, 2011. This Internet-Draft will expire on April 24, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 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 4, line 23 skipping to change at page 4, line 23
10.58. The 'value' Statement . . . . . . . . . . . . . . . . . 64 10.58. The 'value' Statement . . . . . . . . . . . . . . . . . 64
10.59. The 'when' Statement . . . . . . . . . . . . . . . . . . 64 10.59. The 'when' Statement . . . . . . . . . . . . . . . . . . 64
10.60. The 'yang-version' Statement . . . . . . . . . . . . . . 64 10.60. The 'yang-version' Statement . . . . . . . . . . . . . . 64
10.61. The 'yin-element' Statement . . . . . . . . . . . . . . 64 10.61. The 'yin-element' Statement . . . . . . . . . . . . . . 64
11. Mapping the Hybrid Schema to DSDL . . . . . . . . . . . . . . 65 11. Mapping the Hybrid Schema to DSDL . . . . . . . . . . . . . . 65
11.1. Generating RELAX NG Schemas for Various Document Types . 65 11.1. Generating RELAX NG Schemas for Various Document Types . 65
11.2. Mapping Semantic Constraints to Schematron . . . . . . . 66 11.2. Mapping Semantic Constraints to Schematron . . . . . . . 66
11.2.1. Constraints on Mandatory Choice . . . . . . . . . . 69 11.2.1. Constraints on Mandatory Choice . . . . . . . . . . 69
11.3. Mapping Default Values to DSRL . . . . . . . . . . . . . 70 11.3. Mapping Default Values to DSRL . . . . . . . . . . . . . 70
12. Mapping NETMOD-specific Annotations to DSDL Schema 12. Mapping NETMOD-specific Annotations to DSDL Schema
Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 75
12.1. The @nma:config Annotation . . . . . . . . . . . . . . . 76 12.1. The @nma:config Annotation . . . . . . . . . . . . . . . 75
12.2. The @nma:default Annotation . . . . . . . . . . . . . . 76 12.2. The @nma:default Annotation . . . . . . . . . . . . . . 75
12.3. The <nma:error-app-tag> Annotation . . . . . . . . . . . 76 12.3. The <nma:error-app-tag> Annotation . . . . . . . . . . . 75
12.4. The <nma:error-message> Annotation . . . . . . . . . . . 76 12.4. The <nma:error-message> Annotation . . . . . . . . . . . 75
12.5. The @if-feature Annotation . . . . . . . . . . . . . . . 76 12.5. The @if-feature Annotation . . . . . . . . . . . . . . . 75
12.6. The @nma:implicit Annotation . . . . . . . . . . . . . . 77 12.6. The @nma:implicit Annotation . . . . . . . . . . . . . . 76
12.7. The <nma:instance-identifier> Annotation . . . . . . . . 77 12.7. The <nma:instance-identifier> Annotation . . . . . . . . 76
12.8. The @nma:key Annotation . . . . . . . . . . . . . . . . 77 12.8. The @nma:key Annotation . . . . . . . . . . . . . . . . 76
12.9. The @nma:leaf-list Annotation . . . . . . . . . . . . . 77 12.9. The @nma:leaf-list Annotation . . . . . . . . . . . . . 76
12.10. The @nma:leafref Annotation . . . . . . . . . . . . . . 78 12.10. The @nma:leafref Annotation . . . . . . . . . . . . . . 77
12.11. The @nma:min-elements Annotation . . . . . . . . . . . . 78 12.11. The @nma:min-elements Annotation . . . . . . . . . . . . 77
12.12. The @nma:max-elements Annotation . . . . . . . . . . . . 78 12.12. The @nma:max-elements Annotation . . . . . . . . . . . . 77
12.13. The <nma:must> Annotation . . . . . . . . . . . . . . . 78 12.13. The <nma:must> Annotation . . . . . . . . . . . . . . . 77
12.14. The <nma:ordered-by> Annotation . . . . . . . . . . . . 79 12.14. The <nma:ordered-by> Annotation . . . . . . . . . . . . 78
12.15. The <nma:status> Annotation . . . . . . . . . . . . . . 79 12.15. The <nma:status> Annotation . . . . . . . . . . . . . . 78
12.16. The @nma:unique Annotation . . . . . . . . . . . . . . . 79 12.16. The @nma:unique Annotation . . . . . . . . . . . . . . . 78
12.17. The @nma:when Annotation . . . . . . . . . . . . . . . . 79 12.17. The @nma:when Annotation . . . . . . . . . . . . . . . . 78
13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 80 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 79
14. Security Considerations . . . . . . . . . . . . . . . . . . . 81 14. Security Considerations . . . . . . . . . . . . . . . . . . . 80
15. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 82 15. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 81
16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 83 16. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 82
17. References . . . . . . . . . . . . . . . . . . . . . . . . . 84 17. References . . . . . . . . . . . . . . . . . . . . . . . . . 83
17.1. Normative References . . . . . . . . . . . . . . . . . . 84 17.1. Normative References . . . . . . . . . . . . . . . . . . 83
17.2. Informative References . . . . . . . . . . . . . . . . . 85 17.2. Informative References . . . . . . . . . . . . . . . . . 84
Appendix A. RELAX NG Schema for NETMOD-Specific Annotations . . 87 Appendix A. RELAX NG Schema for NETMOD-Specific Annotations . . 86
Appendix B. Schema-Independent Library . . . . . . . . . . . . . 92 Appendix B. Schema-Independent Library . . . . . . . . . . . . . 91
Appendix C. Mapping DHCP Data Model - A Complete Example . . . . 93 Appendix C. Mapping DHCP Data Model - A Complete Example . . . . 92
C.1. Input YANG Module . . . . . . . . . . . . . . . . . . . 93 C.1. Input YANG Module . . . . . . . . . . . . . . . . . . . 92
C.2. Hybrid Schema . . . . . . . . . . . . . . . . . . . . . 95 C.2. Hybrid Schema . . . . . . . . . . . . . . . . . . . . . 94
C.3. Final DSDL Schemas . . . . . . . . . . . . . . . . . . . 100 C.3. Final DSDL Schemas . . . . . . . . . . . . . . . . . . . 99
C.3.1. Main RELAX NG Schema for <nc:get> Reply . . . . . . 101 C.3.1. Main RELAX NG Schema for <nc:get> Reply . . . . . . 100
C.3.2. RELAX NG Schema - Global Named Pattern C.3.2. RELAX NG Schema - Global Named Pattern
Definitions . . . . . . . . . . . . . . . . . . . . 103 Definitions . . . . . . . . . . . . . . . . . . . . 102
C.3.3. Schematron Schema for <nc:get> Reply . . . . . . . 105 C.3.3. Schematron Schema for <nc:get> Reply . . . . . . . 104
C.3.4. DSRL Schema for <nc:get> Reply . . . . . . . . . . 107 C.3.4. DSRL Schema for <nc:get> Reply . . . . . . . . . . 106
Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 108 Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 107
D.1. Changes Between Versions -07 and -08 . . . . . . . . . . 108 D.1. Changes Between Versions -07 and -08 . . . . . . . . . . 107
D.2. Changes Between Versions -06 and -07 . . . . . . . . . . 108 D.2. Changes Between Versions -06 and -07 . . . . . . . . . . 107
D.3. Changes Between Versions -05 and -06 . . . . . . . . . . 108 D.3. Changes Between Versions -05 and -06 . . . . . . . . . . 107
D.4. Changes Between Versions -04 and -05 . . . . . . . . . . 109 D.4. Changes Between Versions -04 and -05 . . . . . . . . . . 108
D.5. Changes Between Versions -03 and -04 . . . . . . . . . . 109 D.5. Changes Between Versions -03 and -04 . . . . . . . . . . 108
D.6. Changes Between Versions -02 and -03 . . . . . . . . . . 110 D.6. Changes Between Versions -02 and -03 . . . . . . . . . . 109
D.7. Changes Between Versions -01 and -02 . . . . . . . . . . 111 D.7. Changes Between Versions -01 and -02 . . . . . . . . . . 110
D.8. Changes Between Versions -00 and -01 . . . . . . . . . . 111 D.8. Changes Between Versions -00 and -01 . . . . . . . . . . 110
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 113 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 112
1. Introduction 1. Introduction
The NETCONF Working Group has completed a base protocol used for The NETCONF Working Group has completed a base protocol used for
configuration management [RFC4741]. This base specification defines configuration management [RFC4741]. This base specification defines
protocol bindings and an XML container syntax for configuration and protocol bindings and an XML container syntax for configuration and
management operations, but does not include a data modeling language management operations, but does not include a data modeling language
or accompanying rules for how to model configuration and state or accompanying rules for how to model configuration and state
information carried by NETCONF. The IETF Operations Area has a long information carried by NETCONF. The IETF Operations Area has a long
tradition of defining data for SNMP Management Information Bases tradition of defining data for SNMP Management Information Bases
skipping to change at page 18, line 25 skipping to change at page 18, line 25
Table 2 lists alphabetically the names of NETMOD-specific annotation Table 2 lists alphabetically the names of NETMOD-specific annotation
attributes (prefixed with "@") and elements (in angle brackets) along attributes (prefixed with "@") and elements (in angle brackets) along
with a reference to the section where their use is described. with a reference to the section where their use is described.
Appendix A contains a RELAX NG schema for this annotation vocabulary. Appendix A contains a RELAX NG schema for this annotation vocabulary.
+---------------------------+--------------------+------+ +---------------------------+--------------------+------+
| annotation | section | note | | annotation | section | note |
+---------------------------+--------------------+------+ +---------------------------+--------------------+------+
| @nma:config | 10.9 | | | @nma:config | 10.9 | |
| | | | | | | |
| <nma:data> | Section 8.1 | 4 | | <nma:data> | 8.1 | 4 |
| | | | | | | |
| @nma:default | 10.12 | | | @nma:default | 10.12 | |
| | | | | | | |
| <nma:error-app-tag> | 10.16 | 1 | | <nma:error-app-tag> | 10.16 | 1 |
| | | | | | | |
| <nma:error-message> | 10.17 | 1 | | <nma:error-message> | 10.17 | 1 |
| | | | | | | |
| @nma:if-feature | 10.22 | | | @nma:if-feature | 10.22 | |
| | | | | | | |
| @nma:implicit | 10.11, 10.7, 10.12 | | | @nma:implicit | 10.11, 10.7, 10.12 | |
| | | | | | | |
| <nma:input> | Section 8.1 | 4 | | <nma:input> | 8.1 | 4 |
| | | | | | | |
| <nma:instance-identifier> | 10.53.6 | 2 | | <nma:instance-identifier> | 10.53.6 | 2 |
| | | | | | | |
| @nma:key | 10.26 | | | @nma:key | 10.26 | |
| | | | | | | |
| @nma:leaf-list | 10.28 | | | @nma:leaf-list | 10.28 | |
| | | | | | | |
| @nma:leafref | 10.53.7 | | | @nma:leafref | 10.53.7 | |
| | | | | | | |
| @nma:mandatory | 10.8 | | | @nma:mandatory | 10.8 | |
| | | | | | | |
| @nma:max-elements | 10.28 | | | @nma:max-elements | 10.28 | |
| | | | | | | |
| @nma:min-elements | 10.28 | | | @nma:min-elements | 10.28 | |
| | | | | | | |
| @nma:module | 10.34 | | | @nma:module | 10.34 | |
| | | | | | | |
| <nma:must> | 10.35 | 3 | | <nma:must> | 10.35 | 3 |
| | | | | | | |
| <nma:notification> | Section 8.1 | 4 | | <nma:notification> | 8.1 | 4 |
| | | | | | | |
| <nma:notifications> | Section 8.1 | 4 | | <nma:notifications> | 8.1 | 4 |
| | | | | | | |
| @nma:ordered-by | 10.38 | | | @nma:ordered-by | 10.38 | |
| | | | | | | |
| <nma:output> | Section 8.1 | 4 | | <nma:output> | 8.1 | 4 |
| | | | | | | |
| <nma:rpc> | Section 8.1 | 4 | | <nma:rpc> | 8.1 | 4 |
| | | | | | | |
| <nma:rpcs> | Section 8.1 | 4 | | <nma:rpcs> | 8.1 | 4 |
| | | | | | | |
| @nma:status | 10.51 | | | @nma:status | 10.51 | |
| | | | | | | |
| @nma:unique | 10.55 | | | @nma:unique | 10.55 | |
| | | | | | | |
| @nma:units | 10.56 | | | @nma:units | 10.56 | |
| | | | | | | |
| @nma:when | 10.59 | | | @nma:when | 10.59 | |
+---------------------------+--------------------+------+ +---------------------------+--------------------+------+
skipping to change at page 74, line 14 skipping to change at page 74, line 14
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<dsrl:maps xmlns:dsrl="http://purl.oclc.org/dsdl/dsrl" <dsrl:maps xmlns:dsrl="http://purl.oclc.org/dsdl/dsrl"
xmlns:ex6="http://example.com/ns/example6" xmlns:ex6="http://example.com/ns/example6"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<dsrl:element-map> <dsrl:element-map>
<dsrl:parent>/nc:rpc-reply/nc:data</dsrl:parent> <dsrl:parent>/nc:rpc-reply/nc:data</dsrl:parent>
<dsrl:name>ex6:outer</dsrl:name> <dsrl:name>ex6:outer</dsrl:name>
<dsrl:default-content> <dsrl:default-content>
<ex6:leaf1>1</ex6:leaf1> <ex6:leaf1>1</ex6:leaf1>
<ex6:one><ex6:leaf2>2</ex6:leaf2></ex6:one>
<?xml version="1.0" encoding="utf-8"?>
<dsrl:maps xmlns:dsrl="http://purl.oclc.org/dsdl/dsrl"
xmlns:ex6="http://example.com/ns/example6"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<dsrl:element-map>
<dsrl:parent>/nc:rpc-reply/nc:data</dsrl:parent>
<dsrl:name>ex6:outer</dsrl:name>
<dsrl:default-content>
<ex6:leaf1>1</ex6:leaf1>
<ex6:one> <ex6:one>
<ex6:leaf2>2</ex6:leaf2> <ex6:leaf2>2</ex6:leaf2>
</ex6:one> </ex6:one>
</dsrl:default-content> </dsrl:default-content>
</dsrl:element-map> </dsrl:element-map>
<dsrl:element-map> <dsrl:element-map>
<dsrl:parent>/nc:rpc-reply/nc:data/ex6:outer</dsrl:parent> <dsrl:parent>/nc:rpc-reply/nc:data/ex6:outer</dsrl:parent>
<dsrl:name>ex6:leaf1</dsrl:name> <dsrl:name>ex6:leaf1</dsrl:name>
<dsrl:default-content>1</dsrl:default-content> <dsrl:default-content>1</dsrl:default-content>
</dsrl:element-map> </dsrl:element-map>
 End of changes. 13 change blocks. 
66 lines changed or deleted 56 lines changed or added

This html diff was produced by rfcdiff 1.40. The latest version is available from http://tools.ietf.org/tools/rfcdiff/