module ietf-yang-library {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
  prefix "yanglib";

  import ietf-yang-types {
    prefix yang;
    reference "RFC 6991: Common YANG Data Types.";
  }
  import ietf-inet-types {
    prefix inet;
    reference "RFC 6991: Common YANG Data Types.";
  }
  import ietf-datastores {
    prefix ds;
    reference "I-D.ietf-revised-datastores:
               Network Management Datastore Architecture.";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>

     Author:   Andy Bierman
               <mailto:andy@yumaworks.com>

     Author:   Martin Bjorklund
               <mailto:mbj@tail-f.com>

     Author:   Kent Watsen
               <mailto:kwatsen@juniper.net>";

  description
    "This module contains information about the YANG server
     instance, including the modules and datastores the
     server supports, and which modules are present in
     which datastores.

     Copyright (c) 2017 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.: update the date below with the date of RFC publication
  // and remove this note.
  // RFC Ed.: replace XXXX with actual RFC number and remove this
  // note.
  revision 2017-08-17 {
    description
      "Updated revision.";
    reference
      "RFC XXXX: YANG Library.";
  }
  revision 2016-04-09 {
    description
      "Initial revision.";
    reference
      "RFC 7895: YANG Module Library.";
  }
  /*
   * Typedefs
   */

  typedef revision-identifier {
    type string {
      pattern '\d{4}-\d{2}-\d{2}';
    }
    description
      "Represents a specific date in YYYY-MM-DD format.";
  }

  /*
   * Groupings
   */

  grouping module-identification-leafs {
    description
      "Parameters for identifying YANG modules and submodules.";

    leaf name {
      type yang:yang-identifier;
      mandatory true;
      description
        "The YANG module or submodule name.";
    }
    leaf revision {
      type union {
        type revision-identifier;
        type string { length 0; }
      }
      mandatory true;
      description
        "The YANG module or submodule revision date.
         A zero-length string is used if no revision statement
         is present in the YANG module or submodule.";
    }
  }

  grouping schema-leaf {
    description
      "Common schema leaf parameter for modules and submodules.";

    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.";
    }
  }

  grouping implementation-parameters {
    description
      "Parameters for describing the implementation of a module.";

    leaf-list feature {
      type yang:yang-identifier;
      description
        "List of YANG feature names from this module that are
         supported by the server, regardless whether they are defined
         in the module or any included submodule.";
    }
    list deviation {
      key "name revision";
      description
        "List of YANG deviation module names and revisions used by
         this server to modify the conformance of 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.

         The deviation module MUST be present in the 'module' list,
         with the same name and revision values.  The
         'conformance-type' value will be 'implement' for the
         deviation module.";

      uses module-identification-leafs;
    }
    leaf conformance-type {
      type enumeration {
        enum implement {
          description
            "Indicates that 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 version 1.1 modules, there is at most one
             module entry with conformance type 'implement' for a
             particular module name, since YANG 1.1 requires that at
             most one revision of a module is implemented.

             For YANG version 1 modules, there SHOULD NOT be more
             than one module entry for a particular module name.";
        }
        enum import {
          description
            "Indicates that 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.";
        }
      }
      mandatory true;
      description
        "Indicates the type of conformance the server is claiming
         for the YANG module identified by this entry.";
    }
  }

  grouping yang-library-parameters {
    description
      "The YANG library data structure is represented as a grouping
       so it can be reused in configuration or another monitoring
       data structure.";

    container modules {
      description
        "A container holding a list of modules.  Note, modules being
         listed here does not mean that they are supported by any
         particular datastore.";

      list module {
        key "id";
        description
          "Each entry represents one revision of one module
           currently supported by the server.";

        leaf id {
          type string;
          description
            "A stable identifier, independent of any other part
             of this module instance.";
        }

        uses module-identification-leafs;
        uses schema-leaf;
        leaf namespace {
          type inet:uri;
          mandatory true;
          description
            "The XML namespace identifier for this module.";
        }

        uses implementation-parameters;

        list submodule {
          key "name revision";
          description
            "Each entry represents one submodule within the
             parent module.";
          uses module-identification-leafs;
          uses schema-leaf;
        }
      }
    }

    container module-sets {
      description
        "A container for a list of module-sets.  Module-sets being
         listed here does not mean that they are used by any
         particular datastore.";
      list module-set {
        key "id";
        description
          "An arbitrary module-set definition provided by the
           server.";

        leaf id {
          type string;
          description
            "A system-generated value that uniquely represents the
             referenced set of modules.  Any change to the number
             of modules referenced, or to the modules themselves,
             generates a different value.";
        }
        leaf-list module {
          type leafref {
            path "../../../modules/module/id";
          }
          description
            "A module-instance supported by the server, including its
             features and deviations.";
        }
      }
    }

    container datastores {
      description
        "A container for a list of datastores supported by the
         server.  Each datastore indicates which module-sets it
         supports.";

      list datastore {
        key "name";

        leaf name {
          type identityref {
            base ds:datastore;
          }
          description
            "The identity of the datastore.";
        }
        leaf module-set {
          type leafref {
            path "../../../module-sets/module-set/id";
          }
          description
            "A reference to a module-set supported by this
             datastore";
        }
        description
          "A datastore supported by this server.";
      }
    }
  }

