netconfcentral logo

openconfig-license

HTML

openconfig-license@2020-04-22



  module openconfig-license {

    yang-version 1;

    namespace
      "http://openconfig.net/yang/license";

    prefix oc-license;

    import openconfig-extensions {
      prefix oc-ext;
    }

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    www.openconfig.net";

    description
      "This module defines configuration and operational
    state data for licenses.";

    revision "2020-04-22" {
      description
        "Make license-data a union of a string or binary.";
      reference
        "0.2.0";

    }

    revision "2020-01-07" {
      description "Initial revision";
      reference
        "0.1.0";

    }

    oc-ext:openconfig-version "0.2.0";
    oc-ext:regexp-posix;
    oc-ext:catalog-organization "openconfig";
    oc-ext:origin "openconfig";

    grouping license-config {
      description
        "Configuration data for license";
      leaf license-id {
        type string;
        description
          "License ID. A string that uniquelly identifies the license. The
         platform should list all the licenses it supports being activated.";
      }

      leaf license-data {
        type union {
          type binary;
          type string;
        }
        description
          "The contents of the licence (if required) - which may be
         supplied as a binary blob, or a simple string value. If this
         value is considered sensitive, it may be read as an empty value.";
      }

      leaf active {
        type boolean;
        default 'false';
        description
          "The activation state of the license.";
      }
    }  // grouping license-config

    grouping license-state {
      description "State data for license";
      leaf description {
        type string;
        description
          "The license description.";
      }

      leaf issue-date {
        type uint64;
        description
          "The date and time at which the license was issued, expressed as the
         number of nanoseconds since the Unix Epoch
         (January 1, 1970, 00:00 UTC).";
      }

      leaf expiration-date {
        type uint64;
        description
          "The date and time at which the license will expire, expressed as the
         number of nanoseconds since the Unix Epoch
         (January 1, 1970, 00:00 UTC). Zero if it does not expire.";
      }

      leaf in-use {
        type boolean;
        description
          "The license is in use. Different from active. This states that the
         license is effectively being used in addition to being active. If
         license for feature X was activated but feature X is not being used,
         then this should be false.";
      }

      leaf expired {
        type boolean;
        description
          "The license has expired.";
      }

      leaf valid {
        type boolean;
        description
          "The license is valid. Can be activated in the system or platform.";
      }
    }  // grouping license-state

    grouping licenses-top {
      description
        "Top-level grouping for licenses.";
      container licenses {
        description
          "Enclosing container for list of licenses";
        list license {
          key "license-id";
          description "List of licenses.";
          leaf license-id {
            type leafref {
              path "../config/license-id";
            }
            description
              "Reference to license id list key";
          }

          container config {
            description
              "Configuration data for license";
            uses license-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for license.";
            uses license-config;

            uses license-state;
          }  // container state
        }  // list license
      }  // container licenses
    }  // grouping licenses-top

    grouping license-top {
      description
        "Top-level for the license model";
      container license {
        description
          "Container for license model";
        uses licenses-top;
      }  // container license
    }  // grouping license-top
  }  // module openconfig-license

Summary

  
  
Organization OpenConfig working group
  
Module openconfig-license
Version 2020-04-22
File openconfig-license.yang
  
Prefix oc-license
Namespace http://openconfig.net/yang/license
  
Cooked /cookedmodules/openconfig-license/2020-04-22
YANG /src/openconfig-license@2020-04-22.yang
XSD /xsd/openconfig-license@2020-04-22.xsd
  
Abstract This module defines configuration and operational state data for licenses.
  
Contact
OpenConfig working group
www.openconfig.net

Description

 
This module defines configuration and operational
state data for licenses.

Groupings

Grouping Objects Abstract
license-config license-id license-data active Configuration data for license
license-state description issue-date expiration-date in-use expired valid State data for license
license-top license Top-level for the license model
licenses-top licenses Top-level grouping for licenses.