ietf-cool-library

This module contains the list of YANG modules and submodules implemented by a CoOL server endpoint. Copyright (c) 2016 IETF Tru...

  • Version: 2016-06-01

    ietf-cool-library@2016-06-01


    
      module ietf-cool-library {
    
        yang-version 1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-cool-library";
    
        prefix coollib;
    
        organization
          "IETF CORE (Constrained RESTful Environments) Working Group";
    
        contact
          "WG Web:   <http://datatracker.ietf.org/wg/core/>
    
         WG List:  <mailto:core@ietf.org>
    
         WG Chair: Carsten Bormann
                   <mailto:cabo@tzi.org>
    
         WG Chair: Jaime Jimenez
                   <mailto:jaime.jimenez@ericsson.com>
    
         Editor:   Michel Veillette
                   <mailto:michel.veillette@trilliantinc.com>";
    
        description
          "This module contains the list of YANG modules and submodules
        implemented by a CoOL server endpoint.
    
         Copyright (c) 2016 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.";
    
        revision "2016-06-01" {
          description "Initial revision.";
          reference
            "RFC XXXX: Contrained YANG Module Library.";
    
        }
    
    
        typedef revision {
          type binary {
            length "4";
          }
          description
            "Revision date encoded as a binary string as follow:
          - First byte = Century
          - Second byte = Year (0 to 99)
          - Third byte = Month (1 = January to 12 = december)
          - Forth byte = Day (1 to 31)";
        }
    
        typedef sid {
          type uint32;
          description
            "Unique identifier assigned to different YANG items
          such as data nodes, RPCs and actions, notifications,
          modules, sub-modules, features and deviations. The SID
          registration process is defined in
          [I-D.somaraju-core-sid].";
        }
    
        identity module-set {
          description
            "Base identity from which shared module-set identifiers
            are derived.";
        }
    
        container modules-state {
          config false;
          description
            "Contain information about the different data models
          implement by a CoOL endpoint.";
          leaf module-set-id {
            type union {
              type uint32;
              type identityref {
                base coollib:module-set;
              }
            }
            mandatory true;
            description
              "Identifier representing the current set of modules
            and submodules listed in the 'module' list. This
            identifier is endpoint-specific when implemented as
            unit32 or shared between multiple endpoints on one
            or multiple servers when implemented as identityref.
            The server MUST change the value of this leaf each
            time the information represented by the 'module'
            list instance changes.";
          }
    
          list module {
            key "sid revision";
            description
              "Each entry represents one revision of one module
             currently supported by the server endpoint.";
            leaf sid {
              type sid;
              mandatory true;
              description
                "SID assigned to this module or submodule.";
            }
    
            leaf revision {
              type revision;
              description
                "Revision date assigned to this module or submodule.
    A zero-length binary string is used if no revision statement
    is present in the YANG module or submodule.";
            }
    
            leaf-list feature {
              type sid;
              description
                "List of YANG features from this module that are
              supported by the server endpoint, regardless whether
              they are defined in the module or any included
              submodule.";
            }
    
            list deviation {
              key "sid revision";
              description
                "List of YANG deviation modules used by this server
              endpoint 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 sid and revision values.
              The 'conformance-type' value will be 'implement' for
              the deviation module.";
              leaf sid {
                type sid;
                mandatory true;
                description
                  "SID assigned to this module or submodule.";
              }
    
              leaf revision {
                type revision;
                description
                  "Revision date assigned to this module or submodule.
    A zero-length binary string is used if no revision statement
    is present in the YANG module or submodule.";
              }
            }  // list deviation
    
            leaf conformance-type {
              type enumeration {
                enum "implement" {
                  value 0;
                  description
                    "Indicates that the server endpoint 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, 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.";
                }
                enum "import" {
                  value 1;
                  description
                    "Indicates that the server endpoint 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 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 endpoint is
              claiming for the YANG module identified by this entry.";
            }
    
            list submodule {
              key "sid revision";
              description
                "Each entry represents one submodule within the
               parent module.";
              leaf sid {
                type sid;
                mandatory true;
                description
                  "SID assigned to this module or submodule.";
              }
    
              leaf revision {
                type revision;
                description
                  "Revision date assigned to this module or submodule.
    A zero-length binary string is used if no revision statement
    is present in the YANG module or submodule.";
              }
            }  // list submodule
          }  // list module
        }  // container modules-state
    
        notification cool-library-change {
          description
            "Generated when the set of modules and submodules supported
          by the server endpoint has changed.";
          leaf module-set-id {
            type leafref {
              path "/coollib:modules-state/coollib:module-set-id";
            }
            mandatory true;
            description
              "Contains the module-set-id value representing the
            set of modules and submodules supported at the server
            endpoint at the time the notification is generated.";
          }
        }  // notification cool-library-change
      }  // module ietf-cool-library
    

© 2023 YumaWorks, Inc. All rights reserved.