Cisco-IOS-XR-um-monitor-session-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR monitor-session package configuration. This YANG module ...

  • Version: 2021-03-03

    Cisco-IOS-XR-um-monitor-session-cfg@2021-03-03


    
      module Cisco-IOS-XR-um-monitor-session-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-monitor-session-cfg";
    
        prefix um-monitor-session-cfg;
    
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-um-interface-cfg {
          prefix a1;
        }
        import Cisco-IOS-XR-um-if-l2transport-cfg {
          prefix a2;
        }
        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 monitor-session package configuration.
         
         This YANG module augments the
         modules with configuration data.
         
         Copyright (c) 2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2021-03-03" {
          description "Initial release";
        }
    
        semver:module-version "1.0.0";
    
        container monitor-sessions {
          description
            "Monitor-session configuration commands";
          list monitor-session {
            key "session-name";
            description
              "Monitor-session configuration commands";
            leaf session-name {
              type string {
                length "1..79";
              }
              description
                "Monitor-session configuration commands";
            }
    
            leaf traffic-type {
              type enumeration {
                enum "ethernet" {
                  value 0;
                  description
                    "Replicate Ethernet traffic";
                }
                enum "ipv4" {
                  value 1;
                  description
                    "Replicate IPv4 traffic";
                }
                enum "ipv6" {
                  value 2;
                  description
                    "Replicate IPv6 traffic";
                }
                enum "mpls-ipv4" {
                  value 3;
                  description
                    "Replicate MPLS-IPv4 traffic";
                }
                enum "mpls-ipv6" {
                  value 4;
                  description
                    "Replicate MPLS-IPv6 traffic";
                }
              }
              mandatory true;
              description
                "Type of traffic to replicate";
            }
    
            container destination {
              description
                "Specify the destination that traffic should be replicated to";
              leaf interface {
                when
                  "../../traffic-type = 'ethernet' or ../../traffic-type = 'mpls-ipv4'
                 or ../../traffic-type = 'mpls-ipv6'";
                type xr:Interface-name;
                must
                  "not(../pseudowire or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address or ../file or ../udp)";
                description
                  "Specify a destination interface";
              }
    
              container pseudowire {
                when
                  "../../traffic-type = 'ethernet'";
                must
                  "not(../interface or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address or ../file or ../udp)";
                presence
                  "Indicates a pseudowire node is configured.";
                description
                  "Specify a pseudowire";
              }  // container pseudowire
    
              container next-hop {
                description
                  "Specify a destination next-hop IP address";
                leaf ipv4-address {
                  when
                    "../../../traffic-type = 'ethernet'
                   or ../../../traffic-type = 'ipv4'";
                  type inet:ipv4-address-no-zone;
                  must
                    "not(../../interface or ../../pseudowire
                   or ../../file or ../../udp)";
                  description
                    "Specify the destination next-hop IPv4 address";
                }
    
                leaf ipv6-address {
                  when
                    "../../../traffic-type = 'ethernet'
                   or ../../../traffic-type = 'ipv6'";
                  type inet:ipv6-address-no-zone;
                  must
                    "not(../../interface or ../../pseudowire
                   or ../../file or ../../udp)";
                  description
                    "Specify the destination next-hop IPv6 address";
                }
              }  // container next-hop
    
              container udp {
                must
                  "not(../interface or ../pseudowire or ../next-hop/ipv4-address
                   or ../next-hop/ipv6-address or ../file)
                   and (ipv4 or ipv6)";
                presence
                  "Indicates a udp node is configured.";
                description
                  "Specify a UDP destination";
                leaf ipv4 {
                  type inet:ipv4-address-no-zone;
                  must
                    "not(../ipv6) and ../ipv4-source-ip";
                  description
                    "Specify an IPv4 address";
                }
    
                leaf ipv6 {
                  type inet:ipv6-address-no-zone;
                  must
                    "not(../ipv4) and ../ipv6-source-ip";
                  description
                    "Specify an IPv6 address";
                }
    
                leaf port {
                  type uint32 {
                    range "0..65535";
                  }
                  mandatory true;
                  description
                    "Specify the destination port number";
                }
    
                leaf ipv4-source-ip {
                  type inet:ipv4-address-no-zone;
                  must "../ipv4";
                  description
                    "Specify the source IPv4 address";
                }
    
                leaf ipv6-source-ip {
                  type inet:ipv6-address-no-zone;
                  must "../ipv6";
                  description
                    "Specify the source IPv6 address";
                }
    
                leaf source-port {
                  type uint32 {
                    range "0..65535";
                  }
                  mandatory true;
                  description
                    "Specify the source port";
                }
    
                leaf vrf {
                  type xr:Cisco-ios-xr-string {
                    length "1..32";
                  }
                  description
                    "Specify the vrf name";
                }
              }  // container udp
    
              container file {
                must
                  "not(../interface or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address or ../pseudowire
                 or ../udp)";
                presence
                  "Indicates a file node is configured.";
                description
                  "Specify destination as a file";
                leaf size {
                  type uint32 {
                    range "1..16777216";
                  }
                  description
                    "Specify the packet buffer size";
                }
    
                container buffer-type {
                  description
                    "Specify the buffer type";
                  container linear {
                    presence
                      "Indicates a linear node is configured.";
                    description
                      "Specify a linear buffer";
                  }  // container linear
                }  // container buffer-type
    
                container format {
                  description
                    "Specify the file output file format";
                  container pcapng {
                    presence
                      "Indicates a pcapng node is configured.";
                    description
                      "Specify pcapng format";
                  }  // container pcapng
                }  // container format
    
                leaf filter {
                  type string {
                    length "1..800";
                  }
                  description
                    "Specify a pcap filter to apply - not yet supported";
                }
              }  // container file
            }  // container destination
    
            container rx {
              description
                "Specify the destination that rx traffic should be replicated to";
              leaf interface {
                when
                  "../../traffic-type = 'ethernet' or ../../traffic-type = 'mpls-ipv4'
                 or ../../traffic-type = 'mpls-ipv6'";
                type xr:Interface-name;
                must
                  "not(../pseudowire or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address)";
                description
                  "Specify a destination interface";
              }
    
              container pseudowire {
                when
                  "../../traffic-type = 'ethernet'";
                must
                  "not(../interface or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address)";
                presence
                  "Indicates a pseudowire node is configured.";
                description
                  "Specify a pseudowire";
              }  // container pseudowire
    
              container next-hop {
                description
                  "Specify a destination next-hop IP address";
                leaf ipv4-address {
                  when
                    "../../../traffic-type = 'ethernet'
                   or ../../../traffic-type = 'ipv4'";
                  type inet:ipv4-address-no-zone;
                  must
                    "not(../../interface or ../../pseudowire)";
                  description
                    "Specify the destination next-hop IPv4 address";
                }
    
                leaf ipv6-address {
                  when
                    "../../../traffic-type = 'ethernet'
                   or ../../../traffic-type = 'ipv6'";
                  type inet:ipv6-address-no-zone;
                  must
                    "not(../../interface or ../../pseudowire)";
                  description
                    "Specify the destination next-hop IPv6 address";
                }
              }  // container next-hop
            }  // container rx
    
            container tx {
              description
                "Specify the destination that tx traffic should be replicated to";
              leaf interface {
                when
                  "../../traffic-type = 'ethernet' or ../../traffic-type = 'mpls-ipv4'
                 or ../../traffic-type = 'mpls-ipv6'";
                type xr:Interface-name;
                must
                  "not(../pseudowire or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address)";
                description
                  "Specify a destination interface";
              }
    
              container pseudowire {
                when
                  "../../traffic-type = 'ethernet'";
                must
                  "not(../interface or ../next-hop/ipv4-address
                 or ../next-hop/ipv6-address)";
                presence
                  "Indicates a pseudowire node is configured.";
                description
                  "Specify a pseudowire";
              }  // container pseudowire
    
              container next-hop {
                description
                  "Specify a destination next-hop IP address";
                leaf ipv4-address {
                  when
                    "../../../traffic-type = 'ethernet'
                   or ../../../traffic-type = 'ipv4'";
                  type inet:ipv4-address-no-zone;
                  must
                    "not(../../interface or ../../pseudowire)";
                  description
                    "Specify the destination next-hop IPv4 address";
                }
    
                leaf ipv6-address {
                  when
                    "../../../traffic-type = 'ethernet'
                   or ../../../traffic-type = 'ipv6'";
                  type inet:ipv6-address-no-zone;
                  must
                    "not(../../interface or ../../pseudowire)";
                  description
                    "Specify the destination next-hop IPv6 address";
                }
              }  // container next-hop
            }  // container tx
    
            leaf inject-interface {
              type xr:Interface-name;
              description
                "Specify the attachment interface into which traffic may be injected from the SPAN session's destination";
            }
    
            container cloud-span {
              presence
                "Indicates a cloud-span node is configured.";
              description
                "Configure CloudSPAN on this session";
            }  // container cloud-span
    
            leaf discard-class {
              type uint32 {
                range "0..2";
              }
              description
                "Specify the discard class value to be set on all traffic mirrored to the destination";
            }
    
            leaf traffic-class {
              type uint32 {
                range "0..7";
              }
              description
                "Specify the traffic class value to be set on all traffic mirrored to the destination";
            }
          }  // list monitor-session
        }  // container monitor-sessions
      }  // module Cisco-IOS-XR-um-monitor-session-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.