  /*
   * Top-level container
   */

  container yang-library {
    config false;
    description
      "Container providing all the YANG meta information the
       server possesses.";

    uses yang-library-parameters;

    leaf checksum {
      type string;
      config false;
      mandatory true;
      description
        "A server-generated checksum of the contents of the
         'yang-library' tree.  The server MUST change the value of
         this leaf if the information represented by the
         'yang-library' tree, except yang-library/checksum, has
         changed.";
    }
  }

  /*
   * Notifications
   */

  notification yang-library-update {
    description
      "Generated when any YANG library information on the
       server has changed.";
  }

  /*
   * Legacy groupings
   */

  grouping module-list {
    status deprecated;
    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 {
      status deprecated;
      description
        "Common parameters for YANG modules and submodules.";

      leaf name {
        type yang:yang-identifier;
        status deprecated;
        description
          "The YANG module or submodule name.";
      }
      leaf revision {
        type union {
          type revision-identifier;
          type string {
            length 0;
          }
        }
        status deprecated;
        description
          "The YANG module or submodule revision date.
           A zero-length string is used if no revision statement
           is present in the YANG module or submodule.";
      }
    }

    list module {
      key "name revision";
      status deprecated;
      description
        "Each entry represents one revision of one module
         currently supported by the server.";

      uses common-leafs {
        status deprecated;
      }
      uses schema-leaf {
        status deprecated;
      }

      leaf namespace {
        type inet:uri;
        mandatory true;
        status deprecated;
        description
          "The XML namespace identifier for this module.";
      }
      leaf-list feature {
        type yang:yang-identifier;
        status deprecated;
        description
          "List of YANG feature names from this module that are
           supported by the server, regardless whether they are
           defined in the module or any included submodule.";
      }
      list deviation {
        key "name revision";
        status deprecated;
        description
          "List of YANG deviation module names and revisions
           used by this server to modify the conformance of
           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.

           The deviation module MUST be present in the 'module'
           list, with the same name and revision values.
           The 'conformance-type' value will be 'implement' for
           the deviation module.";
        uses common-leafs {
          status deprecated;
        }
      }
      leaf conformance-type {
        type enumeration {
          enum implement {
            description
              "Indicates that 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 version 1.1 modules, there is at most one
               module entry with conformance type 'implement' for a
               particular module name, since YANG 1.1 requires that
               at most one revision of a module is implemented.

               For YANG version 1 modules, there SHOULD NOT be more
               than one module entry for a particular module name.";
          }
          enum import {
            description
              "Indicates that 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.";
          }
        }
        mandatory true;
        status deprecated;
        description
          "Indicates the type of conformance the server is claiming
           for the YANG module identified by this entry.";
      }
      list submodule {
        key "name revision";
        status deprecated;
        description
          "Each entry represents one submodule within the
           parent module.";
        uses common-leafs {
          status deprecated;
        }
        uses schema-leaf {
          status deprecated;
        }
      }
    }
  }

  /*
   * Legacy operational state data nodes
   */

  container modules-state {
    config false;
    status deprecated;
    description
      "Contains YANG module monitoring information.";

    leaf module-set-id {
      type string;
      mandatory true;
      status deprecated;
      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-list {
      status deprecated;
    }
  }

  /*
   * Legacy notifications
   */

  notification yang-library-change {
    status deprecated;
    description
      "Generated when the set of modules and submodules supported
       by the server has changed.";
    leaf module-set-id {
      type leafref {
        path "/yanglib:modules-state/yanglib:module-set-id";
      }
      mandatory true;
      status deprecated;
      description
        "Contains the module-set-id value representing the
         set of modules and submodules supported at the server
         at the time the notification is generated.";
    }
  }

}
