Network Working Group A. Bierman Internet-Draft YumaWorks Intended status: Standards Track M. Bjorklund Expires: August 3, 2015 Tail-f Systems K. Watsen Juniper Networks January 30, 2015 YANG Module Library draft-ietf-netconf-yang-library-00 Abstract This document describes a YANG library, which provides information about all the YANG modules used by a device to represent management and protocol information. A YANG library can be shared by multiple protocols within the same device. Simple caching mechanisms are needed to allow clients to minimize retrieval of this information. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on August 3, 2015. Copyright Notice Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must Bierman, et al. Expires August 3, 2015 [Page 1] Internet-Draft YANG Library January 2015 include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.2. YANG . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.3. Terms . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.4. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 3 2. YANG Module Library . . . . . . . . . . . . . . . . . . . . . 4 2.1. modules . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1.1. modules/module . . . . . . . . . . . . . . . . . . . 4 2.2. YANG Library Module . . . . . . . . . . . . . . . . . . . 5 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 9 4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 5. Normative References . . . . . . . . . . . . . . . . . . . . 9 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 10 A.1. draft-ietf-netconf-restconf-03 to 00 . . . . . . . . . . 10 Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 10 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 1. Introduction There is a need for standard mechanisms to identify the YANG modules and submodules that are in use by each server that utilizes YANG- based data abstraction. If a large number of YANG modules are utilized by the server, then the YANG library information needed can be relatively large. This information changes very infrequently, so it is important that clients be able to cache the YANG library and easily identify if their cache is out-of-date. YANG library information can be different on every server, and can change at run-time or across a server reboot. Typically firmware upgrades are required to change the set of YANG modules used by a server. The following information is needed by a client application (for each YANG module in the library) to fully utilize the YANG data modeling language. o name: The mandatory YANG module name MUST be unique within a YANG library. All modules and submodules share the same namespace, including modules used for deviations. Bierman, et al. Expires August 3, 2015 [Page 2] Internet-Draft YANG Library January 2015 o revision date: Each YANG module within the library MUST have a revision date. This is derived from the most recent revision statement within the module or submodule. o submodule list: The name and revision date of each submodule used by main module MUST be identified. o feature list: The name of each YANG feature supported by the server MUST be identified. o deviation list: The name of each YANG module used for deviation statements SHOULD be identified. 1.1. Terminology The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119]. 1.1.1. NETCONF The following terms are defined in [RFC6241]: o client o server 1.1.2. YANG The following terms are defined in [RFC6020]: o module o submodule 1.1.3. Terms The following terms are used within this document: o YANG library: a collection of YANG modules and submodules used by a server 1.1.4. Tree Diagrams A simplified graphical representation of the data model is used in this document. The meaning of the symbols in these diagrams is as follows: Bierman, et al. Expires August 3, 2015 [Page 3] Internet-Draft YANG Library January 2015 o Brackets "[" and "]" enclose list keys. o Abbreviations before data node names: "rw" means configuration data (read-write) and "ro" state data (read-only). o Symbols after data node names: "?" means an optional node, "!" means a presence container, and "*" denotes a list and leaf-list. o Parentheses enclose choice and case nodes, and case nodes are also marked with a colon (":"). o Ellipsis ("...") stands for contents of subtrees that are not shown. 2. YANG Module Library The "ietf-yang-library" module provides information about the YANG library used by a server. YANG Tree Diagram for "ietf-yang-library" module: +--ro modules +--ro module-set-id? string +--ro module* [name revision] +--ro name yang:yang-identifier +--ro revision union +--ro schema? inet:uri +--ro namespace inet:uri +--ro feature* yang:yang-identifier +--ro deviation* yang:yang-identifier +--ro conformance boolean +--ro submodules +--ro submodule* [name revision] +--ro name yang:yang-identifier +--ro revision union +--ro schema? inet:uri 2.1. modules This mandatory container holds the identifiers for the YANG data model modules supported by the server. 2.1.1. modules/module This mandatory list contains one entry for each YANG data model module supported by the server. There MUST be an instance of this list for every YANG module that is used by the server. Bierman, et al. Expires August 3, 2015 [Page 4] Internet-Draft YANG Library January 2015 2.2. YANG Library Module The "ietf-yang-library" module defines monitoring information for the YANG modules used by a RESTCONF server. The "ietf-yang-types" and "ietf-inet-types" modules from [RFC6991] are used by this module for some type definitions. RFC Ed.: update the date below with the date of RFC publication and remove this note. file "ietf-yang-library@2015-01-30.yang" module ietf-yang-library { namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; prefix "yanglib"; import ietf-yang-types { prefix yang; } import ietf-inet-types { prefix inet; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: WG List: WG Chair: Mehmet Ersue WG Chair: Mahesh Jethanandani Editor: Andy Bierman Editor: Martin Bjorklund Editor: Kent Watsen "; description "This module contains monitoring information about the YANG modules and submodules that are used within a YANG-based server. Copyright (c) 2015 IETF Trust and the persons identified as Bierman, et al. Expires August 3, 2015 [Page 5] Internet-Draft YANG Library January 2015 authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: remove this note // Note: extracted from draft-ietf-netconf-yang-library-00.txt // RFC Ed.: update the date below with the date of RFC publication // and remove this note. revision 2015-01-30 { description "Initial revision."; reference "RFC XXXX: YANG Module Library."; } typedef revision-identifier { type string { pattern '\d{4}-\d{2}-\d{2}'; } description "Represents a specific date in YYYY-MM-DD format. TBD: make pattern more precise to exclude leading zeros."; } grouping module { description "The module data structure is represented as a grouping so it can be reused in configuration or another monitoring data structure."; grouping common-leafs { description "Common parameters for YANG modules and submodules."; leaf name { type yang:yang-identifier; Bierman, et al. Expires August 3, 2015 [Page 6] Internet-Draft YANG Library January 2015 description "The YANG module or submodule name."; } leaf revision { type union { type revision-identifier; type string { length 0; } } description "The YANG module or submodule revision date. An empty string is used if no revision statement is present in the YANG module or submodule."; } leaf schema { type inet:uri; description "Contains a URL that represents the YANG schema resource for this module or submodule. This leaf will only be present if there is a URL available for retrieval of the schema for this entry."; } } list module { key "name revision"; description "Each entry represents one module currently supported by the server."; uses common-leafs; leaf namespace { type inet:uri; mandatory true; description "The XML namespace identifier for this module."; } leaf-list feature { type yang:yang-identifier; description "List of YANG feature names from this module that are supported by the server."; } leaf-list deviation { type yang:yang-identifier; description "List of YANG deviation module names used by this server to modify the conformance of the module Bierman, et al. Expires August 3, 2015 [Page 7] Internet-Draft YANG Library January 2015 associated with this entry."; } leaf conformance { type boolean; mandatory true; description "If 'true', then the server is claiming conformance to the YANG module identified in this entry. If 'false', then the server is not claiming any conformance for the YANG module identified by this entry. The module may be needed for reusable definitions such as extensions, features, identifies, typedefs, or groupings."; } container submodules { description "Contains information about all the submodules used by the parent module entry"; list submodule { key "name revision"; description "Each entry represents one submodule within the parent module."; uses common-leafs; } } } // list module } // grouping module container modules { config false; description "Contains YANG module monitoring information."; leaf module-set-id { type string; description "Contains a server-specific identifier representing the current set of modules and submodules. The server MUST change the value of this leaf if the information represented by the 'module' list instances has changed."; } uses module; Bierman, et al. Expires August 3, 2015 [Page 8] Internet-Draft YANG Library January 2015 } } 3. IANA Considerations 3.1. YANG Module Registry This document registers one URI in the IETF XML registry [RFC3688]. Following the format in RFC 3688, the following registration is requested to be made. URI: urn:ietf:params:xml:ns:yang:ietf-yang-library Registrant Contact: The NETMOD WG of the IETF. XML: N/A, the requested URI is an XML namespace. This document registers one YANG module in the YANG Module Names registry [RFC6020]. name: ietf-yang-library namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library prefix: yanglib // RFC Ed.: replace XXXX with RFC number and remove this note reference: RFC XXXX 4. Security Considerations This section provides security considerations for the information that is defined by the "ietf-yang-library" module. [FIXME: follow template for sec. considerations] 5. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. Bierman, et al. Expires August 3, 2015 [Page 9] Internet-Draft YANG Library January 2015 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011. [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, July 2013. Appendix A. Change Log -- RFC Ed.: remove this section before publication. A.1. draft-ietf-netconf-restconf-03 to 00 o moved ietf-yang-library from RESTCONF draft to new draft Appendix B. Open Issues -- RFC Ed.: remove this section before publication. o conformance information: should 'conformance' leaf be removed and let real YANG conformance module augment as needed? o multi-protocol: should information be added to identify which protocols use each module or should each protocol define their own augmentations? The YANG Library issue tracker can be found here: https://github.com/netconf-wg/yang-library/issues Authors' Addresses Andy Bierman YumaWorks Email: andy@yumaworks.com Martin Bjorklund Tail-f Systems Email: mbj@tail-f.com Kent Watsen Juniper Networks Email: kwatsen@juniper.net Bierman, et al. Expires August 3, 2015 [Page 10]