Cisco-IOS-XE-platform-rpc

NED Platform RPC YANG module for IOS Copyright (c) 2016-2020 by Cisco Systems, Inc. All rights reserved.

  • Version: 2020-07-01

    Cisco-IOS-XE-platform-rpc@2020-07-01


    
      submodule Cisco-IOS-XE-platform-rpc {
    
        yang-version 1;
    
        belongs-to Cisco-IOS-XE-rpc {
            prefix ios-xe-rpc;
        }
    
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XE-types {
          prefix ios-types;
        }
        import cisco-semver {
          prefix cisco-semver;
        }
    
        include Cisco-IOS-XE-crypto-rpc;
        include Cisco-IOS-XE-multicast-rpc;
    
        organization "Cisco Systems";
    
        contact "<mailto:cs-yang@cisco.com>";
    
        description
          "NED Platform RPC YANG module for IOS
         Copyright (c) 2016-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-07-01" {
          description
            "Added multicast feature RPC";
        }
    
        revision "2019-11-01" {
          description
            "Added new packet tracing RPC";
        }
    
        revision "2019-07-01" {
          description
            "Establish semantic version baseline";
        }
    
        revision "2018-12-06" {
          description
            "created for NED RPC modularisation";
        }
    
        cisco-semver:module-version "3.0.0";
        cisco-semver:module-version "2.0.0";
        cisco-semver:module-version "1.0.0";
    
        grouping clear-choice-platform-case-grouping {
          container platform {
            description
              "Clear platform information";
            choice platform-choice {
              case condition-case {
                description
                  "Clear conditional debug and packet-trace configuration and data";
                container condition {
                  leaf all {
                    type empty;
                    description
                      "Clear all config and data";
                  }
                }  // container condition
              }  // case condition-case
    
              case packet-trace-case {
                description
                  "Clear packet-trace configuration and data";
                container packet-trace {
                  choice packet-trace-choice {
                    leaf configuration {
                      type empty;
                      description
                        "Clear packet-trace configuration";
                    }
                    leaf statistics {
                      type empty;
                      description
                        "Clear packet-trace statistics";
                    }
                  }  // choice packet-trace-choice
                }  // container packet-trace
              }  // case packet-trace-case
              container hardware {
                description
                  "Clear platform hardware information";
                container qfp {
                  description
                    "Quantum Flow Processor";
                  container active {
                    description
                      "Active instance";
                    container feature {
                      description
                        "Clear features";
                      choice feature-choice;
                    }  // container feature
                  }  // container active
                }  // container qfp
              }  // container hardware
            }  // choice platform-choice
          }  // container platform
        }  // grouping clear-choice-platform-case-grouping
    
        grouping direction-grouping {
          choice direction-choice {
            leaf both {
              type empty;
              description
                "Simultaneous ingress and egress debug";
            }
            leaf ingress {
              type empty;
              description "Ingress only debug";
            }
            leaf egress {
              type empty;
              description "Egress only debug";
            }
          }  // choice direction-choice
        }  // grouping direction-grouping
    
        grouping ipv4-src-dst-addr-grouping {
          choice source-choice {
            leaf src-ipv4-address-drop-node-name {
              type string;
            }
            leaf any {
              type empty;
              description "Any source host";
            }
            leaf host {
              type ios-types:ipv4-host;
              description "A single source host";
            }
          }  // choice source-choice
    
          container dst-addr-drop-node-name {
            choice destination-choice {
              leaf dest-ipv4-address-drop-node-name {
                type string;
              }
              leaf any {
                type empty;
                description
                  "Any destination host";
              }
              leaf host {
                type ios-types:ipv4-host;
                description
                  "A single destination host";
              }
            }  // choice destination-choice
          }  // container dst-addr-drop-node-name
        }  // grouping ipv4-src-dst-addr-grouping
    
        grouping ipv4-src-dst-addr-port-grouping {
          choice source-choice {
            leaf src-ipv4-address-drop-node-name {
              type string;
            }
            leaf any {
              type empty;
              description "Any source host";
            }
            leaf host {
              type ios-types:ipv4-host;
              description "A single source host";
            }
          }  // choice source-choice
    
          choice src-port-choice {
            leaf eq {
              type inet:port-number;
              description
                "Match only packets on a given port number up to 10 ports";
            }
            leaf gt {
              type inet:port-number;
              description
                "Match only packets with a greater port number";
            }
            leaf lt {
              type inet:port-number;
              description
                "Match only packets with a lower port number";
            }
            leaf neq {
              type inet:port-number;
              description
                "Match only packets not on a given port number up to 10 ports";
            }
    
            case src-range-case {
              leaf range {
                type inet:port-number;
                description
                  "Match only packets in the range of port numbers";
              }
    
              leaf src-range2-drop-node-name {
                type inet:port-number;
                description
                  "Match only packets in the range of port numbers";
              }
            }  // case src-range-case
          }  // choice src-port-choice
    
          container dst-addr-port-drop-node-name {
            choice destination-choice {
              leaf dest-ipv4-address-drop-node-name {
                type string;
              }
              leaf any {
                type empty;
                description
                  "Any destination host";
              }
              leaf host {
                type ios-types:ipv4-host;
                description
                  "A single destination host";
              }
            }  // choice destination-choice
    
            choice dst-port-choice {
              leaf eq {
                type inet:port-number;
                description
                  "Match only packets on a given port number up to 10 ports";
              }
              leaf gt {
                type inet:port-number;
                description
                  "Match only packets with a greater port number";
              }
              leaf lt {
                type inet:port-number;
                description
                  "Match only packets with a lower port number";
              }
              leaf neq {
                type inet:port-number;
                description
                  "Match only packets not on a given port number up to 10 ports";
              }
    
              case dst-range-case {
                leaf range {
                  type inet:port-number;
                  description
                    "Match only packets in the range of port numbers";
                }
    
                leaf dst-range2-drop-node-name {
                  type inet:port-number;
                  description
                    "Match only packets in the range of port numbers";
                }
              }  // case dst-range-case
            }  // choice dst-port-choice
          }  // container dst-addr-port-drop-node-name
        }  // grouping ipv4-src-dst-addr-port-grouping
    
        grouping ipv6-src-dst-addr-grouping {
          choice source-choice {
            leaf source-prefix-drop-node-name {
              type ios-types:ipv6-prefix;
            }
            leaf any {
              type empty;
            }
            leaf host {
              type ios-types:ip-host;
            }
          }  // choice source-choice
    
          container dst-addr-drop-node-name {
            choice destination-choice {
              leaf destination-prefix-drop-node-name {
                type ios-types:ipv6-prefix;
              }
              leaf any {
                type empty;
              }
              leaf host {
                type ios-types:ip-host;
              }
            }  // choice destination-choice
          }  // container dst-addr-drop-node-name
        }  // grouping ipv6-src-dst-addr-grouping
    
        grouping ipv6-src-dst-addr-port-grouping {
          choice source-choice {
            leaf source-prefix-drop-node-name {
              type ios-types:ipv6-prefix;
            }
            leaf any {
              type empty;
            }
            leaf host {
              type ios-types:ip-host;
            }
          }  // choice source-choice
    
          choice src-port-choice {
            leaf eq {
              type inet:port-number;
              description
                "Match only packets on a given port number";
            }
            leaf gt {
              type inet:port-number;
              description
                "Match only packets with a greater port number";
            }
            leaf lt {
              type inet:port-number;
              description
                "Match only packets with a lower port number";
            }
            leaf neq {
              type inet:port-number;
              description
                "Match only packets not on a given port number";
            }
    
            case src-range-case {
              leaf range {
                type inet:port-number;
                description
                  "Match only packets in the range of port numbers";
              }
    
              leaf src-range2-drop-node-name {
                type inet:port-number;
                description
                  "Match only packets in the range of port numbers";
              }
            }  // case src-range-case
          }  // choice src-port-choice
    
          container dst-addr-port-drop-node-name {
            choice destination-choice {
              leaf destination-prefix-drop-node-name {
                type ios-types:ipv6-prefix;
              }
              leaf any {
                type empty;
              }
              leaf host {
                type ios-types:ip-host;
              }
            }  // choice destination-choice
    
            choice dst-port-choice {
              leaf eq {
                type inet:port-number;
                description
                  "Match only packets on a given port number";
              }
              leaf gt {
                type inet:port-number;
                description
                  "Match only packets with a greater port number";
              }
              leaf lt {
                type inet:port-number;
                description
                  "Match only packets with a lower port number";
              }
              leaf neq {
                type inet:port-number;
                description
                  "Match only packets not on a given port number";
              }
    
              case dst-range-case {
                leaf range {
                  type inet:port-number;
                  description
                    "Match only packets in the range of port numbers";
                }
    
                leaf dst-range2-drop-node-name {
                  type inet:port-number;
                  description
                    "Match only packets in the range of port numbers";
                }
              }  // case dst-range-case
            }  // choice dst-port-choice
          }  // container dst-addr-port-drop-node-name
        }  // grouping ipv6-src-dst-addr-port-grouping
    
        grouping condition-application-grouping {
          description
            "Debug Application conditions";
          leaf app-name-drop-node-name {
            type string;
            mandatory true;
            description "Application name";
          }
    
          uses direction-grouping;
        }  // grouping condition-application-grouping
    
        grouping condition-mpls-grouping {
          description "Debug MPLS conditions";
          choice mpls-choice {
            container label-drop-node-name {
              leaf label-id-drop-node-name {
                type uint32 {
                  range "0..1048575";
                }
                mandatory true;
                description "MPLS label id";
              }
    
              leaf depth-drop-node-name {
                type uint8 {
                  range "0..127";
                }
                description
                  "Depth of specified MPLS label, 1 for top label";
              }
    
              leaf application {
                type string;
                description
                  "Debug Application conditions";
              }
    
              uses direction-grouping;
            }  // container label-drop-node-name
            container application {
              uses condition-application-grouping;
            }  // container application
    
            case direction-case {
              uses direction-grouping;
            }  // case direction-case
          }  // choice mpls-choice
        }  // grouping condition-mpls-grouping
    
        grouping condition-ipv4-grouping {
          description "Debug IPV4 conditions";
          choice ipv4-choice {
            case direction-case {
              uses direction-grouping;
            }  // case direction-case
            container ipv4addr-drop-node-name {
              leaf ip-addr-drop-node-name {
                type string;
                mandatory true;
                description
                  "IPv4 address A.B.C.D/nn";
              }
    
              choice ipv4addr-choice {
                container application {
                  uses condition-application-grouping;
                }  // container application
    
                case direction-case {
                  uses direction-grouping;
                }  // case direction-case
              }  // choice ipv4addr-choice
            }  // container ipv4addr-drop-node-name
    
            case access-list-case {
              description
                "Set acl for conditional debug";
              container access-list {
                leaf acl-name-drop-node-name {
                  type string;
                  mandatory true;
                  description "ACL name";
                }
    
                uses direction-grouping;
              }  // container access-list
            }  // case access-list-case
          }  // choice ipv4-choice
        }  // grouping condition-ipv4-grouping
    
        grouping condition-ipv6-grouping {
          description "Debug IPV6 conditions";
          choice ipv6-choice {
            case direction-case {
              uses direction-grouping;
            }  // case direction-case
            container ipv6addr-drop-node-name {
              leaf ip-addr-drop-node-name {
                type string;
                mandatory true;
                description
                  "IPv6 address X:X:X:X::X/<0-128>";
              }
    
              choice ipv6addr-choice {
                container application {
                  uses condition-application-grouping;
                }  // container application
    
                case direction-case {
                  uses direction-grouping;
                }  // case direction-case
              }  // choice ipv6addr-choice
            }  // container ipv6addr-drop-node-name
    
            case access-list-case {
              description
                "Set acl for conditional debug";
              container access-list {
                leaf acl-name-drop-node-name {
                  type string;
                  mandatory true;
                  description "ACL name";
                }
    
                uses direction-grouping;
              }  // container access-list
            }  // case access-list-case
          }  // choice ipv6-choice
        }  // grouping condition-ipv6-grouping
    
        grouping condition-match-grouping {
          description
            "Describe inline acl filters";
          choice match-choice {
            case ipv4-case {
              description
                "Debug IPv4 conditions";
              container ipv4 {
                choice ipv4-choice {
                  container protocol {
                    description "Protocols";
                    choice protocol-choice {
                      case icmp-case {
                        description
                          "Filter by ICMP protocol";
                        container icmp {
                          uses ipv4-src-dst-addr-grouping;
    
                          uses direction-grouping;
                        }  // container icmp
                      }  // case icmp-case
    
                      case tcp-case {
                        description
                          "Filter by TCP protocol";
                        container tcp {
                          uses ipv4-src-dst-addr-port-grouping;
    
                          uses direction-grouping;
                        }  // container tcp
                      }  // case tcp-case
    
                      case udp-case {
                        description
                          "Filter by UDP protocol";
                        container udp {
                          uses ipv4-src-dst-addr-port-grouping;
    
                          uses direction-grouping;
                        }  // container udp
                      }  // case udp-case
    
                      case proto-num-case {
                        description
                          "Filter by protocol number";
                        container proto-num-drop-node-name {
                          leaf protonum-drop-node-name {
                            type uint8 {
                              range "0..255";
                            }
                            mandatory true;
                            description
                              "An IP protocol number<0-255>";
                          }
    
                          uses ipv4-src-dst-addr-grouping;
    
                          uses direction-grouping;
                        }  // container proto-num-drop-node-name
                      }  // case proto-num-case
                    }  // choice protocol-choice
                  }  // container protocol
                  container ipv4-addr-drop-node-name {
                    uses ipv4-src-dst-addr-grouping;
    
                    uses direction-grouping;
                  }  // container ipv4-addr-drop-node-name
                }  // choice ipv4-choice
              }  // container ipv4
            }  // case ipv4-case
    
            case ipv6-case {
              description
                "Debug IPv6 conditions";
              container ipv6 {
                choice ipv6-choice {
                  container protocol {
                    description "Protocols";
                    choice protocol-choice {
                      case icmp-case {
                        description
                          "Filter by ICMP protocol";
                        container icmp {
                          uses ipv6-src-dst-addr-grouping;
    
                          uses direction-grouping;
                        }  // container icmp
                      }  // case icmp-case
    
                      case tcp-case {
                        description
                          "Filter by TCP protocol";
                        container tcp {
                          uses ipv6-src-dst-addr-port-grouping;
    
                          uses direction-grouping;
                        }  // container tcp
                      }  // case tcp-case
    
                      case udp-case {
                        description
                          "Filter by UDP protocol";
                        container udp {
                          uses ipv6-src-dst-addr-port-grouping;
    
                          uses direction-grouping;
                        }  // container udp
                      }  // case udp-case
    
                      case proto-num-case {
                        description
                          "Filter by protocol number";
                        container proto-num-drop-node-name {
                          leaf protonum-drop-node-name {
                            type uint8 {
                              range "0..255";
                            }
                            mandatory true;
                            description
                              "An IP protocol number<0-255>";
                          }
    
                          uses ipv6-src-dst-addr-grouping;
    
                          uses direction-grouping;
                        }  // container proto-num-drop-node-name
                      }  // case proto-num-case
                    }  // choice protocol-choice
                  }  // container protocol
                  container ipv6-addr-drop-node-name {
                    uses ipv6-src-dst-addr-grouping;
    
                    uses direction-grouping;
                  }  // container ipv6-addr-drop-node-name
                }  // choice ipv6-choice
              }  // container ipv6
            }  // case ipv6-case
          }  // choice match-choice
        }  // grouping condition-match-grouping
    
        grouping condition-interface-grouping {
          description
            "Set interface for conditional debug";
          leaf interface-name-drop-node-name {
            type string;
            mandatory true;
            description "interface name";
          }
    
          choice interface-choice {
            case direction-case {
              uses direction-grouping;
            }  // case direction-case
            container application {
              uses condition-application-grouping;
            }  // container application
            container ipv4 {
              uses condition-ipv4-grouping;
            }  // container ipv4
            container ipv6 {
              uses condition-ipv6-grouping;
            }  // container ipv6
            container match {
              uses condition-match-grouping;
            }  // container match
            container mpls {
              uses condition-mpls-grouping;
            }  // container mpls
          }  // choice interface-choice
        }  // grouping condition-interface-grouping
    
        grouping packet-trace-grouping {
          description "Debug packet trace";
          choice packet-trace-choice {
            leaf statistics {
              type empty;
              description
                "Enable packet trace statistics";
            }
            container drop {
              presence "true";
              description "Trace drops only";
              leaf code {
                type uint16 {
                  range "0..65534";
                }
                description
                  "Trace specific drop code value <0-65534>";
              }
            }  // container drop
            container inject {
              presence "true";
              description "Trace injects only";
              leaf code {
                type uint16 {
                  range "0..65534";
                }
                description
                  "Trace specific inject code value <0-65534>";
              }
            }  // container inject
            container punt {
              presence "true";
              description "Trace punt only";
              leaf code {
                type uint16 {
                  range "0..65534";
                }
                description
                  "Trace specific punt code value <0-65534>";
              }
            }  // container punt
            container packet {
              description "Packet count";
              leaf packet-num-drop-node-name {
                type uint16 {
                  range "16..8192";
                }
                mandatory true;
                description
                  "Packet count, value must be a power of two <16-8192>";
              }
    
              container option-grp1-drop-node-name {
                leaf data-size {
                  type uint16 {
                    range "2048..16384";
                  }
                  description
                    "Size of trace data in bytes, value must be a power of two <2048-16384>";
                }
    
                leaf fia-trace {
                  type empty;
                  description
                    "Trace of visited feature entries";
                }
    
                leaf circular {
                  type empty;
                  description
                    "Capture last set of packets";
                }
              }  // container option-grp1-drop-node-name
    
              container option-grp2-drop-node-name {
                leaf circular {
                  type empty;
                  description
                    "Capture last set of packets";
                }
    
                leaf summary-only {
                  type empty;
                  description
                    "Summary of the trace";
                }
              }  // container option-grp2-drop-node-name
            }  // container packet
            container copy {
              description "Copy packet data";
              container packet {
                description
                  "Copy parts of packets received or sent";
                choice direction-choice {
                  mandatory true;
                  leaf both {
                    type empty;
                    description
                      "Copy incoming and outgoing packets";
                  }
                  leaf input {
                    type empty;
                    description
                      "Copy incoming packets";
                  }
                  leaf output {
                    type empty;
                    description
                      "Copy outgoing packets";
                  }
                }  // choice direction-choice
    
                choice layer-choice {
                  leaf l2 {
                    type empty;
                    description
                      "Copy starting from layer 2";
                  }
                  leaf l3 {
                    type empty;
                    description
                      "Copy starting from layer 3";
                  }
                  leaf l4 {
                    type empty;
                    description
                      "Copy starting from layer 4";
                  }
                }  // choice layer-choice
    
                leaf size {
                  type uint16 {
                    range "16..2048";
                  }
                  description
                    "Packet size in bytes, value must be a power of two";
                }
              }  // container packet
            }  // container copy
          }  // choice packet-trace-choice
        }  // grouping packet-trace-grouping
    
        grouping debug-choice-platform-case-grouping {
          container platform {
            description
              "Debug platform information";
            choice platform-choice {
              container condition {
                choice condition-choice {
                  leaf start {
                    type empty;
                    description
                      "Start conditional debug";
                  }
                  leaf stop {
                    type empty;
                    description
                      "Stop conditional debug";
                  }
                  container direction-drop-node-name {
                    uses direction-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container direction-drop-node-name
                  container application {
                    uses condition-application-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container application
                  container mpls {
                    uses condition-mpls-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container mpls
                  container ipv4 {
                    uses condition-ipv4-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container ipv4
                  container ipv6 {
                    uses condition-ipv6-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container ipv6
                  container match {
                    uses condition-match-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container match
                  container interface {
                    uses condition-interface-grouping;
    
                    leaf no {
                      type empty;
                      description
                        "for no debug platform ...";
                    }
                  }  // container interface
                  container feature {
                    description
                      "For a specific feature";
                    choice feature-choice {
                      case ipsec-case {
                        uses debug-platform-condition-feature-ipsec-grouping;
                      }  // case ipsec-case
    
                      case multicast-case {
                        uses debug-platform-condition-feature-multicast-grouping;
                      }  // case multicast-case
                    }  // choice feature-choice
                  }  // container feature
                }  // choice condition-choice
              }  // container condition
              container packet-trace {
                uses packet-trace-grouping;
    
                leaf no {
                  type empty;
                  description
                    "for no debug platform ...";
                }
              }  // container packet-trace
            }  // choice platform-choice
          }  // container platform
        }  // grouping debug-choice-platform-case-grouping
      }  // submodule Cisco-IOS-XE-platform-rpc
    

© 2023 YumaWorks, Inc. All rights reserved.