netconfcentral logo

openconfig-platform

HTML

openconfig-platform@2019-04-16



  module openconfig-platform {

    yang-version 1;

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

    prefix oc-platform;

    import openconfig-platform-types {
      prefix oc-platform-types;
    }
    import openconfig-extensions {
      prefix oc-ext;
    }
    import openconfig-alarm-types {
      prefix oc-alarm-types;
    }
    import openconfig-yang-types {
      prefix oc-yang;
    }

    organization "OpenConfig working group";

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

    description
      "This module defines a data model for representing a system
component inventory, which can include hardware or software
elements arranged in an arbitrary structure. The primary
relationship supported by the model is containment, e.g.,
components containing subcomponents.

It is expected that this model reflects every field replacable
unit on the device at a minimum (i.e., additional information
may be supplied about non-replacable components).

Every element in the inventory is termed a 'component' with each
component expected to have a unique name and type, and optionally
a unique system-assigned identifier and FRU number.  The
uniqueness is guaranteed by the system within the device.

Components may have properties defined by the system that are
modeled as a list of key-value pairs. These may or may not be
user-configurable.  The model provides a flag for the system
to optionally indicate which properties are user configurable.

Each component also has a list of 'subcomponents' which are
references to other components. Appearance in a list of
subcomponents indicates a containment relationship as described
above.  For example, a linecard component may have a list of
references to port components that reside on the linecard.

This schema is generic to allow devices to express their own
platform-specific structure.  It may be augmented by additional
component type-specific schemas that provide a common structure
for well-known component types.  In these cases, the system is
expected to populate the common component schema, and may
optionally also represent the component and its properties in the
generic structure.

The properties for each component may include dynamic values,
e.g., in the 'state' part of the schema.  For example, a CPU
component may report its utilization, temperature, or other
physical properties.  The intent is to capture all platform-
specific physical data in one location, including inventory
(presence or absence of a component) and state (physical
attributes or status).";

    revision "2019-04-16" {
      description
        "Fix bug in parent path reference";
      reference
        "0.12.2";

    }

    revision "2018-11-21" {
      description
        "Add OpenConfig module metadata extensions.";
      reference
        "0.12.1";

    }

    revision "2018-06-29" {
      description
        "Added location description for components";
      reference
        "0.12.0";

    }

    revision "2018-06-03" {
      description
        "Added parent reference, empty flag and preconfiguration
for components";
      reference
        "0.11.0";

    }

    revision "2018-04-20" {
      description
        "Added new per-component state data: mfg-date and removable";
      reference
        "0.10.0";

    }

    revision "2018-01-30" {
      description
        "Amended approach for modelling CPU - rather than having
a local CPU utilisation state variable, a component with
a CPU should create a subcomponent of type CPU to report
statistics.";
      reference
        "0.9.0";

    }

    revision "2018-01-16" {
      description
        "Added new per-component common data; add temp alarm;
moved hardware-port reference to port model";
      reference
        "0.8.0";

    }

    revision "2017-12-14" {
      description
        "Added anchor containers for component data, added new
component types";
      reference
        "0.7.0";

    }

    revision "2017-08-16" {
      description
        "Added power state enumerated type";
      reference
        "0.6.0";

    }

    revision "2016-12-22" {
      description
        "Added temperature state variable to component";
      reference
        "0.5.0";

    }

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

    grouping platform-component-properties-config {
      description
        "System-defined configuration data for component properties";
      leaf name {
        type string;
        description
          "System-supplied name of the property -- this is typically
non-configurable";
      }

      leaf value {
        type union {
          type string;
          type boolean;
          type int64;
          type uint64;
          type decimal64 {
            fraction-digits 2;
          }
        }
        description
          "Property values can take on a variety of types.  Signed and
unsigned integer types may be provided in smaller sizes,
e.g., int8, uint16, etc.";
      }
    }  // grouping platform-component-properties-config

    grouping platform-component-properties-state {
      description
        "Operational state data for component properties";
      leaf configurable {
        type boolean;
        description
          "Indication whether the property is user-configurable";
      }
    }  // grouping platform-component-properties-state

    grouping platform-component-properties-top {
      description "Top-level grouping ";
      container properties {
        description "Enclosing container ";
        list property {
          key "name";
          description
            "List of system properties for the component";
          leaf name {
            type leafref {
              path "../config/name";
            }
            description
              "Reference to the property name.";
          }

          container config {
            description
              "Configuration data for each property";
            uses platform-component-properties-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for each property";
            uses platform-component-properties-config;

            uses platform-component-properties-state;
          }  // container state
        }  // list property
      }  // container properties
    }  // grouping platform-component-properties-top

    grouping platform-subcomponent-ref-config {
      description
        "Configuration data for subcomponent references";
      leaf name {
        type leafref {
          path
            "../../../../../component/config/name";
        }
        description
          "Reference to the name of the subcomponent";
      }
    }  // grouping platform-subcomponent-ref-config

    grouping platform-subcomponent-ref-state {
      description
        "Operational state data for subcomponent references";
    }  // grouping platform-subcomponent-ref-state

    grouping platform-subcomponent-ref-top {
      description
        "Top-level grouping for list of subcomponent references";
      container subcomponents {
        description
          "Enclosing container for subcomponent references";
        list subcomponent {
          key "name";
          description
            "List of subcomponent references";
          leaf name {
            type leafref {
              path "../config/name";
            }
            description
              "Reference to the name list key";
          }

          container config {
            description
              "Configuration data for the subcomponent";
            uses platform-subcomponent-ref-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for the subcomponent";
            uses platform-subcomponent-ref-config;

            uses platform-subcomponent-ref-state;
          }  // container state
        }  // list subcomponent
      }  // container subcomponents
    }  // grouping platform-subcomponent-ref-top

    grouping platform-component-config {
      description
        "Configuration data for components";
      leaf name {
        type string;
        description
          "Device name for the component -- this may not be a
configurable parameter on many implementations.  Where
component preconfiguration is supported, for example,
the component name may be configurable.";
      }
    }  // grouping platform-component-config

    grouping platform-component-state {
      description
        "Operational state data for device components.";
      leaf type {
        type union {
          type identityref {
            base oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT;
          }
          type identityref {
            base oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT;
          }
        }
        description
          "Type of component as identified by the system";
      }

      leaf id {
        type string;
        description
          "Unique identifier assigned by the system for the
component";
      }

      leaf location {
        type string;
        description
          "System-supplied description of the location of the
component within the system. This could be a bay position,
slot number, socket location, etc. For component types that
have an explicit slot-id attribute, such as linecards, the
system should populate the more specific slot-id.";
      }

      leaf description {
        type string;
        description
          "System-supplied description of the component";
      }

      leaf mfg-name {
        type string;
        description
          "System-supplied identifier for the manufacturer of the
component.  This data is particularly useful when a
component manufacturer is different than the overall
device vendor.";
      }

      leaf mfg-date {
        type oc-yang:date;
        description
          "System-supplied representation of the component's
manufacturing date.";
      }

      leaf hardware-version {
        type string;
        description
          "For hardware components, this is the hardware revision of
the component.";
      }

      leaf firmware-version {
        type string;
        description
          "For hardware components, this is the version of associated
firmware that is running on the component, if applicable.";
      }

      leaf software-version {
        type string;
        description
          "For software components such as operating system or other
software module, this is the version of the currently
running software.";
      }

      leaf serial-no {
        type string;
        description
          "System-assigned serial number of the component.";
      }

      leaf part-no {
        type string;
        description
          "System-assigned part number for the component.  This should
be present in particular if the component is also an FRU
(field replaceable unit)";
      }

      leaf removable {
        type boolean;
        description
          "If true, this component is removable or is a field
replaceable unit";
      }

      leaf oper-status {
        type identityref {
          base oc-platform-types:COMPONENT_OPER_STATUS;
        }
        description
          "If applicable, this reports the current operational status
of the component.";
      }

      leaf empty {
        type boolean;
        default "false";
        description
          "The empty leaf may be used by the device to indicate that a
component position exists but is not populated.  Using this
flag, it is possible for the management system to learn how
many positions are available (e.g., occupied vs. empty
linecard slots in a chassis).";
      }

      leaf parent {
        type leafref {
          path
            "../../../component/config/name";
        }
        description
          "Reference to the name of the parent component.  Note that
this reference must be kept synchronized with the
corresponding subcomponent reference from the parent
component.";
      }
    }  // grouping platform-component-state

    grouping platform-component-temp-alarm-state {
      description
        "Temperature alarm data for platform components";
      leaf alarm-status {
        type boolean;
        description
          "A value of true indicates the alarm has been raised or
asserted.  The value should be false when the alarm is
cleared.";
      }

      leaf alarm-threshold {
        type uint32;
        description
          "The threshold value that was crossed for this alarm.";
      }

      leaf alarm-severity {
        type identityref {
          base oc-alarm-types:OPENCONFIG_ALARM_SEVERITY;
        }
        description
          "The severity of the current alarm.";
      }
    }  // grouping platform-component-temp-alarm-state

    grouping platform-component-power-state {
      description
        "Power-related operational state for device components.";
      leaf allocated-power {
        type uint32;
        units "watts";
        description
          "Power allocated by the system for the component.";
      }

      leaf used-power {
        type uint32;
        units "watts";
        description
          "Actual power used by the component.";
      }
    }  // grouping platform-component-power-state

    grouping platform-component-temp-state {
      description
        "Temperature state data for device components";
      container temperature {
        description
          "Temperature in degrees Celsius of the component. Values include
the instantaneous, average, minimum, and maximum statistics. If
avg/min/max statistics are not supported, the target is expected
to just supply the instant value";
        uses oc-platform-types:avg-min-max-instant-stats-precision1-celsius;

        uses platform-component-temp-alarm-state;
      }  // container temperature
    }  // grouping platform-component-temp-state

    grouping platform-component-memory-state {
      description
        "Per-component memory statistics";
      container memory {
        description
          "For components that have associated memory, these values
report information about available and utilized memory.";
        leaf available {
          type uint64;
          units "bytes";
          description
            "The available memory physically installed, or logically
allocated to the component.";
        }

        leaf utilized {
          type uint64;
          units "bytes";
          description
            "The memory currently in use by processes running on
the component, not considering reserved memory that is
not available for use.";
        }
      }  // container memory
    }  // grouping platform-component-memory-state

    grouping platform-anchors-top {
      description
        "This grouping is used to add containers for components that
are common across systems, but do not have a defined schema
within the openconfig-platform module.  Containers should be
added to this grouping for components that are expected to
exist in multiple systems, with corresponding modules
augmenting the config/state containers directly.";
      container chassis {
        description
          "Data for chassis components";
        container config {
          description
            "Configuration data for chassis components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for chassis components";
        }  // container state
      }  // container chassis

      container port {
        description
          "Data for physical port components";
        container config {
          description
            "Configuration data for physical port components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for physical port components";
        }  // container state
      }  // container port

      container power-supply {
        description
          "Data for power supply components";
        container config {
          description
            "Configuration data for power supply components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for power supply components";
        }  // container state
      }  // container power-supply

      container fan {
        description
          "Data for fan components";
        container config {
          description
            "Configuration data for fan components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for fan components";
        }  // container state
      }  // container fan

      container fabric {
        description
          "Data for fabric components";
        container config {
          description
            "Configuration data for fabric components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for fabric components";
        }  // container state
      }  // container fabric

      container storage {
        description
          "Data for storage components";
        container config {
          description
            "Configuration data for storage components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for storage components";
        }  // container state
      }  // container storage

      container cpu {
        description
          "Data for cpu components";
        container config {
          description
            "Configuration data for cpu components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for cpu components";
        }  // container state
      }  // container cpu

      container integrated-circuit {
        description
          "Data for chip components, such as ASIC, NPUs, etc.";
        container config {
          description
            "Configuration data for chip components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for chip components";
        }  // container state
      }  // container integrated-circuit

      container backplane {
        description
          "Data for backplane components";
        container config {
          description
            "Configuration data for backplane components";
        }  // container config

        container state {
          config false;
          description
            "Operational state data for backplane components";
        }  // container state
      }  // container backplane
    }  // grouping platform-anchors-top

    grouping platform-component-top {
      description
        "Top-level grouping for components in the device inventory";
      container components {
        description
          "Enclosing container for the components in the system.";
        list component {
          key "name";
          description
            "List of components, keyed by component name.";
          leaf name {
            type leafref {
              path "../config/name";
            }
            description
              "References the component name";
          }

          container config {
            description
              "Configuration data for each component";
            uses platform-component-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for each component";
            uses platform-component-config;

            uses platform-component-state;

            uses platform-component-temp-state;

            uses platform-component-memory-state;

            uses platform-component-power-state;
          }  // container state

          uses platform-component-properties-top;

          uses platform-subcomponent-ref-top;

          uses platform-anchors-top;
        }  // list component
      }  // container components
    }  // grouping platform-component-top

    uses platform-component-top;
  }  // module openconfig-platform

