draft-ietf-netconf-yang-library-00.txt   draft-ietf-netconf-yang-library-01.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: August 3, 2015 Tail-f Systems Expires: January 7, 2016 Tail-f Systems
K. Watsen K. Watsen
Juniper Networks Juniper Networks
January 30, 2015 July 6, 2015
YANG Module Library YANG Module Library
draft-ietf-netconf-yang-library-00 draft-ietf-netconf-yang-library-01
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 August 3, 2015. This Internet-Draft will expire on January 7, 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 15 skipping to change at page 2, line 15
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
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 . . . . . . . . . . . . . . . . . . . . 3 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 . . . . . . . . . . . . . . . . . . . 4 2.1.1. modules/module-set-id . . . . . . . . . . . . . . . . 5
2.1.2. modules/module . . . . . . . . . . . . . . . . . . . 5
2.2. YANG Library Module . . . . . . . . . . . . . . . . . . . 5 2.2. YANG Library Module . . . . . . . . . . . . . . . . . . . 5
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 9 3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 10
4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 4. Security Considerations . . . . . . . . . . . . . . . . . . . 10
5. Normative References . . . . . . . . . . . . . . . . . . . . 9 5. Normative References . . . . . . . . . . . . . . . . . . . . 11
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 10 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 11
A.1. draft-ietf-netconf-restconf-03 to 00 . . . . . . . . . . 10 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 12
Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 10 A.2. draft-ietf-netconf-restconf-03 to 00 . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12
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 each server that utilizes YANG- and submodules that are in use by each server that utilizes YANG-
based data abstraction. If a large number of YANG modules are based data abstraction. If a large number of YANG modules are
utilized by the server, then the YANG library information needed can utilized by the server, then the YANG library information needed can
be relatively large. This information changes very infrequently, so be relatively large. This information changes very infrequently, so
it is important that clients be able to cache the YANG library and it 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 34 skipping to change at page 4, line 40
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 module* [name revision]
+--ro name yang:yang-identifier +--ro name yang:yang-identifier
+--ro revision union +--ro revision union
+--ro schema? inet:uri +--ro schema? inet:uri
+--ro namespace inet:uri +--ro namespace inet:uri
+--ro feature* yang:yang-identifier +--ro feature* yang:yang-identifier
+--ro deviation* yang:yang-identifier +--ro deviation* [name revision]
+--ro conformance boolean | +--ro name yang:yang-identifier
| +--ro revision union
+--ro conformance enumeration
+--ro submodules +--ro submodules
+--ro submodule* [name revision] +--ro submodule* [name revision]
+--ro name yang:yang-identifier +--ro name yang:yang-identifier
+--ro revision union +--ro revision union
+--ro schema? inet:uri +--ro schema? inet:uri
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 2.1.1. modules/module-set-id
This mandatory leaf contains a unique implementation-specific
identifier representing the current set of 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,
and only re-fetch them if the value of this leaf has been changed.
2.1.2. 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 instance of this module supported by the server. There MUST be an instance of this
list for every YANG module that is used by the server. list 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 RESTCONF server. YANG modules used by a RESTCONF server.
The "ietf-yang-types" and "ietf-inet-types" modules from [RFC6991] The "ietf-yang-types" and "ietf-inet-types" modules from [RFC6991]
are used by this module for some type definitions. are used by this module for some type definitions.
RFC Ed.: update the date below with the date of RFC publication and RFC Ed.: update the date below with the date of RFC publication and
remove this note. remove this note.
<CODE BEGINS> file "ietf-yang-library@2015-01-30.yang" <CODE BEGINS> file "ietf-yang-library@2015-07-03.yang"
module ietf-yang-library { module ietf-yang-library {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library"; namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
prefix "yanglib"; prefix "yanglib";
import ietf-yang-types { prefix yang; } import ietf-yang-types {
import ietf-inet-types { prefix inet; } prefix yang;
}
import ietf-inet-types {
prefix inet;
}
organization organization
"IETF NETCONF (Network Configuration) Working Group"; "IETF NETCONF (Network Configuration) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/netconf/> "WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:netconf@ietf.org>
WG Chair: Mehmet Ersue WG Chair: Mehmet Ersue
<mailto:mehmet.ersue@nsn.com> <mailto:mehmet.ersue@nsn.com>
skipping to change at page 6, line 20 skipping to change at page 6, line 44
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-00.txt // Note: extracted from draft-ietf-netconf-yang-library-01.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-01-30 { revision 2015-07-03 {
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.";
TBD: make pattern more precise to exclude leading zeros.";
} }
grouping module { grouping module {
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 {
type yang:yang-identifier; type yang:yang-identifier;
description "The YANG module or submodule name."; description
"The YANG module or submodule name.";
} }
leaf revision { leaf revision {
type union { type union {
type revision-identifier; type revision-identifier;
type string { length 0; } type string { length 0; }
} }
description description
"The YANG module or submodule revision date. "The YANG module or submodule revision date.
An empty string is used if no revision statement An empty string is used if no revision statement
is present in the YANG module or submodule."; is present in the YANG module or submodule.";
} }
}
grouping schema-leaf {
description
"Common schema leaf parameter for modules and submodules.";
leaf schema { leaf schema {
type inet:uri; type inet:uri;
description description
"Contains a URL that represents the YANG schema "Contains a URL that represents the YANG schema
resource for this module or submodule. resource for this module or submodule.
This leaf will only be present if there is a URL This leaf will only be present if there is a URL
available for retrieval of the schema for this entry."; available for retrieval of the schema for this entry.";
} }
} }
list module { list module {
key "name revision"; key "name revision";
description description
"Each entry represents one module currently "Each entry represents one module currently
supported by the server."; supported by the server.";
uses common-leafs; uses common-leafs;
uses schema-leaf;
leaf namespace { leaf namespace {
type inet:uri; type inet:uri;
mandatory true; mandatory true;
description description
"The XML namespace identifier for this module."; "The XML namespace identifier for this module.";
} }
leaf-list feature { leaf-list feature {
type yang:yang-identifier; type yang:yang-identifier;
description description
"List of YANG feature names from this module that are "List of YANG feature names from this module that are
supported by the server."; supported by the server.";
} }
leaf-list deviation { list deviation {
type yang:yang-identifier; key "name revision";
description description
"List of YANG deviation module names used by this "List of YANG deviation module names and revisions
server to modify the conformance of the module used by this server to modify the conformance of
associated with this entry."; the module associated with this entry. Note that
the same module can be used for deviations for
multiple modules, so the same entry MAY appear
within multiple 'module' entries.
If the deviation module is available for download
from the server then a 'module' entry for that module
will exist, with the same name and revision values.
The 'conformance' value will be 'implement' for
the deviation module.";
uses common-leafs;
} }
leaf conformance { leaf conformance {
type boolean; type enumeration {
enum implement {
description
"Indicates the server implements one or more
protocol-accessible objects defined in the
YANG module identified in this entry. This includes
deviation statements defined in the module.
For YANG 1.1 modules, there MUST NOT be more than
one module entry for a particular module name.
For YANG 1.0 modules, there SHOULD NOT be more than
one module entry for a particular module name.";
}
enum import {
description
"Indicates the server imports reusable definitions from
the specified revision of the module, but does not
implement any protocol accessible objects from this
revision.
Multiple module entries for the same module name MAY
exist. This can occur if multiple modules import the
same module, but specify different revision-dates in
the import statements.
For import statements that do not specify a revision
date, the most recent revision in the library SHOULD
be used by the server.";
}
}
mandatory true; mandatory true;
description description
"If 'true', then the server is claiming conformance to "Indicates the type of conformance the server is claiming
the YANG module identified in this entry. for the YANG module identified by 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 { container submodules {
description description
"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;
} }
} }
} // 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;
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
skipping to change at page 9, line 34 skipping to change at page 10, line 49
registry [RFC6020]. registry [RFC6020].
name: ietf-yang-library name: ietf-yang-library
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
prefix: yanglib prefix: yanglib
// RFC Ed.: replace XXXX with RFC number and remove this note // RFC Ed.: replace XXXX with RFC number and remove this note
reference: RFC XXXX reference: RFC XXXX
4. Security Considerations 4. Security Considerations
This section provides security considerations for the information The YANG module defined in this memo is designed to be accessed via
that is defined by the "ietf-yang-library" module. the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the
secure transport layer and the mandatory-to-implement secure
transport is SSH [RFC6242].
[FIXME: follow template for sec. considerations] Some of the readable data nodes in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability:
o /modules/module: The module list used in a server implementation
may help an attacker identify the server capabilities and server
implementations with known bugs. Server vulnerabilities may be
specific to particular modules, module revisions, module features,
or even module deviations. This information is included in each
module entry. For example, if a particular operation on a
particular data node is known to cause a server to crash or
significantly degrade device performance, then the module list
information will help an attacker identify server implementations
with such a defect, in order to launch a denial of service attack
on the device.
5. Normative References 5. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004. January 2004.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020, Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010. October 2010.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, June 2011. (NETCONF)", RFC 6241, June 2011.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
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. draft-ietf-netconf-restconf-03 to 00 A.1. 00 to 01
o change conformance leaf to enumeration
o filled in security considerations section
A.2. draft-ietf-netconf-restconf-03 to 00
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.
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: 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
Authors' Addresses Authors' Addresses
Andy Bierman Andy Bierman
YumaWorks YumaWorks
Email: andy@yumaworks.com Email: andy@yumaworks.com
 End of changes. 28 change blocks. 
52 lines changed or deleted 130 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/