org-openroadm-tca

YANG definitions of Threshold Crossing Alert types. Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, ...

  • Version: 2022-05-27

    org-openroadm-tca@2022-05-27


    
      module org-openroadm-tca {
    
        yang-version 1.1;
    
        namespace "http://org/openroadm/tca";
    
        prefix org-openroadm-tca;
    
        import ietf-yang-types {
          prefix yang;
          revision-date "2013-07-15";
        }
        import org-openroadm-common-alarm-pm-types {
          prefix
            org-openroadm-common-alarm-pm-types;
          revision-date "2019-11-29";
        }
        import org-openroadm-pm-types {
          prefix org-openroadm-pm-types;
          revision-date "2022-05-27";
        }
        import org-openroadm-resource-types {
          prefix org-openroadm-resource-types;
          revision-date "2022-03-25";
        }
        import org-openroadm-common-optical-channel-types {
          prefix
            org-openroadm-common-optical-channel-types;
          revision-date "2021-12-10";
        }
        import org-openroadm-otn-common-types {
          prefix
            org-openroadm-otn-common-types;
          revision-date "2021-09-24";
        }
        import org-openroadm-common-types {
          prefix org-openroadm-common-types;
          revision-date "2022-05-27";
        }
        import org-openroadm-interfaces {
          prefix org-openroadm-interfaces;
          revision-date "2019-11-29";
        }
    
        organization "Open ROADM MSA";
    
        contact "OpenROADM.org";
    
        description
          "YANG definitions of Threshold Crossing Alert types.
    
          Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
          All other rights reserved.
    
          Redistribution and use in source and binary forms, with or without modification,
          are permitted provided that the following conditions are met:
    
          * Redistributions of source code must retain the above copyright notice, this
            list of conditions and the following disclaimer.
          * Redistributions in binary form must reproduce the above copyright notice,
            this list of conditions and the following disclaimer in the documentation and/or
            other materials provided with the distribution.
          * Neither the Members of the Open ROADM MSA Agreement nor the names of its
            contributors may be used to endorse or promote products derived from this software
            without specific prior written permission.
    
          THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
          AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
          WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
          IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
          INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
          NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
          OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
          WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
          ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
          POSSIBILITY OF SUCH DAMAGE";
    
        revision "2022-05-27" {
          description "Version 11.1";
        }
    
        revision "2022-03-25" {
          description "Version 11.0";
        }
    
        revision "2021-12-10" {
          description "Version 10.1";
        }
    
        revision "2021-09-24" {
          description "Version 10.0";
        }
    
        revision "2021-05-28" {
          description "Version 9.1";
        }
    
        revision "2020-12-11" {
          description "Version 8.1";
        }
    
        revision "2020-03-27" {
          description "Version 7.0.0";
        }
    
        revision "2019-11-29" {
          description "Version 6.1.0";
        }
    
        revision "2019-05-31" {
          description "Version 5.1.0";
        }
    
        revision "2019-03-29" {
          description "Version 5.0.0";
        }
    
        revision "2018-11-30" {
          description "Version 4.1.0";
        }
    
        revision "2018-09-28" {
          description "Version 4.0.0";
        }
    
        revision "2018-03-30" {
          description "Version 3.0.0";
        }
    
        revision "2017-12-15" {
          description "Version 2.2";
        }
    
        revision "2017-09-29" {
          description "Version 2.1";
        }
    
        revision "2017-08-28" {
          description
            "Version 2.0.2 - added back the missing pmParameterName container";
        }
    
        revision "2017-07-28" {
          description
            "Version 2.0.1 - added revision-date to imports";
        }
    
        revision "2017-06-26" {
          description "Version 2.0";
        }
    
        revision "2016-10-14" {
          description "Version 1.2";
        }
    
    
        feature tca-auto-baselining {
          description
            "This feature indicates that the server supports automatic
           baselining of relative thresholds.";
        }
    
        feature tca-profiles {
          description
            "This feature means that the server supports threshold profiles
           for PM counter thresholds instead of individual threshold
           variables.";
        }
    
        feature no-tca-profiles {
          description
            "Dummy feature to enable a full tree view. The server does not need
           to announce or implement this feature.";
        }
    
        typedef measurement-enum {
          type enumeration {
            enum "absolute" {
              value 1;
              description
                "enum value for absolute thresholding with high, low or both thresholds";
            }
            enum "relative" {
              value 2;
              description
                "enum value for baselined relative thresholding with high/low/both thresholds
           or single symmetrical threshold";
            }
          }
          description
            "typedef for type of a measurement list";
        }
    
        typedef threshold-enum {
          type enumeration {
            enum "high" {
              value 1;
              description
                "enum value for high absolute or relative threshold";
            }
            enum "low" {
              value 2;
              description
                "enum value for low absolute or relative threshold";
            }
            enum "symmetrical" {
              value 3;
              description
                "enum value for symmetric relative threshold";
            }
          }
          description
            "typedef for type of a threshold value";
        }
    
        typedef baseline-state-enum {
          type enumeration {
            enum "not-set" {
              value 1;
              description
                "the baseline value has not yet been set and is undefined";
            }
            enum "manually-set" {
              value 2;
              description
                "the baseline value has been set by the baseline RPC";
            }
            enum "automatically-set" {
              value 3;
              description
                "the baseline value has been automatically set";
            }
          }
          description
            "typedef for baseline-state enum";
        }
    
        notification tca-notification {
          description "TCA notification";
          leaf tca-resource-instance {
            type instance-identifier;
            mandatory true;
            description
              "Retrieves all TCA assciated with the resource instance";
          }
    
          leaf tca-resource-type {
            type org-openroadm-resource-types:resource-type-enum;
            mandatory true;
            description
              "The supported tca-resource type associated with the given resource instance.";
          }
    
          leaf tca-resource-type-extension {
            type string;
            mandatory true;
            description
              "The resource type extension when the type is not defined in the resource-type-enum.";
          }
    
          leaf pm-type {
            type org-openroadm-pm-types:pm-names-enum;
            mandatory true;
            description "PM type";
          }
    
          leaf pm-extension {
            type string;
            mandatory true;
            description "PM extension";
          }
    
          leaf pm-location {
            type org-openroadm-common-alarm-pm-types:location;
            mandatory true;
            description "PM location";
          }
    
          leaf pm-direction {
            type org-openroadm-common-alarm-pm-types:direction;
            mandatory true;
            description "PM direction";
          }
    
          leaf pm-granularity {
            type org-openroadm-pm-types:pm-granularity;
            mandatory true;
            description "PM granularity";
          }
    
          leaf threshold-value {
            type org-openroadm-pm-types:pm-data-type;
            mandatory true;
            description "threshold value";
          }
    
          leaf threshold-type {
            type threshold-enum;
            mandatory true;
            description "Threshold Crossed";
          }
    
          leaf pm-value {
            type org-openroadm-pm-types:pm-data-type;
            mandatory true;
            description "PM Value";
          }
    
          leaf raise-time {
            type yang:date-and-time;
            mandatory true;
            description "PM raise time";
          }
        }  // notification tca-notification
    
        container potential-tca-list {
          description "List of current TCAs.";
          list tca-entry {
            key "tca-resource-type tca-resource-type-extension tca-resource-instance";
            description
              "List of current TCA entries";
            leaf tca-resource-instance {
              type instance-identifier;
              mandatory true;
              description
                "Retrieves all TCA assciated with the resource instance";
            }
    
            leaf tca-resource-type {
              type org-openroadm-resource-types:resource-type-enum;
              mandatory true;
              description
                "The supported tca-resource type associated with the given resource instance.";
            }
    
            leaf tca-resource-type-extension {
              type string;
              mandatory true;
              description
                "The resource type extension when the type is not defined in the resource-type-enum.";
            }
    
            leaf enabled {
              type boolean;
              mandatory true;
              description
                "Enable for the TCA entry";
            }
    
            choice tca-profile-configuration {
              if-feature tca-profiles;
              description
                "Configuration of the profile for this resource instance";
              case direct-configuration {
                leaf tca-configured-profile {
                  type string;
                  mandatory true;
                  description
                    "Name of TCA profile for this resource instance";
                }
    
                leaf-list tca-applicable-profiles {
                  type string;
                  config false;
                  description
                    "List of all profiles applicable to this tca resource instance.
    If the list is empty, all profiles can be assigned to this instance.";
                }
              }  // case direct-configuration
    
              case inherited-configuration {
                leaf tca-active-profile {
                  type string;
                  config false;
                  mandatory true;
                  description
                    "This tca-entry does not allow profile assignment, tca-active profile
    points to the profile name configured in the parent tca-entry.";
                }
    
                leaf tca-profile-rootresource {
                  type instance-identifier;
                  config false;
                  mandatory true;
                  description
                    "This tca-entry does not allow profile assignment, tca-profile-rootresource
    points to the parent tca-entry used to set up the profile for this
    resource instance.";
                }
              }  // case inherited-configuration
            }  // choice tca-profile-configuration
    
            list baseline-entry {
              key "type extension location direction";
              config false;
              description
                "List of baselined PM values";
              leaf type {
                type pm-names-enum;
                mandatory true;
              }
    
              leaf extension {
                type string;
                description
                  "name of parameter, when enum value set to vendorExtension because
    name not found in pm-names-enum";
              }
    
              leaf location {
                type org-openroadm-common-alarm-pm-types:location;
                description "Location PM type";
              }
    
              leaf direction {
                type org-openroadm-common-alarm-pm-types:direction;
                description "Direction PM type";
              }
    
              leaf baseline {
                type org-openroadm-pm-types:pm-data-type;
                config false;
                mandatory true;
                description "Baselined value";
              }
    
              leaf baseline-state {
                type baseline-state-enum;
                config false;
                mandatory true;
                description
                  "State of baselined value";
              }
    
              leaf baseline-time {
                when
                  "../baseline-state != 'not-set'";
                type yang:date-and-time;
                config false;
                description
                  "date-time of last baseline setting";
              }
            }  // list baseline-entry
    
            list pm-entry {
              if-feature no-tca-profiles or not tca-profiles;
              key "type extension location direction";
              description "List of PM entries";
              leaf type {
                type pm-names-enum;
                mandatory true;
              }
    
              leaf extension {
                type string;
                description
                  "name of parameter, when enum value set to vendorExtension because
    name not found in pm-names-enum";
              }
    
              leaf location {
                type org-openroadm-common-alarm-pm-types:location;
                description "Location PM type";
              }
    
              leaf direction {
                type org-openroadm-common-alarm-pm-types:direction;
                description "Direction PM type";
              }
    
              leaf measurement-type {
                type measurement-enum;
                default "absolute";
                config false;
                description
                  "Type of the measurement list";
              }
    
              list measurement {
                key "granularity threshold-type";
                description
                  "List for PM measurement";
                leaf granularity {
                  type org-openroadm-pm-types:pm-granularity;
                  description
                    "Granularity for the PM entry";
                }
    
                leaf threshold-type {
                  type threshold-enum;
                  description
                    "Type of the threshold-value";
                }
    
                leaf enabled {
                  type boolean;
                  description
                    "Measurement enabled";
                }
    
                leaf threshold-value {
                  type org-openroadm-pm-types:pm-data-type;
                  mandatory true;
                  description "Threshold value";
                }
    
                leaf threshold-default {
                  type org-openroadm-pm-types:pm-data-type;
                  config false;
                  description
                    "Threshold default value";
                }
              }  // list measurement
            }  // list pm-entry
          }  // list tca-entry
        }  // container potential-tca-list
    
        identity tca-identities {
          description "TCA identities";
        }
    
        identity tca-not-applicable {
          base tca-identities;
          description
            "not applicable type/any rate value.";
        }
    
        typedef tca-if-type-union {
          type union {
            type identityref {
              base org-openroadm-interfaces:interface-type;
            }
            type identityref {
              base tca-identities;
            }
          }
          default "tca-not-applicable";
          description
            "type for defining an interface type.";
        }
    
        typedef tca-if-rate-union {
          type union {
            type identityref {
              base org-openroadm-common-optical-channel-types:optical-rate-identity;
            }
            type identityref {
              base org-openroadm-otn-common-types:otu-rate-identity;
            }
            type identityref {
              base org-openroadm-otn-common-types:odu-rate-identity;
            }
            type uint32;
            type identityref {
              base tca-identities;
            }
          }
          default "tca-not-applicable";
          description
            "type for defining an interface rate.";
        }
    
        container tca-profile-list {
          description "List of TCA profiles";
          list tca-profile-entry {
            key "tca-profile-name";
            description "Single TCA profile";
            leaf tca-profile-name {
              type string;
              mandatory true;
              description
                "key name of profile instance";
            }
    
            leaf tca-profile-description {
              type string;
              mandatory true;
              description
                "description of profile instance";
            }
    
            leaf tca-profile-access {
              type enumeration {
                enum "read" {
                  value 1;
                }
                enum "write" {
                  value 2;
                }
              }
              config false;
              mandatory true;
              description
                "user access rights to profile instance";
            }
    
            list pm-entry {
              key "tca-resource-type tca-resource-type-extension tca-if-type tca-if-rate type extension location direction";
              description
                "entry for single PM counter threshold(s)";
              leaf tca-resource-type {
                type org-openroadm-resource-types:resource-type-enum;
                mandatory true;
                description
                  "The PM resource type associated with the threshold(s)";
              }
    
              leaf tca-resource-type-extension {
                type string;
                mandatory true;
                description
                  "The PM resource type extension when the type is not in resource-type-enum";
              }
    
              leaf tca-if-type {
                type tca-if-type-union;
                mandatory true;
                description
                  "The interface type for interface resources, or tca-not-applicable";
              }
    
              leaf tca-if-rate {
                type tca-if-rate-union;
                mandatory true;
                description
                  "The interface rate for interface resources, or tca-not-applicable";
              }
    
              leaf type {
                type pm-names-enum;
                mandatory true;
              }
    
              leaf extension {
                type string;
                description
                  "name of parameter, when enum value set to vendorExtension because
    name not found in pm-names-enum";
              }
    
              leaf location {
                type org-openroadm-common-alarm-pm-types:location;
                description "Location PM type";
              }
    
              leaf direction {
                type org-openroadm-common-alarm-pm-types:direction;
                description "Direction PM type";
              }
    
              leaf measurement-type {
                type measurement-enum;
                default "absolute";
                config false;
                description
                  "Type of the measurement list";
              }
    
              list measurement {
                key "granularity threshold-type";
                description
                  "threshold value per granularity and threshold-type";
                leaf granularity {
                  type org-openroadm-pm-types:pm-granularity;
                  description
                    "Granularity for the PM entry";
                }
    
                leaf threshold-type {
                  type threshold-enum;
                  description
                    "Threshold enum type";
                }
    
                leaf threshold-access {
                  type enumeration {
                    enum "read" {
                      value 1;
                    }
                    enum "write" {
                      value 2;
                    }
                  }
                  config false;
                  mandatory true;
                  description
                    "user access to threshold value";
                }
    
                leaf enabled {
                  type boolean;
                  description
                    "Measurement enabled";
                }
    
                leaf threshold-value {
                  type org-openroadm-pm-types:pm-data-type;
                  mandatory true;
                  description "Threshold value";
                }
    
                leaf threshold-default {
                  type org-openroadm-pm-types:pm-data-type;
                  config false;
                  description
                    "Threshold default value";
                }
              }  // list measurement
            }  // list pm-entry
          }  // list tca-profile-entry
        }  // container tca-profile-list
    
        rpc tca-set-baseline {
          description
            "RPC sets the baseline value of relative thresholds to the current reading.";
          input {
            leaf tca-resource-instance {
              type instance-identifier;
              mandatory true;
              description
                "Resource instance for which the baseline is being set.";
            }
    
            leaf type {
              type pm-names-enum;
              mandatory true;
            }
    
            leaf extension {
              type string;
              description
                "name of parameter, when enum value set to vendorExtension because
    name not found in pm-names-enum";
            }
    
            leaf location {
              type org-openroadm-common-alarm-pm-types:location;
              description "Location PM type";
            }
    
            leaf direction {
              type org-openroadm-common-alarm-pm-types:direction;
              description "Direction PM type";
            }
          }
    
          output {
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
          }
        }  // rpc tca-set-baseline
      }  // module org-openroadm-tca
    

© 2023 YumaWorks, Inc. All rights reserved.