Summary

  
  
Organization OpenConfig working group
  
Module openconfig-platform
Version 2019-04-16
File openconfig-platform.yang
  
Prefix oc-platform
Namespace http://openconfig.net/yang/platform
  
Cooked /cookedmodules/openconfig-platform/2019-04-16
YANG /src/openconfig-platform@2019-04-16.yang
XSD /xsd/openconfig-platform@2019-04-16.xsd
  
Abstract This module defines a data model for representing a system component inventory, which can include hardware or software elements ...
  
Contact
OpenConfig working group
www.openconfig.net

Description

 
This module defines a data model for representing a system
component inventory, which can include hardware or software
elements arranged in an arbitrary structure. The primary
relationship supported by the model is containment, e.g.,
components containing subcomponents.

It is expected that this model reflects every field replacable
unit on the device at a minimum (i.e., additional information
may be supplied about non-replacable components).

Every element in the inventory is termed a 'component' with each
component expected to have a unique name and type, and optionally
a unique system-assigned identifier and FRU number.  The
uniqueness is guaranteed by the system within the device.

Components may have properties defined by the system that are
modeled as a list of key-value pairs. These may or may not be
user-configurable.  The model provides a flag for the system
to optionally indicate which properties are user configurable.

Each component also has a list of 'subcomponents' which are
references to other components. Appearance in a list of
subcomponents indicates a containment relationship as described
above.  For example, a linecard component may have a list of
references to port components that reside on the linecard.

