Cisco-IOS-XR-Ethernet-SPAN-oper-sub1

This submodule contains a collection of YANG definitions for Cisco IOS-XR Ethernet-SPAN package operational data. Copyright (c)...

  • Version: 2020-12-03

    Cisco-IOS-XR-Ethernet-SPAN-oper-sub1@2020-12-03


    
      submodule Cisco-IOS-XR-Ethernet-SPAN-oper-sub1 {
    
        yang-version 1;
    
        belongs-to
          Cisco-IOS-XR-Ethernet-SPAN-oper {
            prefix
              Cisco-IOS-XR-Ethernet-SPAN-oper;
        }
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        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 submodule contains a collection of YANG definitions
         for Cisco IOS-XR Ethernet-SPAN package operational data.
         
         Copyright (c) 2013-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-12-03" {
          description
            "Added support for multiple attachments per class on an interface
           2020-09-14
             Added support for mirror rx and tx traffic to separate destinations
           2020-04-03
             Added support for bundle destinations.";
        }
    
        revision "2020-01-30" {
          description
            "Added support for L3 IPv4 and IPv6 ACLs on a L2 ethernet SPAN session
           2019-12-12
           Added support for file format and PCAP filter expressions under file
           2019-10-02
           Added support for UDP destinations and CloudSPAN.";
        }
    
        revision "2019-05-12" {
          description
            "Added support for file destinations.";
        }
    
        revision "2019-04-05" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2015-11-09" {
          description "IOS XR 6.0 revision.";
        }
    
        semver:module-version "4.0.0";
        semver:module-version "3.0.0";
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        typedef Mac-address {
          type yang:mac-address;
          description "MAC address type";
        }
    
        typedef Mirror-interval {
          type enumeration {
            enum "mirror-interval-all" {
              value 0;
              description "Mirror all packets";
            }
            enum "mirror-interval512" {
              value 1;
              description "Mirror Interval 512";
            }
            enum "mirror-interval1k" {
              value 2;
              description "Mirror Interval 1K";
            }
            enum "mirror-interval2k" {
              value 3;
              description "Mirror Interval 2K";
            }
            enum "mirror-interval4k" {
              value 4;
              description "Mirror Interval 4K";
            }
            enum "mirror-interval8k" {
              value 5;
              description "Mirror Interval 8K";
            }
            enum "mirror-interval16k" {
              value 6;
              description "Mirror Interval 16K";
            }
          }
          description
            "Monitor-session mirror intervals";
        }
    
        typedef Traffic-direction {
          type enumeration {
            enum "invalid" {
              value 0;
              description "Invalid";
            }
            enum "rx-only" {
              value 1;
              description "Received";
            }
            enum "tx-only" {
              value 2;
              description "Transmitted";
            }
            enum "both" {
              value 3;
              description "Both";
            }
          }
          description
            "Monitor-session traffic directions";
        }
    
        typedef Optional-value {
          type uint32;
          description "Optional Value";
        }
    
        typedef Udp-address {
          type enumeration {
            enum "ipv4" {
              value 0;
              description "IPv4 Address";
            }
            enum "ipv6" {
              value 1;
              description "IPv6 Address";
            }
          }
          description "UDP Address Type";
        }
    
        typedef File-format {
          type enumeration {
            enum "invalid-format" {
              value 0;
              description "Invalid file format";
            }
            enum "pcap-format" {
              value 1;
              description "PCAP file format";
            }
            enum "pcapng-format" {
              value 2;
              description "PCAPNG file format";
            }
          }
          description "File Format";
        }
    
        typedef Buffer {
          type enumeration {
            enum "invalid-buffer" {
              value 0;
              description "Invalid buffer type";
            }
            enum "circular-buffer" {
              value 1;
              description "Circular buffer type";
            }
            enum "linear-buffer" {
              value 2;
              description "Linear buffer type";
            }
          }
          description "Buffer type";
        }
    
        typedef Im-state-enum {
          type enumeration {
            enum "im-state-not-ready" {
              value 0;
              description "im state not ready";
            }
            enum "im-state-admin-down" {
              value 1;
              description "im state admin down";
            }
            enum "im-state-down" {
              value 2;
              description "im state down";
            }
            enum "im-state-up" {
              value 3;
              description "im state up";
            }
            enum "im-state-shutdown" {
              value 4;
              description "im state shutdown";
            }
            enum "im-state-err-disable" {
              value 5;
              description "im state err disable";
            }
            enum "im-state-down-immediate" {
              value 6;
              description
                "im state down immediate";
            }
            enum "im-state-down-immediate-admin" {
              value 7;
              description
                "im state down immediate admin";
            }
            enum "im-state-down-graceful" {
              value 8;
              description
                "im state down graceful";
            }
            enum "im-state-begin-shutdown" {
              value 9;
              description
                "im state begin shutdown";
            }
            enum "im-state-end-shutdown" {
              value 10;
              description
                "im state end shutdown";
            }
            enum "im-state-begin-error-disable" {
              value 11;
              description
                "im state begin error disable";
            }
            enum "im-state-end-error-disable" {
              value 12;
              description
                "im state end error disable";
            }
            enum "im-state-begin-down-graceful" {
              value 13;
              description
                "im state begin down graceful";
            }
            enum "im-state-reset" {
              value 14;
              description "im state reset";
            }
            enum "im-state-operational" {
              value 15;
              description "im state operational";
            }
            enum "im-state-not-operational" {
              value 16;
              description
                "im state not operational";
            }
            enum "im-state-unknown" {
              value 17;
              description "im state unknown";
            }
            enum "im-state-last" {
              value 18;
              description "im state last";
            }
          }
          description "Im state enum";
        }
    
        typedef Destination-name-string {
          type string;
          description "Destination name string";
        }
    
        typedef Destination-class {
          type enumeration {
            enum "interface-class" {
              value 0;
              description
                "Destination is an interface";
            }
            enum "pseudowire-class" {
              value 1;
              description
                "Destination is a pseudowire";
            }
            enum "next-hop-ipv4-class" {
              value 2;
              description
                "Destination is a next-hop IPv4 address";
            }
            enum "next-hop-ipv6-class" {
              value 3;
              description
                "Destination is a next-hop IPv6 address";
            }
            enum "file-class" {
              value 5;
              description
                "Destination is a file";
            }
            enum "udp-class" {
              value 6;
              description
                "Destination is over UDP";
            }
            enum "bundle-class" {
              value 7;
              description
                "Destination is a bundle";
            }
            enum "invalid-class" {
              value 255;
              description
                "Destination is not specified";
            }
          }
          description "Destination class";
        }
    
        typedef Session-class {
          type enumeration {
            enum "ethernet-class" {
              value 0;
              description
                "Ethernet mirroring session";
            }
            enum "ipv4-class" {
              value 1;
              description
                "IPv4 mirroring session";
            }
            enum "ipv6-class" {
              value 2;
              description
                "IPv6 mirroring session";
            }
            enum "mplsipv4-class" {
              value 3;
              description
                "MPLS-IPv4 mirroring session";
            }
            enum "mplsipv6-class" {
              value 4;
              description
                "MPLS-IPv6 mirroring session";
            }
            enum "invalid-class" {
              value 65535;
              description
                "Invalid session class";
            }
          }
          description "Session class";
        }
    
        grouping SPAN-BAG-MBR-INFO {
          description
            "SPAN EA Bundle Member Information";
          leaf interface-handle {
            type xr:Interface-name;
            description "InterfaceHandle";
          }
        }  // grouping SPAN-BAG-MBR-INFO
    
        grouping SPAN-BAG-BDL-INFO {
          description
            "SPAN EA Bundle Information";
          leaf is-bundle {
            type boolean;
            description "is bundle";
          }
    
          list mbr-info {
            description "mbr info";
            uses SPAN-BAG-MBR-INFO;
          }  // list mbr-info
        }  // grouping SPAN-BAG-BDL-INFO
    
        grouping SPAN-EA-ATTACHMENT-BAG {
          description
            "SPAN EA Attachment Information";
          container destination-id {
            description "Destination ID";
            uses DESTINATION-ID;
          }  // container destination-id
    
          container rx-destination-id {
            description "Rx Destination ID";
            uses DESTINATION-ID;
          }  // container rx-destination-id
    
          container tx-destination-id {
            description "Tx Destination ID";
            uses DESTINATION-ID;
          }  // container tx-destination-id
    
          container traffic-mirroring-parameters {
            description
              "Traffic mirroring parameters";
            uses TRAFFIC-MIRRORING-PARAMETERS;
          }  // container traffic-mirroring-parameters
    
          container bundle-info {
            description "Bundle information";
            uses SPAN-BAG-BDL-INFO;
          }  // container bundle-info
    
          leaf class {
            type Session-class;
            description "Attachment class";
          }
    
          leaf name {
            type string;
            description "Attached Session Name";
          }
    
          leaf id {
            type uint32;
            description
              "Numerical ID of attached session";
          }
    
          leaf separate-destinations {
            type boolean;
            description "Separate Destinations";
          }
        }  // grouping SPAN-EA-ATTACHMENT-BAG
    
        grouping SPAN-EA-INTF-BAG {
          description
            "SPAN EA Source Interface Information";
          container destination-id {
            description
              "Destination ID (deprecated by Attachment)";
            uses DESTINATION-ID;
          }  // container destination-id
    
          container traffic-mirroring-parameters {
            description
              "Traffic mirroring parameters (deprecated by
             Attachment)";
            uses TRAFFIC-MIRRORING-PARAMETERS;
          }  // container traffic-mirroring-parameters
    
          leaf source-interface {
            type xr:Interface-name;
            description "Source interface";
          }
    
          leaf platform-error {
            type uint32;
            description
              "Last error observed for this interface while
             programming the hardware";
          }
    
          leaf destination-interface {
            type xr:Interface-name;
            description
              "Destination interface (deprecated by Attachment)";
          }
    
          leaf traffic-direction {
            type Traffic-direction;
            description
              "Traffic mirroring direction (deprecated by
             Attachment)";
          }
    
          list attachment {
            description "Attachment information";
            uses SPAN-EA-ATTACHMENT-BAG;
          }  // list attachment
        }  // grouping SPAN-EA-INTF-BAG
    
        grouping SPAN-EA-SESS-BAG {
          description
            "SPAN EA Session Information";
          container destination-id {
            description "Destination ID";
            uses DESTINATION-ID;
          }  // container destination-id
    
          container rx-destination-id {
            description "Destination ID";
            uses DESTINATION-ID;
          }  // container rx-destination-id
    
          container tx-destination-id {
            description "Destination ID";
            uses DESTINATION-ID;
          }  // container tx-destination-id
    
          container file-information {
            description
              "Extra information relating to SPAN to file";
            uses FILE-DST-STATE-INFO;
          }  // container file-information
    
          leaf id {
            type uint32;
            description
              "Assigned numerical ID for this session";
          }
    
          leaf name {
            type string;
            description
              "Configured Session Name";
          }
    
          leaf session-class-xr {
            type Session-class;
            description "Session class";
          }
    
          leaf destination-interface {
            type xr:Interface-name;
            description
              "Destination interface (deprecated by
             DestinationID, invalid for pseudowires)";
          }
    
          leaf separate-destinations {
            type boolean;
            description "Separate Destinations";
          }
    
          leaf platform-error {
            type uint32;
            description
              "Last error observed for this session while
             programming the hardware";
          }
    
          leaf inject-interface-ifh {
            type xr:Interface-name;
            description
              "Inject Interface ifhandle";
          }
    
          leaf inject-interface-mac {
            type Mac-address;
            description
              "Inject Interface MAC address";
          }
    
          leaf inject-interface-invalid {
            type boolean;
            description
              "An inject interface is flagged as invalid on a
             particular node if the interface exists on that
             node, and there is no attachment interface
             config for it";
          }
        }  // grouping SPAN-EA-SESS-BAG
    
        grouping TRAFFIC-MIRRORING-PARAMETERS {
          description
            "Monitor-session traffic mirroring parameters";
          leaf traffic-direction {
            type Traffic-direction;
            description "Direction";
          }
    
          leaf port-level {
            type boolean;
            description "Port level mirroring";
          }
    
          leaf is-acl-enabled {
            type boolean;
            description "ACL enabled";
          }
    
          leaf is-ipv4acl-enabled {
            type boolean;
            description "IPv4 ACL enabled";
          }
    
          leaf is-ipv6acl-enabled {
            type boolean;
            description "IPv6 ACL enabled";
          }
    
          leaf mirror-bytes {
            type Optional-value;
            units "byte";
            description
              "Number of bytes to mirror";
          }
    
          leaf mirror-interval {
            type Mirror-interval;
            description
              "Interval between mirrored packets";
          }
    
          leaf acl-name {
            type string;
            description "ACL name";
          }
    
          leaf ipv4acl-name {
            type string;
            description "IPv4 ACL name";
          }
    
          leaf ipv6acl-name {
            type string;
            description "IPv6 ACL name";
          }
    
          leaf is-drops-enabled {
            type boolean;
            description
              "Mirroring dropped packets";
          }
        }  // grouping TRAFFIC-MIRRORING-PARAMETERS
    
        grouping CLOUD-SPAN-PROPERTIES {
          description "CloudSPAN Properties";
          leaf enabled {
            type boolean;
            description "enabled";
          }
        }  // grouping CLOUD-SPAN-PROPERTIES
    
        grouping FILE-DST-STATE-INFO {
          description "File destination state";
          leaf is-active {
            type boolean;
            description
              "Is Packet Collection Active";
          }
    
          leaf file-name {
            type string;
            description "File Name";
          }
    
          leaf directory-name {
            type string;
            description "Directory Name";
          }
        }  // grouping FILE-DST-STATE-INFO
    
        grouping BNDL-DST-CFG-INFO {
          description
            "Bundle destination config";
          leaf bundle-handle {
            type xr:Interface-name;
            description
              "Bundle interface handle";
          }
    
          leaf member-count {
            type uint32;
            description "Bundle member count";
          }
    
          leaf-list member-handle {
            type xr:Interface-name;
            description
              "Bundle member interface handles";
          }
        }  // grouping BNDL-DST-CFG-INFO
    
        grouping IPV6-NEXT-HOP-DESTINATION-ID {
          description
            "IPv6 next-hop destination ID";
          leaf ipv6-address {
            type inet:ipv6-address;
            description "IPv6 address";
          }
    
          leaf vrf-name {
            type string;
            description "VRF";
          }
        }  // grouping IPV6-NEXT-HOP-DESTINATION-ID
    
        grouping IPV4-NEXT-HOP-DESTINATION-ID {
          description
            "IPv4 next-hop destination ID";
          leaf ipv4-address {
            type inet:ipv4-address;
            description "IPv4 address";
          }
    
          leaf vrf-name {
            type string;
            description "VRF";
          }
        }  // grouping IPV4-NEXT-HOP-DESTINATION-ID
    
        grouping DESTINATION-ID {
          description "Destination ID";
          container ipv4-address-and-vrf {
            when
              "../destination-class = 'next-hop-ipv4-class'" {
              description
                "../DestinationClass = 'NextHopIPv4Class'";
            }
            description "IPv4 address";
            uses IPV4-NEXT-HOP-DESTINATION-ID;
          }  // container ipv4-address-and-vrf
    
          container ipv6-address-and-vrf {
            when
              "../destination-class = 'next-hop-ipv6-class'" {
              description
                "../DestinationClass = 'NextHopIPv6Class'";
            }
            description "IPv6 address";
            uses IPV6-NEXT-HOP-DESTINATION-ID;
          }  // container ipv6-address-and-vrf
    
          container file-session-id {
            when
              "../destination-class = 'file-class'" {
              description
                "../DestinationClass = 'FileClass'";
            }
            description "File Session ID";
            uses FILE-DST-CFG-INFO;
          }  // container file-session-id
    
          container udp-config {
            when
              "../destination-class = 'udp-class'" {
              description
                "../DestinationClass = 'UDPClass'";
            }
            description "UDP config";
            uses UDP-DST-CFG-INFO;
          }  // container udp-config
    
          container bundle-config {
            when
              "../destination-class = 'bundle-class'" {
              description
                "../DestinationClass = 'BundleClass'";
            }
            description "Bundle config";
            uses BNDL-DST-CFG-INFO;
          }  // container bundle-config
    
          leaf destination-class {
            type Destination-class;
            description "DestinationClass";
          }
    
          leaf interface {
            when
              "../destination-class = 'interface-class'" {
              description
                "../DestinationClass = 'InterfaceClass'";
            }
            type xr:Interface-name;
            description "Interface Handle";
          }
    
          leaf pseudowire-id {
            when
              "../destination-class = 'pseudowire-class'" {
              description
                "../DestinationClass = 'PseudowireClass'";
            }
            type Optional-value;
            description "Pseudowire XCID";
          }
    
          leaf invalid-value {
            when
              "../destination-class != 'interface-class' and ../destination-class != 'pseudowire-class' and ../destination-class != 'next-hop-ipv4-class' and ../destination-class != 'next-hop-ipv6-class' and ../destination-class != 'file-class' and ../destination-class != 'udp-class' and ../destination-class != 'bundle-class'" {
              description
                "../DestinationClass != 'InterfaceClass' and .
               ./DestinationClass != 'PseudowireClass' and .
               ./DestinationClass != 'NextHopIPv4Class' and .
               ./DestinationClass != 'NextHopIPv6Class' and .
               ./DestinationClass != 'FileClass' and .
               ./DestinationClass != 'UDPClass' and .
               ./DestinationClass != 'BundleClass'";
            }
            type Optional-value;
            description "Invalid Parameter";
          }
        }  // grouping DESTINATION-ID
    
        grouping UDPIPV6-ADDRESS {
          description "UDP IPv6 Address";
          leaf source-ipv6-address {
            type inet:ipv6-address;
            description "Source IPv6 Address";
          }
    
          leaf destination-ipv6-address {
            type inet:ipv6-address;
            description
              "Destination IPv6 Address";
          }
        }  // grouping UDPIPV6-ADDRESS
    
        grouping UDPIPV4-ADDRESS {
          description "UDP IPv4 Address";
          leaf source-ipv4-address {
            type inet:ipv4-address;
            description "Source IPv4 Address";
          }
    
          leaf destination-ipv4-address {
            type inet:ipv4-address;
            description
              "Destination IPv4 Address";
          }
        }  // grouping UDPIPV4-ADDRESS
    
        grouping UDP-ADDRESSES {
          description "UDP IP Addresses";
          container ipv4 {
            when "../address-type = 'ipv4'" {
              description
                "../AddressType = 'IPv4'";
            }
            description "IPv4 Address";
            uses UDPIPV4-ADDRESS;
          }  // container ipv4
    
          container ipv6 {
            when "../address-type = 'ipv6'" {
              description
                "../AddressType = 'IPv6'";
            }
            description "IPv6 Address";
            uses UDPIPV6-ADDRESS;
          }  // container ipv6
    
          leaf address-type {
            type Udp-address;
            description "AddressType";
          }
        }  // grouping UDP-ADDRESSES
    
        grouping UDP-DST-CFG-INFO {
          description "UDP destination config";
          container ip-addresses {
            description "IP Addresses";
            uses UDP-ADDRESSES;
          }  // container ip-addresses
    
          leaf source-port {
            type uint32;
            description "Source Port";
          }
    
          leaf destination-port {
            type uint32;
            description "Destination Port";
          }
    
          leaf vrfid {
            type string;
            description "VRF ID";
          }
    
          leaf vrf-name {
            type string;
            description "VRF Name";
          }
        }  // grouping UDP-DST-CFG-INFO
    
        grouping FILE-DST-CFG-INFO {
          description "File destination config";
          leaf file-session-id {
            type uint32;
            description "File Session ID";
          }
    
          leaf buffer-size {
            type uint32;
            description "Buffer Size";
          }
    
          leaf buffer-type {
            type Buffer;
            description "Buffer Type";
          }
    
          leaf format {
            type File-format;
            description "File Format";
          }
    
          leaf filter {
            type string;
            description "Pcap filter";
          }
        }  // grouping FILE-DST-CFG-INFO
      }  // submodule Cisco-IOS-XR-Ethernet-SPAN-oper-sub1
    

© 2023 YumaWorks, Inc. All rights reserved.