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: Bert Wijnen WG Chair: Mehmet Ersue 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 RESTCONF server. Copyright (c) 2014 IETF Trust and the persons identified as 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-restconf-02.txt // RFC Ed.: update the date below with the date of RFC publication // and remove this note. revision 2014-09-26 { description "Initial revision."; reference "RFC XXXX: RESTCONF Protocol."; } 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; 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 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; } }