This schema is generic to allow devices to express their own
platform-specific structure.  It may be augmented by additional
component type-specific schemas that provide a common structure
for well-known component types.  In these cases, the system is
expected to populate the common component schema, and may
optionally also represent the component and its properties in the
generic structure.

The properties for each component may include dynamic values,
e.g., in the 'state' part of the schema.  For example, a CPU
component may report its utilization, temperature, or other
physical properties.  The intent is to capture all platform-
specific physical data in one location, including inventory
(presence or absence of a component) and state (physical
attributes or status).

Groupings

Grouping Objects Abstract
platform-anchors-top chassis port power-supply fan fabric storage cpu integrated-circuit backplane This grouping is used to add containers for components that are common across systems, but do not have a defined schema within the openconfig-platform module. Containers should be added to this grouping for components that are expected to exist in multip...
platform-component-config name Configuration data for components
platform-component-memory-state memory Per-component memory statistics
platform-component-power-state allocated-power used-power Power-related operational state for device components.
platform-component-properties-config name value System-defined configuration data for component properties
platform-component-properties-state configurable Operational state data for component properties
platform-component-properties-top properties Top-level grouping
platform-component-state type id location description mfg-name mfg-date hardware-version firmware-version software-version serial-no part-no removable oper-status empty parent Operational state data for device components.
platform-component-temp-alarm-state alarm-status alarm-threshold alarm-severity Temperature alarm data for platform components
platform-component-temp-state temperature Temperature state data for device components
platform-component-top components Top-level grouping for components in the device inventory
platform-subcomponent-ref-config name Configuration data for subcomponent references
platform-subcomponent-ref-state Operational state data for subcomponent references
platform-subcomponent-ref-top subcomponents Top-level grouping for list of subcomponent references

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
components container Enclosing container for the components in the system.
   component list List of components, keyed by component name.
      backplane container Data for backplane components
         config container Configuration data for backplane components
         state container Operational state data for backplane components
      chassis container Data for chassis components
         config container Configuration data for chassis components
         state container Operational state data for chassis components
      config container Configuration data for each component
         name leaf Device name for the component -- this may not be a configurable parameter on many implementations. Where component preconfiguration is supported, for example, the component name may be configurable.
      cpu container Data for cpu components
         config container Configuration data for cpu components
         state container Operational state data for cpu components
      fabric container Data for fabric components
         config container Configuration data for fabric components
         state container Operational state data for fabric components
      fan container Data for fan components
         config container Configuration data for fan components
         state container Operational state data for fan components
      integrated-circuit container Data for chip components, such as ASIC, NPUs, etc.
         config container Configuration data for chip components
         state container Operational state data for chip components
      name leaf References the component name
      port container Data for physical port components
         config container Configuration data for physical port components
         state container Operational state data for physical port components
      power-supply container Data for power supply components
         config container Configuration data for power supply components
         state container Operational state data for power supply components
      properties container Enclosing container
         property list List of system properties for the component
            config container Configuration data for each property
               name leaf System-supplied name of the property -- this is typically non-configurable
               value leaf Property values can take on a variety of types. Signed and unsigned integer types may be provided in smaller sizes, e.g., int8, uint16, etc.
            name leaf Reference to the property name.
            state container Operational state data for each property
               configurable leaf Indication whether the property is user-configurable
               name leaf System-supplied name of the property -- this is typically non-configurable
               value leaf Property values can take on a variety of types. Signed and unsigned integer types may be provided in smaller sizes, e.g., int8, uint16, etc.
      state container Operational state data for each component
         allocated-power leaf Power allocated by the system for the component.
         description leaf System-supplied description of the component
         empty leaf The empty leaf may be used by the device to indicate that a component position exists but is not populated. Using this flag, it is possible for the management system to learn how many positions are available (e.g., occupied vs. empty linecard slots in a ...
         firmware-version leaf For hardware components, this is the version of associated firmware that is running on the component, if applicable.
         hardware-version leaf For hardware components, this is the hardware revision of the component.
         id leaf Unique identifier assigned by the system for the component
         location leaf System-supplied description of the location of the component within the system. This could be a bay position, slot number, socket location, etc. For component types that have an explicit slot-id attribute, such as linecards, the system should populate the...
         memory container For components that have associated memory, these values report information about available and utilized memory.
            available leaf The available memory physically installed, or logically allocated to the component.
            utilized leaf The memory currently in use by processes running on the component, not considering reserved memory that is not available for use.
         mfg-date leaf System-supplied representation of the component's manufacturing date.
         mfg-name leaf System-supplied identifier for the manufacturer of the component. This data is particularly useful when a component manufacturer is different than the overall device vendor.
         name leaf Device name for the component -- this may not be a configurable parameter on many implementations. Where component preconfiguration is supported, for example, the component name may be configurable.
         oper-status leaf If applicable, this reports the current operational status of the component.
         parent leaf Reference to the name of the parent component. Note that this reference must be kept synchronized with the corresponding subcomponent reference from the parent component.
         part-no leaf System-assigned part number for the component. This should be present in particular if the component is also an FRU (field replaceable unit)
         removable leaf If true, this component is removable or is a field replaceable unit
         serial-no leaf System-assigned serial number of the component.
         software-version leaf For software components such as operating system or other software module, this is the version of the currently running software.
         temperature container Temperature in degrees Celsius of the component. Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is expected to just supply the instant value
            alarm-severity leaf The severity of the current alarm.
            alarm-status leaf A value of true indicates the alarm has been raised or asserted. The value should be false when the alarm is cleared.
            alarm-threshold leaf The threshold value that was crossed for this alarm.
            avg leaf The arithmetic mean value of the statistic over the sampling period.
            instant leaf The instantaneous value of the statistic.
            interval leaf If supported by the system, this reports the time interval over which the min/max/average statistics are computed by the system.
            max leaf The maximum value of the statistic over the sampling period
            max-time leaf The absolute time at which the maximum value occurred. The value is the timestamp in nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
            min leaf The minimum value of the statistic over the sampling period
            min-time leaf The absolute time at which the minimum value occurred. The value is the timestamp in nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
         type leaf Type of component as identified by the system
         used-power leaf Actual power used by the component.
      storage container Data for storage components
         config container Configuration data for storage components
         state container Operational state data for storage components
      subcomponents container Enclosing container for subcomponent references
         subcomponent list List of subcomponent references
            config container Configuration data for the subcomponent
               name leaf Reference to the name of the subcomponent
            name leaf Reference to the name list key
            state container Operational state data for the subcomponent
               name leaf Reference to the name of the subcomponent