Cisco-IOS-XE-mdt-cfg

This module contains a collection of YANG definitions for configuration of streaming telemetry. Copyright (c) 2016-2020 by Cisco...

  • Version: 2020-11-01

    Cisco-IOS-XE-mdt-cfg@2020-11-01


    
      module Cisco-IOS-XE-mdt-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg";
    
        prefix mdt-cfg;
    
        import Cisco-IOS-XE-mdt-common-defs {
          prefix mdt-common-defs;
        }
        import cisco-semver {
          prefix cisco-semver;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
    
         Postal: 170 W Tasman Drive
         San Jose, CA 95134
    
         Tel: +1 1800 553-NETS
    
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG
         definitions for configuration of streaming telemetry.
         Copyright (c) 2016-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-11-01" {
          description
            "- Support for named receivers
           - Deprecated legacy receivers";
          reference
            "3.4.0";
    
        }
    
        revision "2020-03-01" {
          description
            "Support for Histogram transform operation";
          reference
            "3.3.0";
    
        }
    
        revision "2019-05-01" {
          description
            "- Support for new transform operations
           - Flattening the structure of new transform operations
           - Support for Division transform operation
           - Added semantic version";
          reference
            "3.2.0";
    
        }
    
        revision "2018-10-29" {
          description
            "Cleaned up spelling errors in descriptions.";
          reference
            "3.1.0";
    
        }
    
        revision "2018-08-24" {
          description
            "Make a receiver's protocol mandatory and
           remove its default.";
          reference
            "3.0.0";
    
        }
    
        revision "2018-02-12" {
          description
            "Transform support for Native stream.";
          reference
            "2.1.0";
    
        }
    
        revision "2018-02-07" {
          description "Fix top level name.";
          reference
            "2.0.0";
    
        }
    
        revision "2017-09-20" {
          description
            "TLS support for Native stream";
          reference
            "1.1.0";
    
        }
    
        revision "2017-03-02" {
          description "Initial revision";
          reference
            "1.0.0";
    
        }
    
        cisco-semver:module-version "3.4.0";
        cisco-semver:module-version "3.3.0";
        cisco-semver:module-version "3.2.0";
        cisco-semver:module-version "3.1.0";
        cisco-semver:module-version "3.0.0";
        cisco-semver:module-version "2.1.0";
        cisco-semver:module-version "2.0.0";
        cisco-semver:module-version "1.1.0";
        cisco-semver:module-version "1.0.0";
    
        typedef mdt-xfrm-attr-type {
          type enumeration {
            enum "mdt-xfrm-attr-none" {
              value 0;
              description
                "Indicates that no filter has been
               specified.";
            }
            enum "mandatory" {
              value 1;
              description
                "Indicates that mandatory filter is set.";
            }
            enum "primary" {
              value 2;
              description
                "Indicates that primary filter is set.";
            }
          }
          description
            "Types of subscription transform attribute type";
        }
    
        typedef mdt-xfrm-op-type {
          type enumeration {
            enum "sub-record" {
              value 0;
              description
                "Indicates that operation type is
               sub-record";
            }
            enum "delta" {
              value 1;
              description
                "Indicates that operation type is delta";
            }
          }
          description
            "Types of subscription transform operations.";
        }
    
        typedef mdt-xfrm-logic-op {
          type enumeration {
            enum "mdt-xfrm-lop-none" {
              value 0;
              description
                "Indicates that no logical operation
               is selected";
            }
            enum "and" {
              value 1;
              description
                "Indicates that logical operation
               is 'and' ";
            }
            enum "or" {
              value 2;
              description
                "Indicates that logical operation is 'or' ";
            }
          }
          description
            "Types of subscription transform
           logical operations.";
        }
    
        typedef mdt-xfrm-operator {
          type enumeration {
            enum "operator-none" {
              value 0;
              description "Default operator";
            }
            enum "eq" {
              value 1;
              description "Equal operator";
            }
            enum "ne" {
              value 2;
              description "Not equal operator";
            }
            enum "gt" {
              value 3;
              description
                "Greater than operator";
            }
            enum "ge" {
              value 4;
              description
                "Greater than or equal operator";
            }
            enum "lt" {
              value 5;
              description "Less than operator";
            }
            enum "le" {
              value 6;
              description
                "Less than or equal operator";
            }
          }
          description "Supported operator types";
        }
    
        typedef mdt-xfrm-condition-check-with {
          type enumeration {
            enum
              "condition-check-wth-argument-value" {
              value 0;
              description
                "Indicates that conditional check should happen with provided value";
            }
            enum
              "condition-check-wth-previous-value" {
              value 1;
              description
                "Indicates that conditional check should happen with
               previous value of the field";
            }
          }
          description
            "Specifies the kind of value
           this condition check should happen with.
           This way conditional operation can compare with either the
           user provided value or the previously cached value of
           the same field";
        }
    
        typedef mdt-xfrm-operation-type {
          type enumeration {
            enum "xfrm-oper-none" {
              value 0;
              description
                "Indicates operation has not been specified.";
            }
            enum "xfrm-oper-mean" {
              value 1;
              description
                "Mean of the cached values";
            }
            enum "xfrm-oper-mean-window" {
              value 2;
              description
                "Mean over a specified window";
            }
            enum "xfrm-oper-rate" {
              value 3;
              description
                "Rate of change in value";
            }
            enum "xfrm-oper-ewma" {
              value 4;
              description
                "Exponentially Weighted Moving Average";
            }
            enum "xfrm-oper-delta" {
              value 5;
              description
                "Delta with previously known value";
            }
            enum "xfrm-oper-div" {
              value 6;
              description "Division operation";
            }
            enum "xfrm-oper-div-of-delta" {
              value 7;
              description
                "Division operation is performed on Delta of field values";
            }
            enum "xfrm-oper-hist" {
              value 8;
              description
                "Histogram operation is performed over field values";
            }
          }
          description
            "Operation to be performed";
        }
    
        typedef mdt-xfrm-window-size-type {
          type enumeration {
            enum "time-based" {
              value 0;
              description "Time based windowing";
            }
            enum "count-based" {
              value 1;
              description
                "Count based windowing";
            }
          }
          description
            "Type of window size (eg. time, count based)";
        }
    
        typedef mdt-xfrm-window-segment-type {
          type enumeration {
            enum "sliding-window" {
              value 0;
              description "Sliding window";
            }
            enum "tumbling-window" {
              value 1;
              description "Tumbling window";
            }
          }
          description
            "Type of window segment (eg. sliding, tumbling etc)";
        }
    
        typedef mdt-operand-ref-type {
          type enumeration {
            enum "operand-ref-const" {
              value 0;
              description
                "Indicates that the operand is a constant";
            }
            enum "operand-ref-field" {
              value 1;
              description
                "Indicates that the operand is the value of the specified field";
            }
          }
          description
            "Type operand reference
           (eg whether it is constant, other field etc)";
        }
    
        typedef mdt-div-operand-role {
          type enumeration {
            enum "operand-role-dividend" {
              value 0;
              description
                "Indicates that the operand is a dividend";
            }
            enum "operand-role-divisor" {
              value 1;
              description
                "Indicates that the operand is a divisor";
            }
          }
          description
            "Role of operand in division operation";
        }
    
        typedef mdt-xfrm-alert-type {
          type enumeration {
            enum "noop" {
              value 0;
              description
                "No alert based operation";
            }
            enum "limit-threshold" {
              value 1;
              description
                "Limit threshold based alerting";
            }
          }
          description "Type of alert";
        }
    
        typedef mdt-xfrm-alert-size-type {
          type enumeration {
            enum "duration" {
              value 0;
              description "Time based alerting";
            }
            enum "frequency" {
              value 1;
              description "Count based alerting";
            }
          }
          description
            "Type of alerting (eg. time, count based)";
        }
    
        grouping mdt-xfrm-op-event-type {
          description
            "Types of subscription
           transform operation event type.";
          leaf onchange {
            type boolean;
            description
              "Indicates that onchange filter is set.";
          }
        }  // grouping mdt-xfrm-op-event-type
    
        grouping mdt-xfrm-field-condition {
          description
            "Per field filter condition (e.g. f1 gt '5')";
          leaf operator {
            type mdt-xfrm-operator;
            description "Type of operator";
          }
    
          leaf value {
            type string;
            description
              "Field value to operate on";
          }
    
          leaf check-with {
            type mdt-xfrm-condition-check-with;
            description
              "Specifies the kind of value
             this condition check should happen with.
             This way conditional operation can compare with either the
             user provided value or the previously cached value of
             the same field";
          }
        }  // grouping mdt-xfrm-field-condition
    
        grouping mdt-xfrm-input-field {
          description
            "Configuration information for transform input uri table fields.";
          leaf field {
            type string;
            description
              "Transform input URI table field name";
          }
        }  // grouping mdt-xfrm-input-field
    
        grouping mdt-xfrm-input {
          description
            "Configuration information for transform input.";
          leaf table-name {
            type string;
            description
              "Transform input URI table name";
          }
    
          leaf uri {
            type string;
            description
              "Transform input URI full-path";
          }
    
          list mdt-xfrm-input-field {
            key "field";
            description
              "Transform input URI table fields";
            uses mdt-cfg:mdt-xfrm-input-field;
          }  // list mdt-xfrm-input-field
    
          leaf join-key {
            type string;
            description
              "Transform input table join-key";
          }
    
          leaf attr-type {
            type mdt-xfrm-attr-type;
            description
              "Transform input table attribute type
             e.g. table is mandatory for join record";
          }
    
          leaf lop {
            type mdt-xfrm-logic-op;
            description
              "Logical operation with next
             input table event";
          }
    
          leaf key {
            type string;
            description
              "Transform input table key";
          }
        }  // grouping mdt-xfrm-input
    
        grouping mdt-xfrm-operation-window-data {
          description
            "Data specifying Window parameters";
          leaf window-size-type {
            type mdt-xfrm-window-size-type;
            description
              "Type of window size (eg. time, count based)";
          }
    
          leaf window-size {
            type uint32;
            units "centiseconds";
            description
              "Window duration in case of time-based. Count in case of count-based";
          }
    
          leaf window-segment-type {
            type mdt-xfrm-window-segment-type;
            description
              "Type of window segment (eg. sliding, tumbling etc)";
          }
        }  // grouping mdt-xfrm-operation-window-data
    
        grouping mdt-xfrm-operation-ewma-data {
          description
            "Data specifying Exponentially Weighted Moving Average parameters";
          leaf lambda {
            type string;
            description
              "Lambda (weight factor) used in Exponentially Weighted Moving Average calculation";
          }
        }  // grouping mdt-xfrm-operation-ewma-data
    
        grouping mdt-xfrm-op-div-data {
          description
            "Data specifying Division parameters";
          leaf operand-ref-type {
            type mdt-operand-ref-type;
            description
              "Specify whether the operand specified is a constant
             or a filed. If it is field, it's value shall be used
             in division operation";
          }
    
          leaf operand-role {
            type mdt-div-operand-role;
            description
              "Role of operand in division operation";
          }
    
          leaf operand {
            type string;
            description
              "Operand value to be used in division operation. It can be
             either a constant or name of another field";
          }
        }  // grouping mdt-xfrm-op-div-data
    
        grouping mdt-xfrm-op-hist-data {
          description
            "Data specifying Histogram parameters";
          leaf bin-size {
            type uint64;
            description "Specify the bin size";
          }
    
          leaf min {
            type uint64;
            description "Specify the min value";
          }
    
          leaf max {
            type uint64;
            description "Specify the max value";
          }
        }  // grouping mdt-xfrm-op-hist-data
    
        grouping mdt-xfrm-alert-data {
          description
            "Data specifying alerting  parameters";
          leaf alert-type {
            type mdt-xfrm-alert-type;
            description "Type of alert";
          }
    
          leaf alert-size-type {
            type mdt-xfrm-alert-size-type;
            description
              "Window duration in case of time-based. Count in case of count-based";
          }
    
          leaf alert-size {
            type uint32;
            units "centiseconds";
            description
              "Window duration in case of time-based. Count in case of count-based";
          }
        }  // grouping mdt-xfrm-alert-data
    
        grouping mdt-xfrm-op-filter {
          description
            "Configuration information for transform
           operation filters.";
          leaf filter-id {
            type uint32;
            description
              "filters will be evaluated in sequence based
             on filter ID";
          }
    
          leaf field {
            type string;
            description
              "Transform operation filter field name";
          }
    
          container op-event {
            description
              "Transform operation event flag (e.g. onchange)";
            uses mdt-cfg:mdt-xfrm-op-event-type;
          }  // container op-event
    
          leaf lop {
            type mdt-xfrm-logic-op;
            description
              "logical operation with condition";
          }
    
          container condition {
            description
              "Per field condition (e.g. f1 eq 'name')";
            uses mdt-cfg:mdt-xfrm-field-condition;
          }  // container condition
    
          leaf next-lop {
            type mdt-xfrm-logic-op;
            description
              "logical operation with next filter condition";
          }
    
          choice operation-type-choice {
            default "xfrm-oper-none";
            description
              "Operation to be performed on input value";
            case xfrm-oper-none {
              description
                "Indicates operation has not been specified. Value will be passed as-is";
              leaf operation-no-op {
                type boolean;
                default "false";
                description
                  "Indicates operation has not been specified. Value will be passed as-is";
              }
            }  // case xfrm-oper-none
    
            case xfrm-oper-mean {
              description
                "Mean of the cached values";
              leaf operation-mean {
                type empty;
                description
                  "Mean of the cached values";
              }
            }  // case xfrm-oper-mean
    
            case xfrm-oper-mean-window {
              description
                "Mean over a specified window";
              container operation-mean-window {
                description
                  "Data specifying Window parameters";
                uses mdt-cfg:mdt-xfrm-operation-window-data;
              }  // container operation-mean-window
            }  // case xfrm-oper-mean-window
    
            case xfrm-oper-rate {
              description
                "Rate of change in value";
              leaf operation-rate {
                type empty;
                description
                  "Rate of change in value";
              }
            }  // case xfrm-oper-rate
    
            case xfrm-oper-ewma {
              description
                "Exponentially Weighted Moving Average";
              container operation-ewma {
                description
                  "Data specifying Exponentially Weighted Moving Average parameters";
                uses mdt-cfg:mdt-xfrm-operation-ewma-data;
              }  // container operation-ewma
            }  // case xfrm-oper-ewma
    
            case xfrm-oper-delta {
              description
                "Delta with previously known value";
              leaf operation-delta {
                type empty;
                description
                  "Delta with previously known value";
              }
            }  // case xfrm-oper-delta
    
            case xfrm-oper-div {
              description "Division operation";
              container operation-div {
                description
                  "Data specifying Division parameters";
                uses mdt-cfg:mdt-xfrm-op-div-data;
              }  // container operation-div
            }  // case xfrm-oper-div
    
            case xfrm-oper-div-of-delta {
              description
                "Division operation is performed on Delta of field values";
              container operation-div-of-delta {
                description
                  "Data specifying Division of Delta parameters";
                uses mdt-cfg:mdt-xfrm-op-div-data;
              }  // container operation-div-of-delta
            }  // case xfrm-oper-div-of-delta
          }  // choice operation-type-choice
        }  // grouping mdt-xfrm-op-filter
    
        grouping mdt-xfrm-op-field {
          description
            "Configuration information for transform operations";
          leaf field-id {
            type uint32;
            description
              "Transform operation response field-id, part of response record.
             It is used to uniquely identify response record field";
          }
    
          leaf field {
            type string;
            description
              "Subscription transform field name on
             which transform operation is performed";
          }
    
          leaf op-type {
            type mdt-xfrm-op-type;
            description
              "Subscription transform operation type";
          }
    
          leaf name {
            type string;
            description
              "Name of the field to be returned in output";
          }
    
          choice operation-type-choice {
            default "xfrm-oper-none";
            description
              "Operation to be performed on field before output";
            case xfrm-oper-none {
              description
                "Indicates operation has not been specified. Value will be passed as-is";
              leaf operation-no-op {
                type boolean;
                default "false";
                description
                  "Indicates operation has not been specified. Value will be passed as-is";
              }
            }  // case xfrm-oper-none
    
            case xfrm-oper-mean {
              description
                "Mean of the cached values";
              leaf operation-mean {
                type empty;
                description
                  "Mean of the cached values";
              }
            }  // case xfrm-oper-mean
    
            case xfrm-oper-mean-window {
              description
                "Mean over a specified window";
              container operation-mean-window {
                description
                  "Data specifying Window parameters";
                uses mdt-cfg:mdt-xfrm-operation-window-data;
              }  // container operation-mean-window
            }  // case xfrm-oper-mean-window
    
            case xfrm-oper-rate {
              description
                "Rate of change in value";
              leaf operation-rate {
                type empty;
                description
                  "Rate of change in value";
              }
            }  // case xfrm-oper-rate
    
            case xfrm-oper-ewma {
              description
                "Exponentially Weighted Moving Average";
              container operation-ewma {
                description
                  "Data specifying Exponentially Weighted Moving Average parameters";
                uses mdt-cfg:mdt-xfrm-operation-ewma-data;
              }  // container operation-ewma
            }  // case xfrm-oper-ewma
    
            case xfrm-oper-delta {
              description
                "Delta with previously known value";
              leaf operation-delta {
                type empty;
                description
                  "Delta with previously known value";
              }
            }  // case xfrm-oper-delta
    
            case xfrm-oper-div {
              description "Division operation";
              container operation-div {
                description
                  "Data specifying Division parameters";
                uses mdt-cfg:mdt-xfrm-op-div-data;
              }  // container operation-div
            }  // case xfrm-oper-div
    
            case xfrm-oper-div-of-delta {
              description
                "Division operation is performed on Delta of field values";
              container operation-div-of-delta {
                description
                  "Data specifying Division of Delta parameters";
                uses mdt-cfg:mdt-xfrm-op-div-data;
              }  // container operation-div-of-delta
            }  // case xfrm-oper-div-of-delta
    
            case xfrm-oper-hist {
              description
                "Histogram operation is performed field values";
              container operation-hist {
                description
                  "Data specifying Histogram parameters";
                uses mdt-cfg:mdt-xfrm-op-hist-data;
              }  // container operation-hist
            }  // case xfrm-oper-hist
          }  // choice operation-type-choice
        }  // grouping mdt-xfrm-op-field
    
        grouping mdt-xfrm-op {
          description
            "Configuration information for transform operation.";
          leaf id {
            type uint32;
            description
              "Unique transform operation id";
          }
    
          list mdt-xfrm-op-filters {
            key "filter-id";
            description
              "Transform operation filters.
             These are evaluated before performing
             transform action (e.g. sub record)
             on the response record";
            uses mdt-cfg:mdt-xfrm-op-filter;
          }  // list mdt-xfrm-op-filters
    
          list mdt-xfrm-op-fields {
            key "field-id";
            description
              "Transform operation fields.
             Default operation is sub record.
             It is performed on each field";
            uses mdt-cfg:mdt-xfrm-op-field;
          }  // list mdt-xfrm-op-fields
    
          container alert-data {
            description
              "Transform alert data.
             It sets the alerting mechanism";
            uses mdt-cfg:mdt-xfrm-alert-data;
          }  // container alert-data
        }  // grouping mdt-xfrm-op
    
        grouping mdt-xfrm {
          description
            "Configuration information for
           subscription transform.";
          leaf name {
            type string;
            description
              "Unique transform identifier.";
          }
    
          leaf fully-specify {
            type boolean;
            description
              "When fully-specify is set,
             fully-specify field identifier is sent
             in the response record along with field value";
          }
    
          list mdt-xfrm-input {
            key "table-name";
            description
              "Transform input information";
            uses mdt-cfg:mdt-xfrm-input;
          }  // list mdt-xfrm-input
    
          list mdt-xfrm-op {
            key "id";
            description
              "Transform operations information";
            uses mdt-cfg:mdt-xfrm-op;
          }  // list mdt-xfrm-op
        }  // grouping mdt-xfrm
    
        grouping mdt-receiver-name {
          description
            "A named receiver of a subscription.";
          leaf name {
            type string;
            description
              "The name of the receiver.
             Is a key to an entry in the named receivers list indicated
             by rcvr-type string of the parent subscription.";
          }
        }  // grouping mdt-receiver-name
    
        grouping mdt-named-protocol-rcvr {
          description
            "Configuration of a protocol receiver for telemetry data.";
          leaf name {
            type string;
            description "Name of the receiver";
          }
    
          leaf protocol {
            type mdt-common-defs:prot-rcvr-protocol;
            description "Name of the protocol";
          }
    
          leaf profile {
            type string;
            description
              "Optional profile used by the receiver.";
          }
    
          container host {
            description "Host type";
            uses mdt-common-defs:host;
          }  // container host
    
          leaf port {
            type uint16;
            description "Host port";
          }
        }  // grouping mdt-named-protocol-rcvr
    
        grouping mdt-subscription-cnfg {
          description
            "Subscription configuration information.";
          leaf subscription-id {
            type uint32 {
              range "0 .. 2147483647";
            }
            description
              "Unique subscription identifier.";
          }
    
          container base {
            description
              "Common subscription information.";
            uses mdt-common-defs:mdt-subscription-base;
          }  // container base
    
          list mdt-receivers {
            must
              "../base/rcvr-type = 'rcvr-type-unspecified'" {
              error-message
                "Legacy receivers are not allowed with rcvr-type";
              error-app-tag "must-violation";
            }
            must
              '(count(../mdt-receiver-names/mdt-receiver-name) = 0)' {
              error-message
                "Legacy receivers are not allowed with receiver name";
              error-app-tag "must-violation";
            }
            key "address port";
            status deprecated;
            description
              "Configuration of receivers of configured
             subscriptions.
             Use of this is deprecated. Use mdt-receiver-names instead.";
            uses mdt-cfg:mdt-receiver-cnfg {
              status deprecated;
            }
    
            uses mdt-common-defs:mdt-receiver-id;
          }  // list mdt-receivers
    
          container mdt-receiver-names {
            description
              "List of configured receiver names.";
            list mdt-receiver-name {
              must
                '(count(../../mdt-receivers) = 0)' {
                error-message
                  "Named receivers are not allowed with legacy receiver";
                error-app-tag "must-violation";
              }
              key "name";
              description
                "A configured receiver of this subscription.
               Refers to an entry in the global named receivers list indicated
               by rcvr-type string of the parent subscription.
               Receivers of this type cannot be used with the deprecated
               mdt-receivers type.";
              uses mdt-cfg:mdt-receiver-name;
            }  // list mdt-receiver-name
          }  // container mdt-receiver-names
        }  // grouping mdt-subscription-cnfg
    
        grouping mdt-receiver-cnfg {
          status deprecated;
          description
            "Configuration information for subscription receiver.
           This is deprecated. Use named receivers instead.";
          leaf protocol {
            type string;
            mandatory true;
            description
              "Receiver transport protocol.";
          }
    
          leaf profile {
            type string;
            description
              "Name of protocol profile used by receiver.";
          }
        }  // grouping mdt-receiver-cnfg
    
        container mdt-config-data {
          description "MDT configuration data";
          list mdt-subscription {
            key "subscription-id";
            description "List of subscriptions";
            uses mdt-cfg:mdt-subscription-cnfg;
          }  // list mdt-subscription
    
          container mdt-named-protocol-rcvrs {
            description
              "List of configured named protocol receivers.";
            list mdt-named-protocol-rcvr {
              key "name";
              description
                "Configuration for receivers using a receiver type
               identified as 'protocol' in the subscription's
               rcvr-type field.";
              uses mdt-cfg:mdt-named-protocol-rcvr;
            }  // list mdt-named-protocol-rcvr
          }  // container mdt-named-protocol-rcvrs
    
          list mdt-xfrm {
            key "name";
            description
              "List of subscription transforms";
            uses mdt-cfg:mdt-xfrm;
          }  // list mdt-xfrm
        }  // container mdt-config-data
      }  // module Cisco-IOS-XE-mdt-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.