draft-ietf-netconf-yang-library-02.txt   draft-ietf-netconf-yang-library-03.txt 
Network Working Group A. Bierman Network Working Group A. Bierman
Internet-Draft YumaWorks Internet-Draft YumaWorks
Intended status: Standards Track M. Bjorklund Intended status: Standards Track M. Bjorklund
Expires: April 20, 2016 Tail-f Systems Expires: June 17, 2016 Tail-f Systems
K. Watsen K. Watsen
Juniper Networks Juniper Networks
October 18, 2015 December 15, 2015
YANG Module Library YANG Module Library
draft-ietf-netconf-yang-library-02 draft-ietf-netconf-yang-library-03
Abstract Abstract
This document describes a YANG library, which provides information This document describes a YANG library, which provides information
about all the YANG modules used by a device to represent management about all the YANG modules used by a device to represent management
and protocol information. A YANG library can be shared by multiple and protocol information. A YANG library can be shared by multiple
protocols within the same device. Simple caching mechanisms are protocols within the same device. Simple caching mechanisms are
needed to allow clients to minimize retrieval of this information. needed to allow clients to minimize retrieval of this information.
Status of This Memo Status of This Memo
skipping to change at page 1, line 37 skipping to change at page 1, line 37
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 20, 2016. This Internet-Draft will expire on June 17, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 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 17 skipping to change at page 2, line 17
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2. YANG . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.2. YANG . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.3. Terms . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.3. Terms . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.4. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 4 1.1.4. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 4
2. YANG Module Library . . . . . . . . . . . . . . . . . . . . . 4 2. YANG Module Library . . . . . . . . . . . . . . . . . . . . . 4
2.1. modules . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. modules . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1. modules/module-set-id . . . . . . . . . . . . . . . . 5 2.1.1. modules/module-set-id . . . . . . . . . . . . . . . . 5
2.1.2. modules/module . . . . . . . . . . . . . . . . . . . 5 2.1.2. modules/yang-protocol . . . . . . . . . . . . . . . . 5
2.2. YANG Library Module . . . . . . . . . . . . . . . . . . . 5 2.1.3. modules/module . . . . . . . . . . . . . . . . . . . 5
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 2.2. YANG Library Module . . . . . . . . . . . . . . . . . . . 6
3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 10 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
4. Security Considerations . . . . . . . . . . . . . . . . . . . 11 3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 12
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 4. Security Considerations . . . . . . . . . . . . . . . . . . . 12
6. Normative References . . . . . . . . . . . . . . . . . . . . 11 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 12 6. Normative References . . . . . . . . . . . . . . . . . . . . 13
A.1. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 12 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 13
A.2. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 12 A.1. v02 to v03 . . . . . . . . . . . . . . . . . . . . . . . 13
A.3. draft-ietf-netconf-restconf-03 to 00 . . . . . . . . . . 12 A.2. v01 to v02 . . . . . . . . . . . . . . . . . . . . . . . 14
Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 12 A.3. v00 to v01 . . . . . . . . . . . . . . . . . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 A.4. draft-ietf-netconf-restconf-03 to v00 . . . . . . . . . . 14
Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14
1. Introduction 1. Introduction
There is a need for standard mechanisms to identify the YANG modules There is a need for standard mechanisms to identify the YANG modules
and submodules that are in use by a server that utilizes YANG-based and submodules that are in use by a server that utilizes YANG-based
data abstractions. If a large number of YANG modules are utilized by data abstractions. If a large number of YANG modules are utilized by
the server, then the YANG library information needed can be the server, then the YANG library information needed can be
relatively large. This information changes very infrequently, so it relatively large. This information changes very infrequently, so it
is important that clients be able to cache the YANG library and is important that clients be able to cache the YANG library and
easily identify if their cache is out-of-date. easily identify if their cache is out-of-date.
skipping to change at page 4, line 33 skipping to change at page 5, line 6
shown. shown.
2. YANG Module Library 2. YANG Module Library
The "ietf-yang-library" module provides information about the YANG The "ietf-yang-library" module provides information about the YANG
library used by a server. library used by a server.
YANG Tree Diagram for "ietf-yang-library" module: YANG Tree Diagram for "ietf-yang-library" module:
+--ro modules +--ro modules
+--ro module-set-id string +--ro module-set-id string
+--ro module* [name revision] +--ro yang-protocol* identityref
+--ro name yang:yang-identifier +--ro module* [name revision]
+--ro revision union +--ro name yang:yang-identifier
+--ro schema? inet:uri +--ro revision union
+--ro namespace inet:uri +--ro schema? inet:uri
+--ro feature* yang:yang-identifier +--ro namespace inet:uri
+--ro deviation* [name revision] +--ro feature* yang:yang-identifier
| +--ro name yang:yang-identifier +--ro deviation* [name revision]
| +--ro revision union | +--ro name yang:yang-identifier
+--ro conformance enumeration | +--ro revision union
+--ro submodules +--ro conformance enumeration
+--ro submodule* [name revision] +--ro submodules
+--ro name yang:yang-identifier | +--ro submodule* [name revision]
+--ro revision union | +--ro name yang:yang-identifier
+--ro schema? inet:uri | +--ro revision union
| +--ro schema? inet:uri
+--ro restricted-protocol* identityref
2.1. modules 2.1. modules
This mandatory container holds the identifiers for the YANG data This mandatory container holds the identifiers for the YANG data
model modules supported by the server. model modules supported by the server.
2.1.1. modules/module-set-id 2.1.1. modules/module-set-id
This mandatory leaf contains a unique implementation-specific This mandatory leaf contains a unique implementation-specific
identifier representing the current set of modules and submodules. identifier representing the current set of modules and submodules.
This can for example be a checksum of all modules and submodules. This can for example be a checksum of all modules and submodules.
This leaf allows a client to fetch the module list once, cache them, This leaf allows a client to fetch the module list once, cache them,
skipping to change at page 5, line 16 skipping to change at page 5, line 39
2.1.1. modules/module-set-id 2.1.1. modules/module-set-id
This mandatory leaf contains a unique implementation-specific This mandatory leaf contains a unique implementation-specific
identifier representing the current set of modules and submodules. identifier representing the current set of modules and submodules.
This can for example be a checksum of all modules and submodules. This can for example be a checksum of all modules and submodules.
This leaf allows a client to fetch the module list once, cache them, This leaf allows a client to fetch the module list once, cache them,
and only re-fetch them if the value of this leaf has been changed. and only re-fetch them if the value of this leaf has been changed.
2.1.2. modules/module 2.1.2. modules/yang-protocol
This leaf-list identifies the YANG-based protocols that are using the
YANG library. It allows an operator to be aware that multi-protocol
conflicts could potentially occur on a managed device.
A corresponding leaf-list called 'restricted-protocol' is defined in
the module entry to identify modules that are not supported by one or
more protocols.
2.1.3. modules/module
This mandatory list contains one entry for each YANG data model This mandatory list contains one entry for each YANG data model
module supported by the server. There MUST be an entry in this list module supported by the server. There MUST be an entry in this list
for every YANG module that is used by the server. for every YANG module that is used by the server.
2.2. YANG Library Module 2.2. YANG Library Module
The "ietf-yang-library" module defines monitoring information for the The "ietf-yang-library" module defines monitoring information for the
YANG modules used by a server. YANG modules used by a server.
The "ietf-yang-types" and "ietf-inet-types" modules from [RFC6991] The "ietf-yang-types" and "ietf-inet-types" modules from [RFC6991]
skipping to change at page 6, line 41 skipping to change at page 7, line 28
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this // RFC Ed.: replace XXXX with actual RFC number and remove this
// note. // note.
// RFC Ed.: remove this note // RFC Ed.: remove this note
// Note: extracted from draft-ietf-netconf-yang-library-02.txt // Note: extracted from draft-ietf-netconf-yang-library-03.txt
// RFC Ed.: update the date below with the date of RFC publication // RFC Ed.: update the date below with the date of RFC publication
// and remove this note. // and remove this note.
revision 2015-10-18 { revision 2015-12-08 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: YANG Module Library."; "RFC XXXX: YANG Module Library.";
} }
typedef revision-identifier { typedef revision-identifier {
type string { type string {
pattern '\d{4}-\d{2}-\d{2}'; pattern '\d{4}-\d{2}-\d{2}';
} }
description description
"Represents a specific date in YYYY-MM-DD format."; "Represents a specific date in YYYY-MM-DD format.";
} }
grouping module { identity yang-protocol {
description
"The base for all YANG-based protocol identifiers.";
}
identity netconf1.0 {
base yang-protocol;
description "Version 1.0 of the NETCONF protocol";
reference "RFC 4271";
}
identity netconf1.1 {
base yang-protocol;
description "Version 1.1 of the NETCONF protocol";
reference "RFC 6241";
}
identity restconf1.0 {
base yang-protocol;
description "Version 1.0 of the RESTCONF protocol";
reference "draft-ietf-netconf-restconf";
}
grouping module-list {
description description
"The module data structure is represented as a grouping "The module data structure is represented as a grouping
so it can be reused in configuration or another monitoring so it can be reused in configuration or another monitoring
data structure."; data structure.";
grouping common-leafs { grouping common-leafs {
description description
"Common parameters for YANG modules and submodules."; "Common parameters for YANG modules and submodules.";
leaf name { leaf name {
skipping to change at page 8, line 44 skipping to change at page 10, line 4
the same module can be used for deviations for the same module can be used for deviations for
multiple modules, so the same entry MAY appear multiple modules, so the same entry MAY appear
within multiple 'module' entries. within multiple 'module' entries.
If the deviation module is available for download If the deviation module is available for download
from the server then a 'module' entry for that module from the server then a 'module' entry for that module
will exist, with the same name and revision values. will exist, with the same name and revision values.
The 'conformance' value will be 'implement' for The 'conformance' value will be 'implement' for
the deviation module."; the deviation module.";
uses common-leafs; uses common-leafs;
} }
leaf conformance { leaf conformance {
type enumeration { type enumeration {
enum implement { enum implement {
description description
"Indicates the server implements one or more "Indicates that the server implements one or more
protocol-accessible objects defined in the protocol-accessible objects defined in the YANG module
YANG module identified in this entry. This includes identified in this entry. This includes deviation
deviation statements defined in the module. statements defined in the module.
For YANG 1.1 modules, there MUST NOT be more than For YANG 1.1 modules, there MUST NOT be more than one
one module entry for a particular module name. module entry with conformance 'implement' for a
particular module name.
For YANG 1.1 modules that use the import statement For YANG 1.1 modules that use the import statement
without specifying a revision date, the implemented without specifying a revision date, the implemented
revision of the imported module MUST be used. revision of the imported module MUST be used.
If the imported module is not implemented, then If the imported module is not implemented, then
the most recent revision of the imported module the most recent revision of the imported module
used by the server (and contained in the module list) used by the server (and contained in the module list)
MUST be used. MUST be used.
For YANG 1.0 modules, there SHOULD NOT be more than For YANG 1.0 modules, there SHOULD NOT be more than
one module entry for a particular module name."; one module entry for a particular module name.";
} }
enum import { enum import {
description description
"Indicates the server imports reusable definitions from "Indicates that the server imports reusable definitions
the specified revision of the module, but does not from the specified revision of the module, but does
implement any protocol accessible objects from this not implement any protocol accessible objects from
revision. this revision.
Multiple module entries for the same module name MAY Multiple module entries for the same module name MAY
exist. This can occur if multiple modules import the exist. This can occur if multiple modules import the
same module, but specify different revision-dates in same module, but specify different revision-dates in
the import statements. the import statements.
For import statements that do not specify a revision For import statements that do not specify a revision
date, the most recent revision in the library SHOULD date, the most recent revision in the library SHOULD
be used by the server."; be used by the server.";
} }
skipping to change at page 10, line 4 skipping to change at page 11, line 15
"Contains information about all the submodules used "Contains information about all the submodules used
by the parent module entry"; by the parent module entry";
list submodule { list submodule {
key "name revision"; key "name revision";
description description
"Each entry represents one submodule within the "Each entry represents one submodule within the
parent module."; parent module.";
uses common-leafs; uses common-leafs;
uses schema-leaf; uses schema-leaf;
} }
} }
leaf-list restricted-protocol {
type identityref {
base yang-protocol;
}
description
"Identifies a protocol that does not use the module
described by this module instance.";
}
} // list module } // list module
} // grouping module } // grouping module
container modules { container modules {
config false; config false;
description description
"Contains YANG module monitoring information."; "Contains YANG module monitoring information.";
leaf module-set-id { leaf module-set-id {
type string; type string;
mandatory true; mandatory true;
description description
"Contains a server-specific identifier representing "Contains a server-specific identifier representing
the current set of modules and submodules. The the current set of modules and submodules. The
server MUST change the value of this leaf if the server MUST change the value of this leaf if the
information represented by the 'module' list instances information represented by the 'module' list instances
has changed."; has changed.";
} }
uses module; leaf-list yang-protocol {
type identityref {
base yang-protocol;
}
description
"Identifies a protocol that is using modules described
in this library. There SHOULD be one instance of
this object for each protocol for each YANG-based
protocol using this library.";
}
uses module-list;
} }
} }
<CODE ENDS> <CODE ENDS>
3. IANA Considerations 3. IANA Considerations
3.1. YANG Module Registry 3.1. YANG Module Registry
skipping to change at page 12, line 23 skipping to change at page 13, line 48
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, June 2011. Shell (SSH)", RFC 6242, June 2011.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
July 2013. July 2013.
Appendix A. Change Log Appendix A. Change Log
-- RFC Ed.: remove this section before publication. -- RFC Ed.: remove this section before publication.
A.1. 01 to 02 A.1. v02 to v03
o added yang-protocol identity
o added identities for NETCONF and RESTCONF protocols
o added yang-protocol leaf-list to /modules
o added restricted-protocol leaf-list to /modules/module
A.2. v01 to v02
o clarify 'implement' conformance for YANG 1.1 modules o clarify 'implement' conformance for YANG 1.1 modules
A.2. 00 to 01 A.3. v00 to v01
o change conformance leaf to enumeration o change conformance leaf to enumeration
o filled in security considerations section o filled in security considerations section
A.3. draft-ietf-netconf-restconf-03 to 00 A.4. draft-ietf-netconf-restconf-03 to v00
o moved ietf-yang-library from RESTCONF draft to new draft o moved ietf-yang-library from RESTCONF draft to new draft
Appendix B. Open Issues Appendix B. Open Issues
-- RFC Ed.: remove this section before publication. -- RFC Ed.: remove this section before publication.
The YANG Library issue tracker can be found here: The YANG Library issue tracker can be found here:
https://github.com/netconf-wg/yang-library/issues https://github.com/netconf-wg/yang-library/issues [1]
Authors' Addresses Authors' Addresses
Andy Bierman Andy Bierman
YumaWorks YumaWorks
Email: andy@yumaworks.com Email: andy@yumaworks.com
Martin Bjorklund Martin Bjorklund
Tail-f Systems Tail-f Systems
Email: mbj@tail-f.com Email: mbj@tail-f.com
Kent Watsen Kent Watsen
Juniper Networks Juniper Networks
Email: kwatsen@juniper.net Email: kwatsen@juniper.net
 End of changes. 26 change blocks. 
54 lines changed or deleted 121 lines changed or added

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