Cisco-IOS-XR-um-telemetry-model-driven-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR telemetry-model-driven package configuration. This YANG ...

  • Version: 2021-05-12

    Cisco-IOS-XR-um-telemetry-model-driven-cfg@2021-05-12


    
      module Cisco-IOS-XR-um-telemetry-model-driven-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-telemetry-model-driven-cfg";
    
        prefix um-telemetry-model-driven-cfg;
    
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import cisco-semver {
          prefix semver;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 West Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 800 553-NETS
         
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG definitions
         for Cisco IOS-XR telemetry-model-driven package configuration.
         
         This YANG module augments the
         modules with configuration data.
         
         Copyright (c) 2019-2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2021-05-12" {
          description
            "added a must statement under sensor-group
           2020-12-10
             Changed string length of leaf nodes that set maximum as 1024
           2020-10-02
             Added heartbeat containers";
        }
    
        revision "2020-05-08" {
          description
            "Added new containers, destinations under destination-group and
           tcp-send-timeout/gnmi-target-defined under top node
           2020-03-13
           Added new gzip option for grpc protocol";
        }
    
        revision "2019-06-10" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2019-03-30" {
          description "Initial version";
        }
    
        semver:module-version "3.0.0";
        semver:module-version "2.0.0";
        semver:module-version "1.0.1";
    
        feature grpc {
          description "grpc";
        }
    
        container telemetry {
          description "Telemetry configuration";
          container model-driven {
            presence
              "Indicates a model-driven node is configured.";
            description
              "Model Driven Telemetry configuration commands";
            container sensor-groups {
              description
                "Sensor group configuration";
              list sensor-group {
                key "sensor-group-id";
                description
                  "Sensor group configuration";
                leaf sensor-group-id {
                  type xr:Cisco-ios-xr-string {
                    length "1..800";
                  }
                  description
                    "Sensor group configuration";
                }
    
                container sensor-paths {
                  description "Sensor Path";
                  list sensor-path {
                    key "sensor-path-id";
                    description "Sensor Path";
                    leaf sensor-path-id {
                      type string {
                        length "1..800";
                      }
                      description "Sensor Path";
                    }
                  }  // list sensor-path
                }  // container sensor-paths
              }  // list sensor-group
            }  // container sensor-groups
    
            container destination-groups {
              description "Destination Group Id";
              list destination-group {
                key "destination-group-id";
                description
                  "Destination Group Id";
                leaf destination-group-id {
                  type xr:Cisco-ios-xr-string {
                    length "1..800";
                  }
                  description
                    "Destination Group Id";
                }
    
                leaf vrf {
                  type xr:Cisco-ios-xr-string {
                    length "1..32";
                  }
                  description
                    "vrf for the dest grp";
                }
    
                container address-family {
                  description
                    "Destination address of the recepient of the telemetry information";
                  container ipv4 {
                    description
                      "ipv4 address family";
                    list address {
                      key "address port-number";
                      description
                        "ipv4 address family";
                      leaf address {
                        type inet:ipv4-address-no-zone;
                        description
                          "ipv4 address family";
                      }
    
                      leaf port-number {
                        type uint32 {
                          range "1..65535";
                        }
                        description
                          "Destination Port configuration";
                      }
    
                      container protocol {
                        description
                          "Transport protocol";
                        container grpc {
                          if-feature grpc;
                          must
                            "not(../tcp or ../udp)";
                          presence
                            "Indicates a grpc node is configured.";
                          description "gRPC";
                          container no-tls {
                            presence
                              "Indicates a no-tls node is configured.";
                            description "No TLS";
                          }  // container no-tls
    
                          leaf tls-hostname {
                            type xr:Cisco-ios-xr-string {
                              length "1..64";
                            }
                            description
                              "TLS hostname";
                          }
    
                          container gzip {
                            presence
                              "Indicates a gzip node is configured.";
                            description
                              "gRPC gzip message compression";
                          }  // container gzip
                        }  // container grpc
    
                        container tcp {
                          must
                            "not(../grpc or ../udp)";
                          presence
                            "Indicates a tcp node is configured.";
                          description "TCP";
                        }  // container tcp
    
                        container udp {
                          must
                            "not(../grpc or ../tcp)";
                          presence
                            "Indicates a udp node is configured.";
                          description "UDP";
                          leaf packetsize {
                            type uint32 {
                              range "484..65507";
                            }
                            description
                              "UDP packet size";
                          }
                        }  // container udp
                      }  // container protocol
    
                      container encoding {
                        description
                          "Transport protocol encoding";
                        container gpb {
                          must
                            "not(../self-describing-gpb or ../json)";
                          presence
                            "Indicates a gpb node is configured.";
                          description
                            "GPB encoding";
                        }  // container gpb
    
                        container self-describing-gpb {
                          must
                            "not(../gpb or ../json)";
                          presence
                            "Indicates a self-describing-gpb node is configured.";
                          description
                            "Self describing GPB encoding";
                        }  // container self-describing-gpb
    
                        container json {
                          must
                            "not(../gpb or ../self-describing-gpb)";
                          presence
                            "Indicates a json node is configured.";
                          description
                            "JSON encoding";
                        }  // container json
                      }  // container encoding
                    }  // list address
                  }  // container ipv4
    
                  container ipv6 {
                    description
                      "ipv6 address family";
                    list address {
                      key "address port-number";
                      description
                        "ipv6 address family";
                      leaf address {
                        type inet:ipv6-address-no-zone;
                        description
                          "ipv6 address family";
                      }
    
                      leaf port-number {
                        type uint32 {
                          range "1..65535";
                        }
                        description
                          "Destination Port configuration";
                      }
    
                      container protocol {
                        description
                          "Transport protocol";
                        container grpc {
                          if-feature grpc;
                          must
                            "not(../tcp or ../udp)";
                          presence
                            "Indicates a grpc node is configured.";
                          description "gRPC";
                          container no-tls {
                            presence
                              "Indicates a no-tls node is configured.";
                            description "No TLS";
                          }  // container no-tls
    
                          leaf tls-hostname {
                            type xr:Cisco-ios-xr-string {
                              length "1..64";
                            }
                            description
                              "TLS hostname";
                          }
    
                          container gzip {
                            presence
                              "Indicates a gzip node is configured.";
                            description
                              "gRPC gzip message compression";
                          }  // container gzip
                        }  // container grpc
    
                        container tcp {
                          must
                            "not(../grpc or ../udp)";
                          presence
                            "Indicates a tcp node is configured.";
                          description "TCP";
                        }  // container tcp
    
                        container udp {
                          must
                            "not(../grpc or ../tcp)";
                          presence
                            "Indicates a udp node is configured.";
                          description "UDP";
                          leaf packetsize {
                            type uint32 {
                              range "484..65507";
                            }
                            description
                              "UDP packet size";
                          }
                        }  // container udp
                      }  // container protocol
    
                      container encoding {
                        description
                          "Transport protocol encoding";
                        container gpb {
                          must
                            "not(../self-describing-gpb or ../json)";
                          presence
                            "Indicates a gpb node is configured.";
                          description
                            "GPB encoding";
                        }  // container gpb
    
                        container self-describing-gpb {
                          must
                            "not(../gpb or ../json)";
                          presence
                            "Indicates a self-describing-gpb node is configured.";
                          description
                            "Self describing GPB encoding";
                        }  // container self-describing-gpb
    
                        container json {
                          must
                            "not(../gpb or ../self-describing-gpb)";
                          presence
                            "Indicates a json node is configured.";
                          description
                            "JSON encoding";
                        }  // container json
                      }  // container encoding
                    }  // list address
                  }  // container ipv6
                }  // container address-family
    
                container destinations {
                  description
                    "Destination IP address or fully qualified domain name";
                  list destination {
                    key "destination-name port-number";
                    description
                      "Destination IP address or fully qualified domain name";
                    leaf destination-name {
                      type xr:Cisco-ios-xr-string {
                        length "1..128";
                      }
                      description
                        "Destination IP address or fully qualified domain name";
                    }
    
                    leaf port-number {
                      type uint32 {
                        range "1..65535";
                      }
                      description
                        "Destination port";
                    }
    
                    container address-family {
                      description
                        "Specify the desired address family for the returned addresses from DNS. Only applicable to FQDN";
                      container ipv4 {
                        must "not(../ipv6)";
                        presence
                          "Indicates a ipv4 node is configured.";
                        description
                          "IPv4 address family";
                      }  // container ipv4
    
                      container ipv6 {
                        must "not(../ipv4)";
                        presence
                          "Indicates a ipv6 node is configured.";
                        description
                          "IPv6 address family";
                      }  // container ipv6
                    }  // container address-family
    
                    container protocol {
                      description
                        "Transport protocol";
                      container grpc {
                        if-feature grpc;
                        must
                          "not(../tcp or ../udp)";
                        presence
                          "Indicates a grpc node is configured.";
                        description "gRPC";
                        container no-tls {
                          presence
                            "Indicates a no-tls node is configured.";
                          description "No TLS";
                        }  // container no-tls
    
                        leaf tls-hostname {
                          type xr:Cisco-ios-xr-string {
                            length "1..64";
                          }
                          description
                            "TLS hostname";
                        }
    
                        container gzip {
                          must "../tls-hostname";
                          presence
                            "Indicates a gzip node is configured.";
                          description
                            "gRPC gzip message compression";
                        }  // container gzip
                      }  // container grpc
    
                      container tcp {
                        must
                          "not(../grpc or ../udp)";
                        presence
                          "Indicates a tcp node is configured.";
                        description "TCP";
                      }  // container tcp
    
                      container udp {
                        must
                          "not(../grpc or ../tcp)";
                        presence
                          "Indicates a udp node is configured.";
                        description "UDP";
                        leaf packetsize {
                          type uint32 {
                            range "484..65507";
                          }
                          description
                            "UDP packet size";
                        }
                      }  // container udp
                    }  // container protocol
    
                    container encoding {
                      description
                        "Transport protocol encoding";
                      container gpb {
                        must
                          "not(../self-describing-gpb or ../json)";
                        presence
                          "Indicates a gpb node is configured.";
                        description
                          "GPB encoding";
                      }  // container gpb
    
                      container self-describing-gpb {
                        must
                          "not(../gpb or ../json)";
                        presence
                          "Indicates a self-describing-gpb node is configured.";
                        description
                          "Self describing GPB encoding";
                      }  // container self-describing-gpb
    
                      container json {
                        must
                          "not(../gpb or ../self-describing-gpb)";
                        presence
                          "Indicates a json node is configured.";
                        description
                          "JSON encoding";
                      }  // container json
                    }  // container encoding
                  }  // list destination
                }  // container destinations
              }  // list destination-group
            }  // container destination-groups
    
            container subscriptions {
              description "Subscription Id";
              list subscription {
                key "subscription-id";
                description "Subscription Id";
                leaf subscription-id {
                  type xr:Cisco-ios-xr-string {
                    length "1..800";
                  }
                  description "Subscription Id";
                }
    
                leaf source-qos-marking {
                  type enumeration {
                    enum "default" {
                      value 0;
                      description
                        "Match packets with default dscp (000000)";
                    }
                    enum "cs1" {
                      value 8;
                      description
                        "Match packets with CS1 dscp (001000)";
                    }
                    enum "af11" {
                      value 10;
                      description
                        "Match packets with AF11 dscp (001010)";
                    }
                    enum "af12" {
                      value 12;
                      description
                        "Match packets with AF12 dscp (001100)";
                    }
                    enum "af13" {
                      value 14;
                      description
                        "Match packets with AF13 dscp (001110)";
                    }
                    enum "cs2" {
                      value 16;
                      description
                        "Match packets with CS2 dscp (010000)";
                    }
                    enum "af21" {
                      value 18;
                      description
                        "Match packets with AF21 dscp (010010)";
                    }
                    enum "af22" {
                      value 20;
                      description
                        "Match packets with AF22 dscp (010100)";
                    }
                    enum "af23" {
                      value 22;
                      description
                        "Match packets with AF23 dscp (010110)";
                    }
                    enum "cs3" {
                      value 24;
                      description
                        "Match packets with CS3 dscp (011000)";
                    }
                    enum "af31" {
                      value 26;
                      description
                        "Match packets with AF31 dscp (011010)";
                    }
                    enum "af32" {
                      value 28;
                      description
                        "Match packets with AF32 dscp (011100)";
                    }
                    enum "af33" {
                      value 30;
                      description
                        "Match packets with AF33 dscp (011110)";
                    }
                    enum "cs4" {
                      value 32;
                      description
                        "Match packets with CS4 dscp (100000)";
                    }
                    enum "af41" {
                      value 34;
                      description
                        "Match packets with AF41 dscp (100010)";
                    }
                    enum "af42" {
                      value 36;
                      description
                        "Match packets with AF42 dscp (100100)";
                    }
                    enum "af43" {
                      value 38;
                      description
                        "Match packets with AF43 dscp (100110)";
                    }
                    enum "cs5" {
                      value 40;
                      description
                        "Match packets with CS5 dscp (101000)";
                    }
                    enum "ef" {
                      value 46;
                      description
                        "Match packets with EF dscp (101110)";
                    }
                    enum "cs6" {
                      value 48;
                      description
                        "Match packets with CS6 dscp (110000)";
                    }
                    enum "cs7" {
                      value 56;
                      description
                        "Match packets with CS7 dscp (111000)";
                    }
                  }
                  description
                    "Outgoing DSCP value";
                }
    
                leaf source-interface {
                  type xr:Interface-name;
                  description
                    "Source interface to use in the outgoing IP packets";
                }
    
                container sensor-groups {
                  description
                    "Association of one or more Sensor Groups with a Subscription Id";
                  list sensor-group {
                    must
                      "sample-interval or strict-timer or heartbeat/interval or heartbeat/always";
                    key "sensor-group-id";
                    description
                      "Association of one or more Sensor Groups with a Subscription Id";
                    leaf sensor-group-id {
                      type xr:Cisco-ios-xr-string {
                        length "1..800";
                      }
                      description
                        "Association of one or more Sensor Groups with a Subscription Id";
                    }
    
                    leaf sample-interval {
                      type uint32 {
                        range "0..4294967295";
                      }
                      description
                        "Sample interval";
                    }
    
                    container strict-timer {
                      presence
                        "Indicates a strict-timer node is configured.";
                      description
                        "use strict timer, default is relative timer";
                    }  // container strict-timer
    
                    container heartbeat {
                      description "Heartbeat";
                      leaf interval {
                        type uint32 {
                          range "1..4294967295";
                        }
                        description
                          "Send subscription data per heartbeat interval when no events have occurred within interval";
                      }
    
                      container always {
                        presence
                          "Indicates a always node is configured.";
                        description
                          "Send heartbeat even if events have occurred within interval";
                      }  // container always
                    }  // container heartbeat
                  }  // list sensor-group
                }  // container sensor-groups
    
                container destinations {
                  description
                    "Destination Group Id to associate with the current subscription id";
                  list destination {
                    key "destination-id";
                    description
                      "Destination Group Id to associate with the current subscription id";
                    leaf destination-id {
                      type xr:Cisco-ios-xr-string {
                        length "1..800";
                      }
                      description
                        "Destination Group Id to associate with the current subscription id";
                    }
                  }  // list destination
                }  // container destinations
              }  // list subscription
            }  // container subscriptions
    
            leaf max-containers-per-path {
              type uint32 {
                range "0..1024";
              }
              description
                "Maximum containers allowed per sensor path (default: 16)";
            }
    
            leaf max-sensor-paths {
              type uint32 {
                range "0..4000";
              }
              description
                "Maximum allowed sensor paths (default: 1000)";
            }
    
            leaf tcp-send-timeout {
              type uint32 {
                range "0..30";
              }
              description
                "TCP send timeout value in seconds (default: 30)";
            }
    
            container strict-timer {
              presence
                "Indicates a strict-timer node is configured.";
              description
                "use strict timer for all subscriptions, default is relative timer";
            }  // container strict-timer
    
            container gnmi-target-defined {
              description
                "GNMI target defined to select minimum cadence and cadence factor";
              leaf minimum-cadence {
                type uint32 {
                  range "1..65535";
                }
                description
                  "Minimum cadence for target defined subscriptions in secs";
              }
    
              leaf cadence-factor {
                type uint32 {
                  range "1..10";
                }
                description
                  "Multiplier factor for cadence of target defined subscriptions";
              }
            }  // container gnmi-target-defined
    
            container include {
              description
                "Include fields with empty values in output";
              container empty {
                description
                  "Include fields with empty values in output";
                container values {
                  presence
                    "Indicates a values node is configured.";
                  description
                    "Include fields with empty values in output";
                }  // container values
              }  // container empty
    
              container select-leaves-on-events {
                presence
                  "Indicates a select-leaves-on-events node is configured.";
                description
                  "Include only configured leafs on on-change event for the sensor-path";
              }  // container select-leaves-on-events
            }  // container include
    
            container gnmi {
              description "GNMI subscribe";
              container heartbeat {
                description "GNMI heartbeat";
                container always {
                  presence
                    "Indicates a always node is configured.";
                  description
                    "Send heartbeat even if events have occurred within interval";
                }  // container always
              }  // container heartbeat
            }  // container gnmi
          }  // container model-driven
        }  // container telemetry
      }  // module Cisco-IOS-XR-um-telemetry-model-driven-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.