Cisco-IOS-XR-ethernet-cfm-act

This module contains a collection of YANG definitions for Cisco IOS-XR ethernet ping and traceroute actions. Copyright (c) 2020...

  • Version: 2020-11-19

    Cisco-IOS-XR-ethernet-cfm-act@2020-11-19


    
      module Cisco-IOS-XR-ethernet-cfm-act {
    
        yang-version 1.1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-ethernet-cfm-act";
    
        prefix ethernet-cfm-act;
    
        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 module contains a collection of YANG definitions
         for Cisco IOS-XR ethernet ping and traceroute actions.
         
         Copyright (c) 2020-2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-11-19" {
          description "IOS XR 7.4.1 revision.";
        }
    
        semver:module-version "1.0.0";
    
        typedef cfm-version-type {
          type uint8 {
            range "0..31";
          }
          description "CFM protocol version";
        }
    
        typedef cfm-cos-type {
          type uint8 {
            range "0..7";
          }
          description "Class of Service value";
        }
    
        typedef cfm-exploratory-traceroute-reply-filter-type {
          type enumeration {
            enum "default" {
              value 0;
              description
                "Default Reply Filtering";
            }
            enum "all-ports" {
              value 1;
              description
                "Request Replies from all ports";
            }
          }
          description
            "Reply Filter for exploratory linktrace replies";
        }
    
        typedef Mac-address {
          type yang:mac-address;
          description "MAC address type";
        }
    
        typedef Cfm-pm-lt-mode {
          type enumeration {
            enum "cfm-pm-lt-mode-basic" {
              value 1;
              description
                "Basic IEEE 802.1ag Linktrace";
            }
            enum "cfm-pm-lt-mode-exploratory" {
              value 2;
              description
                "Cisco Exploratory Linktrace";
            }
          }
          description
            "Type of Linktrace operation";
        }
    
        typedef Cfm-bag-optional-hex-data {
          type yang:hex-string;
          description
            "Hex binary data which may be optionally present.";
        }
    
        typedef Cfm-bag-optional-string {
          type string;
          description
            "String which may be optionally present.";
        }
    
        typedef Cfm-bag-md-level {
          type enumeration {
            enum "level0" {
              value 0;
              description "CFM level 0";
            }
            enum "level1" {
              value 1;
              description "CFM level 1";
            }
            enum "level2" {
              value 2;
              description "CFM level 2";
            }
            enum "level3" {
              value 3;
              description "CFM level 3";
            }
            enum "level4" {
              value 4;
              description "CFM level 4";
            }
            enum "level5" {
              value 5;
              description "CFM level 5";
            }
            enum "level6" {
              value 6;
              description "CFM level 6";
            }
            enum "level7" {
              value 7;
              description "CFM level 7";
            }
          }
          description "CFM level";
        }
    
        typedef Cfm-pm-elr-egress-action {
          type enumeration {
            enum "elr-egress-ok" {
              value 1;
              description "Egress port is OK";
            }
            enum "elr-egress-down" {
              value 2;
              description "Egress port is down";
            }
            enum "elr-egress-blocked" {
              value 3;
              description
                "Egress port is STP Blocked";
            }
            enum "elr-egress-vid" {
              value 4;
              description
                "Egress port is VID Blocked";
            }
            enum "elr-egress-mac" {
              value 255;
              description
                "Egress port is MAC Pruned";
            }
          }
          description
            "Egress actions used in the Reply Egress TLV";
        }
    
        typedef Cfm-pm-elr-ingress-action {
          type enumeration {
            enum "elr-ingress-ok" {
              value 1;
              description "Ingress port is OK";
            }
            enum "elr-ingress-down" {
              value 2;
              description "Ingress port is down";
            }
            enum "elr-ingress-blocked" {
              value 3;
              description
                "Ingress port is STP Blocked";
            }
            enum "elr-ingress-vid" {
              value 4;
              description
                "Ingress port is VID Blocked";
            }
          }
          description
            "Ingress actions used in the Reply Ingress TLV";
        }
    
        typedef Cfm-pm-elr-relay-action {
          type enumeration {
            enum "elr-relay-hit" {
              value 1;
              description "ELR target Hit";
            }
            enum "elr-relay-fdb" {
              value 2;
              description
                "ELR forwarded by filtering database";
            }
            enum "elr-relay-flood" {
              value 3;
              description
                "ELR has been flood forwarded";
            }
            enum "elr-relay-drop" {
              value 4;
              description "ELR has been ropped";
            }
          }
          description
            "ELR Relay actions, used in ELRs";
        }
    
        typedef Cfm-pm-last-hop-fmt {
          type enumeration {
            enum "last-hop-none" {
              value 0;
              description
                "No last hop identifier";
            }
            enum "last-hop-host-name" {
              value 1;
              description
                "Last hop identifier is a hostname";
            }
            enum "last-hop-egress-id" {
              value 2;
              description
                "Last hop identifier is an egress ID";
            }
          }
          description
            "Last hop identifier format";
        }
    
        typedef Cfm-pm-egress-action {
          type enumeration {
            enum "egress-ok" {
              value 1;
              description "Egress port is OK";
            }
            enum "egress-down" {
              value 2;
              description "Egress port is down";
            }
            enum "egress-blocked" {
              value 3;
              description
                "Egress port is STP Blocked";
            }
            enum "egress-vid" {
              value 4;
              description
                "Egress port is VID Blocked";
            }
          }
          description "Egress action";
        }
    
        typedef Cfm-pm-port-id-fmt {
          type enumeration {
            enum "port-id-interface-alias" {
              value 1;
              description
                "Port ID is an interface alias";
            }
            enum "port-id-port-component" {
              value 2;
              description
                "Port ID is a component name";
            }
            enum "port-id-mac-address" {
              value 3;
              description
                "Port ID is a MAC address";
            }
            enum "port-id-network-address" {
              value 4;
              description
                "Port ID is a network address";
            }
            enum "port-id-interface-name" {
              value 5;
              description
                "Port ID is an interface name";
            }
            enum "port-id-agent-circuit-id" {
              value 6;
              description
                "Port ID is an agent name";
            }
            enum "port-id-local" {
              value 7;
              description
                "Port ID is a local name";
            }
            enum "port-id-unknown" {
              value 8;
              description
                "Port ID format unknown";
            }
          }
          description "Port ID format";
        }
    
        typedef Cfm-pm-ingress-action {
          type enumeration {
            enum "ingress-ok" {
              value 1;
              description "Ingress port is OK";
            }
            enum "ingress-down" {
              value 2;
              description "Ingress port is down";
            }
            enum "ingress-blocked" {
              value 3;
              description
                "Ingress port is STP Blocked";
            }
            enum "ingress-vid" {
              value 4;
              description
                "Ingress port is VID Blocked";
            }
          }
          description
            "Ingress actions used in the Reply Ingress TLV";
        }
    
        typedef Cfm-pm-id-fmt {
          type enumeration {
            enum "id-format-is-string" {
              value 0;
              description
                "ID format is a string";
            }
            enum "id-format-is-mac-address" {
              value 1;
              description
                "ID format is a MAC address";
            }
            enum "id-format-is-raw-hex" {
              value 2;
              description "ID format is raw hex";
            }
          }
          description
            "Port or chassis ID format";
        }
    
        typedef Cfm-pm-chassis-id-fmt {
          type enumeration {
            enum "chassis-id-chassis-component" {
              value 1;
              description
                "Chassis ID is a component name";
            }
            enum "chassis-id-interface-alias" {
              value 2;
              description
                "Chassis ID is an interface alias";
            }
            enum "chassis-id-port-component" {
              value 3;
              description
                "Chassis ID is a port component name";
            }
            enum "chassis-id-mac-address" {
              value 4;
              description
                "Chassis ID is a MAC address";
            }
            enum "chassis-id-network-address" {
              value 5;
              description
                "Chassis ID is a network address";
            }
            enum "chassis-id-interface-name" {
              value 6;
              description
                "Chassis ID is an interface name";
            }
            enum "chassis-id-local" {
              value 7;
              description
                "Chassis ID is a local name";
            }
            enum "chassis-id-unknown-type" {
              value 8;
              description
                "Unknown Chassis ID type";
            }
          }
          description "Chassis ID type";
        }
    
        typedef Cfm-pm-relay-action {
          type enumeration {
            enum "relay-hit" {
              value 1;
              description "LTR target Hit";
            }
            enum "relay-fdb" {
              value 2;
              description
                "LTR forwarded by filtering database";
            }
            enum "relay-mpdb" {
              value 3;
              description
                "LTR forwarded by CCM Learning database";
            }
          }
          description "LTR relay action";
        }
    
        typedef Cfm-pm-elm-reply-filter {
          type enumeration {
            enum "reply-filter-not-present" {
              value 0;
              description
                "Reply Filter not present";
            }
            enum "reply-filter-default" {
              value 1;
              description
                "Reply from ports which are not MAC-pruned,
               VID-pruned, or STP-blocked";
            }
            enum "reply-filter-vlan-topology" {
              value 2;
              description
                "Reply from ports which are not VID-pruned or
               STP-blocked";
            }
            enum "reply-filter-spanning-tree" {
              value 3;
              description
                "Reply from ports which are not STP-blocked";
            }
            enum "reply-filter-all-ports" {
              value 4;
              description "Reply from all ports";
            }
          }
          description
            "Reply filter used for Exploratory Linktrace
           operations. Most of these values can't be returned alias
           cfm-exploratory-traceroute-reply-filter-type is used as input";
        }
    
        typedef Cfm-pm-elt-delay-model {
          type enumeration {
            enum "delay-model-invalid" {
              value 0;
              description
                "Not a valid delay model";
            }
            enum "delay-model-logarithmic" {
              value 1;
              description
                "Reply using logarithmic delay model";
            }
            enum "delay-model-constant" {
              value 2;
              description
                "Reply using constant delay model";
            }
          }
          description
            "Delay model used for Exploratory Linktrace
           operations";
        }
    
        grouping CFM-PM-EGRESS-ID-TYPE {
          description "Egress ID";
          leaf unique-id {
            type uint16;
            mandatory true;
            description "Egress port unique ID";
          }
    
          leaf mac-address {
            type Mac-address;
            mandatory true;
            description
              "Egress port MAC address";
          }
        }  // grouping CFM-PM-EGRESS-ID-TYPE
    
        grouping CFM-PM-PORT-ID-VAL {
          description "Port ID Value";
          leaf port-id-format {
            type Cfm-pm-id-fmt;
            mandatory true;
            description
              "Format that the port ID takes: string, MAC or raw";
          }
    
          leaf port-id-string {
            when
              "../port-id-format = 'id-format-is-string'" {
              description
                "Identify port by string";
            }
            type Cfm-bag-optional-string;
            mandatory true;
            description "Port ID String";
          }
    
          leaf port-id-mac {
            when
              "../port-id-format = 'id-format-is-mac-address'" {
              description
                "Identify port by MAC address";
            }
            type Mac-address;
            mandatory true;
            description "Port ID MAC Address";
          }
    
          leaf port-id-raw {
            when
              "../port-id-format != 'id-format-is-string' and ../port-id-format != 'id-format-is-mac-address'" {
              description "Identify port";
            }
            type Cfm-bag-optional-hex-data;
            mandatory true;
            description "Undecoded Port ID";
          }
        }  // grouping CFM-PM-PORT-ID-VAL
    
        grouping CFM-PM-PORT-ID {
          description
            "The type of port ID and its format and value";
          container port-id-value {
            description "Port ID (Current)";
            uses CFM-PM-PORT-ID-VAL;
          }  // container port-id-value
    
          leaf port-id-type {
            type Cfm-pm-port-id-fmt;
            mandatory true;
            description "Port ID type";
          }
    
          leaf port-id-type-value {
            type uint8;
            mandatory true;
            description
              "Port ID type numerical value";
          }
    
          leaf port-id {
            type yang:hex-string;
            status deprecated;
            description "Port ID (Deprecated)";
          }
        }  // grouping CFM-PM-PORT-ID
    
        grouping CFM-PM-ELR-REPLY-EGRESS {
          description "ELR Reply egress TLV";
          container last-egress-id {
            description "Last Egress ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.3";
    
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container last-egress-id
    
          container next-egress-id {
            description "Next Egress ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.4";
    
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container next-egress-id
    
          container port-id {
            presence "true";
            description "ELR egress port ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.13";
    
            uses CFM-PM-PORT-ID;
          }  // container port-id
    
          leaf action {
            type Cfm-pm-elr-egress-action;
            mandatory true;
            description "Reply egress action";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.10";
    
          }
    
          leaf mac-address {
            type Mac-address;
            mandatory true;
            description
              "MAC address of egress interface";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.11";
    
          }
        }  // grouping CFM-PM-ELR-REPLY-EGRESS
    
        grouping CFM-PM-ELR-REPLY-INGRESS {
          description "ELR Reply ingress TLV";
          container last-egress-id {
            description "Last egress ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.3";
    
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container last-egress-id
    
          container next-egress-id {
            description "Next egress ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.4";
    
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container next-egress-id
    
          container port-id {
            presence "true";
            description
              "ELR reply ingress port ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.9";
    
            uses CFM-PM-PORT-ID;
          }  // container port-id
    
          leaf action {
            type Cfm-pm-elr-ingress-action;
            mandatory true;
            description
              "ELR Reply ingress action";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.6";
    
          }
    
          leaf mac-address {
            type Mac-address;
            mandatory true;
            description "MAC address";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.7";
    
          }
        }  // grouping CFM-PM-ELR-REPLY-INGRESS
    
        grouping CFM-PM-ELR-HDR {
          description "ELR frame header";
          leaf level {
            type Cfm-bag-md-level;
            mandatory true;
            description "MD level";
          }
    
          leaf version {
            type cfm-version-type;
            mandatory true;
            description "CFM protocol version";
          }
    
          leaf forwarded {
            type boolean;
            mandatory true;
            description "ELR was forwarded";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.1";
    
          }
    
          leaf terminal-mep {
            type boolean;
            mandatory true;
            description "Terminal MEP reached";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.1";
    
          }
    
          leaf reply-filter-unknown {
            type boolean;
            mandatory true;
            description
              "Reply Filter unrecognized";
          }
    
          leaf transaction-id {
            type uint32;
            mandatory true;
            description "ELR transaction ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.1";
    
          }
    
          leaf ttl {
            type uint8;
            mandatory true;
            description "Time to Live";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.2";
    
          }
    
          leaf relay-action {
            type Cfm-pm-elr-relay-action;
            mandatory true;
            description "Relay action";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.5";
    
          }
    
          leaf next-hop-timeout {
            type uint32;
            units "second";
            mandatory true;
            description
              "Next Hop Timeout, in seconds";
          }
    
          leaf delay-model {
            type Cfm-pm-elt-delay-model;
            mandatory true;
            description
              "Delay model for delay calculations";
            reference
              "IEEE 802.1Q-2018 Fig N-2";
    
          }
        }  // grouping CFM-PM-ELR-HDR
    
        grouping CFM-PM-CHASSIS-ID-VAL {
          description "Chassis ID Value";
          leaf chassis-id-format {
            type Cfm-pm-id-fmt;
            mandatory true;
            description "ChassisIDFormat";
          }
    
          leaf chassis-id-string {
            when
              "../chassis-id-format = 'id-format-is-string'" {
              description
                "Identify chassis by string";
            }
            type Cfm-bag-optional-string;
            mandatory true;
            description "Chassis ID String";
          }
    
          leaf chassis-id-mac {
            when
              "../chassis-id-format = 'id-format-is-mac-address'" {
              description
                "Identify chassis by MAC address";
            }
            type Mac-address;
            mandatory true;
            description "Chassis ID MAC Address";
          }
    
          leaf chassis-id-raw {
            when
              "../chassis-id-format != 'id-format-is-string' and ../chassis-id-format != 'id-format-is-mac-address'" {
              description "Identify chassis";
            }
            type Cfm-bag-optional-hex-data;
            mandatory true;
            description "Undecoded Chassis ID";
          }
        }  // grouping CFM-PM-CHASSIS-ID-VAL
    
        grouping CFM-PM-CHASSIS-ID {
          description
            "Chassis ID type, format and value";
          container chassis-id-value {
            description "Chassis ID (Current)";
            uses CFM-PM-CHASSIS-ID-VAL;
          }  // container chassis-id-value
    
          leaf chassis-id-type {
            type Cfm-pm-chassis-id-fmt;
            mandatory true;
            description "Chassis ID Type";
          }
    
          leaf chassis-id-type-value {
            type uint8;
            mandatory true;
            description
              "Chassis ID numerical value Type";
          }
    
          leaf chassis-id {
            type yang:hex-string;
            status deprecated;
            description
              "Chassis ID (Deprecated)";
          }
        }  // grouping CFM-PM-CHASSIS-ID
    
        grouping CFM-PM-SENDER-ID {
          description "Sender ID TLV";
          container chassis-id {
            presence "true";
            description "Sender chassis ID";
            reference
              "IEEE 802.1Q-2018 Sn 21.5.3.3";
    
            uses CFM-PM-CHASSIS-ID;
          }  // container chassis-id
    
          leaf management-address-domain {
            type yang:hex-string;
            description
              "Management address domain";
            reference
              "IEEE 802.1Q-2018 Sn 21.5.3.5";
    
          }
    
          leaf management-address {
            type yang:hex-string;
            must "../management-address-domain";
            description "Management address";
            reference
              "IEEE 802.1Q-2018 Sn 21.5.3.7";
    
          }
        }  // grouping CFM-PM-SENDER-ID
    
        grouping CFM-PM-LAST-HOP {
          description "Last hop type";
          container egress-id {
            when
              "../last-hop-format = 'last-hop-egress-id'" {
              description
                "Identify last hop by egress id";
            }
            description "Egress ID";
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container egress-id
    
          leaf last-hop-format {
            type Cfm-pm-last-hop-fmt;
            mandatory true;
            description
              "Format last hop identifier takes";
          }
    
          leaf host-name {
            when
              "../last-hop-format = 'last-hop-host-name'" {
              description
                "Identify last hop by hostname";
            }
            type Cfm-bag-optional-string;
            mandatory true;
            description
              "Identify last hop by hostname";
          }
        }  // grouping CFM-PM-LAST-HOP
    
        grouping CFM-PM-UNKNOWN-TLV {
          description "Unknown TLV";
          leaf typecode {
            type uint8;
            mandatory true;
            description "Type code of TLV";
          }
    
          leaf value {
            type yang:hex-string;
            description "Binary data in TLV";
          }
        }  // grouping CFM-PM-UNKNOWN-TLV
    
        grouping CFM-PM-ORG-SPEC-TLV {
          description
            "Organizational-specific TLV";
          leaf oui {
            type yang:hex-string;
            mandatory true;
            description
              "Organizationally-unique ID";
          }
    
          leaf subtype {
            type uint8;
            mandatory true;
            description "Subtype of TLV";
          }
    
          leaf value {
            type yang:hex-string;
            description "Binary data in TLV";
          }
        }  // grouping CFM-PM-ORG-SPEC-TLV
    
        grouping CFM-PM-ELR {
          description
            "Exploratory Linktrace Reply (ELR) message ";
          container header {
            description "ELR frame header";
            uses CFM-PM-ELR-HDR;
          }  // container header
    
          container sender-id {
            presence
              "ELR contained a sender-id TLV";
            description "Sender ID TLV";
            uses CFM-PM-SENDER-ID;
          }  // container sender-id
    
          container reply-ingress {
            presence
              "Indicates existence of reply ingress TLV";
            description "Reply ingress TLV";
            uses CFM-PM-ELR-REPLY-INGRESS;
          }  // container reply-ingress
    
          container reply-egress {
            presence
              "Indicates existence of reply egress TLV";
            description "Reply egress TLV";
            uses CFM-PM-ELR-REPLY-EGRESS;
          }  // container reply-egress
    
          container last-hop {
            description "Last hop ID";
            uses CFM-PM-LAST-HOP;
          }  // container last-hop
    
          leaf raw-data {
            type yang:hex-string;
            mandatory true;
            description "Undecoded frame";
          }
    
          list organization-specific-tlv {
            description
              "Organizational-specific TLVs";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.15";
    
            uses CFM-PM-ORG-SPEC-TLV;
          }  // list organization-specific-tlv
    
          list unknown-tlv {
            description "Unknown TLVs";
            uses CFM-PM-UNKNOWN-TLV;
          }  // list unknown-tlv
        }  // grouping CFM-PM-ELR
    
        grouping CFM-PM-REPLY-EGRESS {
          description "Reply egress TLV";
          container port-id {
            description "Port ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.13";
    
            uses CFM-PM-PORT-ID;
          }  // container port-id
    
          leaf action {
            type Cfm-pm-egress-action;
            mandatory true;
            description "Reply egress action";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.10";
    
          }
    
          leaf mac-address {
            type Mac-address;
            mandatory true;
            description
              "Reply egress MAC address";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.11";
    
          }
        }  // grouping CFM-PM-REPLY-EGRESS
    
        grouping CFM-PM-REPLY-INGRESS {
          description "Reply ingress TLV";
          container port-id {
            description "Port ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.9";
    
            uses CFM-PM-PORT-ID;
          }  // container port-id
    
          leaf action {
            type Cfm-pm-ingress-action;
            mandatory true;
            description "Reply ingress action";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.6";
    
          }
    
          leaf mac-address {
            type Mac-address;
            mandatory true;
            description
              "Reply ingress MAC address";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.7";
    
          }
        }  // grouping CFM-PM-REPLY-INGRESS
    
        grouping CFM-PM-LTR-EGRESS-ID {
          description "LTR Egress ID TLV";
          container last-egress-id {
            description "Last egress ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.3";
    
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container last-egress-id
    
          container next-egress-id {
            description "Next egress ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.4";
    
            uses CFM-PM-EGRESS-ID-TYPE;
          }  // container next-egress-id
        }  // grouping CFM-PM-LTR-EGRESS-ID
    
        grouping CFM-PM-LTR-HDR {
          description "LTR frame header";
          leaf level {
            type Cfm-bag-md-level;
            mandatory true;
            description "LTR MD level";
          }
    
          leaf version {
            type cfm-version-type;
            mandatory true;
            description "CFM protocol version";
          }
    
          leaf use-fdb-only {
            type boolean;
            mandatory true;
            description "Use filtering DB only";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.1";
    
          }
    
          leaf forwarded {
            type boolean;
            mandatory true;
            description "LTR was forwarded";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.1";
    
          }
    
          leaf terminal-mep {
            type boolean;
            mandatory true;
            description "Terminal MEP reached";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.1";
    
          }
    
          leaf transaction-id {
            type uint32;
            mandatory true;
            description "Transaction ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.1";
    
          }
    
          leaf ttl {
            type uint8;
            mandatory true;
            description "Time to live";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.2";
    
          }
    
          leaf relay-action {
            type Cfm-pm-relay-action;
            mandatory true;
            description
              "Relay action for the LTR";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.5";
    
          }
        }  // grouping CFM-PM-LTR-HDR
    
        grouping CFM-PM-LTR {
          description
            "Linktrace reply (LTR) message ";
          container header {
            description "LTR frame header";
            uses CFM-PM-LTR-HDR;
          }  // container header
    
          container sender-id {
            presence
              "Indicates LTR contained a sender-id TLV";
            description "Sender ID TLV";
            uses CFM-PM-SENDER-ID;
          }  // container sender-id
    
          container egress-id {
            presence
              "Indicates LTR contains an egress ID TLV";
            description "Egress ID TLV";
            uses CFM-PM-LTR-EGRESS-ID;
          }  // container egress-id
    
          container reply-ingress {
            presence
              "Indicates existence of reply ingress TLV";
            description "Reply ingress TLV";
            uses CFM-PM-REPLY-INGRESS;
          }  // container reply-ingress
    
          container reply-egress {
            presence
              "Indicates existence of reply egress TLV";
            description "Reply egress TLV";
            uses CFM-PM-REPLY-EGRESS;
          }  // container reply-egress
    
          container last-hop {
            description "Last hop ID";
            uses CFM-PM-LAST-HOP;
          }  // container last-hop
    
          leaf raw-data {
            type yang:hex-string;
            mandatory true;
            description "Undecoded frame";
          }
    
          list organization-specific-tlv {
            description
              "Organizational-specific TLVs";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.2.15";
    
            uses CFM-PM-ORG-SPEC-TLV;
          }  // list organization-specific-tlv
    
          list unknown-tlv {
            description "Unknown TLVs";
            uses CFM-PM-UNKNOWN-TLV;
          }  // list unknown-tlv
        }  // grouping CFM-PM-LTR
    
        grouping CFM-PM-LT-OPTS-EXPLORATORY {
          description
            "options for an Exploratory Linktrace";
          leaf delay-model {
            type Cfm-pm-elt-delay-model;
            mandatory true;
            description
              "Delay model for delay calculations";
          }
    
          leaf delay-constant-factor {
            type uint32;
            mandatory true;
            description
              "Constant Factor for delay calculations";
          }
    
          leaf reply-filter {
            type Cfm-pm-elm-reply-filter;
            mandatory true;
            description
              "Reply Filtering mode used by responders";
          }
        }  // grouping CFM-PM-LT-OPTS-EXPLORATORY
    
        grouping CFM-PM-LT-OPTS-BASIC {
          description
            "Options for a basic IEEE 802.1ag Linktrace used in response";
          leaf is-auto {
            type boolean;
            mandatory true;
            description
              "Traceroute was initiated automatically";
          }
    
          leaf fdb-only {
            type boolean;
            mandatory true;
            description
              "Only use the Filtering Database for forwarding
             lookups";
          }
        }  // grouping CFM-PM-LT-OPTS-BASIC
    
        grouping CFM-PM-LT-OPTS {
          description
            "Options affecting the behavior of the traceroute";
          container basic-options {
            when
              "../mode = 'cfm-pm-lt-mode-basic'" {
              description "Use basic options";
            }
            description
              "Options for a basic IEEE 802.1ag Linktrace";
            uses CFM-PM-LT-OPTS-BASIC;
          }  // container basic-options
    
          container exploratory-options {
            when
              "../mode = 'cfm-pm-lt-mode-exploratory'" {
              description
                "Use exploratory options";
            }
            description
              "Options for an Exploratory Linktrace";
            uses CFM-PM-LT-OPTS-EXPLORATORY;
          }  // container exploratory-options
    
          leaf mode {
            type Cfm-pm-lt-mode;
            mandatory true;
            description
              "Which linktrace mode to use: exploratory or basic";
          }
        }  // grouping CFM-PM-LT-OPTS
    
        grouping CFM-PM-LT-INFO {
          description
            "Information about a traceroute request used in response";
          container options {
            description
              "Options affecting traceroute behavior";
            uses CFM-PM-LT-OPTS;
          }  // container options
    
          leaf domain {
            type string;
            mandatory true;
            description
              "Maintenance domain name";
          }
    
          leaf service {
            type string;
            mandatory true;
            description "Service name";
          }
    
          leaf level {
            type Cfm-bag-md-level;
            mandatory true;
            description "Maintenance level";
          }
    
          leaf source-mep-id {
            type uint16 {
              range "1..8191";
            }
            mandatory true;
            description "Source MEP ID";
          }
    
          leaf source-interface {
            type xr:Interface-name;
            mandatory true;
            description "Source interface";
          }
    
          leaf source-mac-address {
            type Mac-address;
            mandatory true;
            description "Source MAC address";
          }
    
          leaf target-mac-address {
            type Mac-address;
            mandatory true;
            description "Target MAC address";
          }
    
          leaf directed-mac-address {
            type Mac-address;
            description "Directed MAC address";
          }
    
          leaf target-mep-id {
            type uint16 {
              range "1..8191";
            }
            mandatory true;
            description "Target MEP ID";
          }
    
          leaf timestamp {
            type uint64;
            units "second";
            mandatory true;
            description
              "Timestamp when linktrace initiated (seconds since epoch))";
          }
    
          leaf ttl {
            type uint8;
            mandatory true;
            description "Time to live";
          }
    
          leaf transaction-id {
            type uint32;
            mandatory true;
            description "Transaction ID";
            reference
              "IEEE 802.1Q-2018 Sn 20.41.1";
    
          }
        }  // grouping CFM-PM-LT-INFO
    
        grouping CFM-PM-MEP-TR-CACHE-BAG {
          description "Traceroute result output";
          container traceroute-information {
            description
              "Information about the traceroute operation";
            uses CFM-PM-LT-INFO;
          }  // container traceroute-information
    
          leaf replies-dropped {
            type uint32;
            mandatory true;
            description
              "Count of ignored replies for this request";
          }
    
          list linktrace-reply {
            description
              "Received linktrace replies";
            uses CFM-PM-LTR;
          }  // list linktrace-reply
    
          list exploratory-linktrace-reply {
            description
              "Received exploratory linktrace replies";
            uses CFM-PM-ELR;
          }  // list exploratory-linktrace-reply
        }  // grouping CFM-PM-MEP-TR-CACHE-BAG
    
        grouping TRACEROUTE-PING-CFM-INFO-TYPE {
          description
            "CFM domain and service specification";
          leaf domain {
            type string;
            mandatory true;
            description "Specify name of domain";
          }
    
          leaf service {
            type string;
            mandatory true;
            description
              "Specify name of service";
          }
        }  // grouping TRACEROUTE-PING-CFM-INFO-TYPE
    
        grouping TRACEROUTE-PING-REMOTE-TARGET-TYPE {
          description
            "Information on remote session target";
          leaf mac {
            type yang:mac-address;
            description "Target MAC address";
          }
    
          leaf target-mep-id {
            type uint16 {
              range "1..8191";
            }
            description "Target MEP ID";
          }
        }  // grouping TRACEROUTE-PING-REMOTE-TARGET-TYPE
    
        grouping TRACEROUTE-PING-SOURCE-TYPE {
          description
            "Specify ping or traceroute source";
          leaf source-mep-id {
            type uint16 {
              range "1..8191";
            }
            description "Specify source MEP";
          }
    
          leaf source-interface-name {
            type string;
            mandatory true;
            description
              "Specify source interface";
          }
        }  // grouping TRACEROUTE-PING-SOURCE-TYPE
    
        rpc traceroute-ethernet-cfm {
          xr:xr-task "ethernet-services";
          description "Send a linktrace message";
          input {
            uses TRACEROUTE-PING-CFM-INFO-TYPE;
    
            uses TRACEROUTE-PING-REMOTE-TARGET-TYPE;
    
            uses TRACEROUTE-PING-SOURCE-TYPE;
    
            leaf explore {
              type boolean;
              description
                "Perform an exploratory traceroute";
            }
    
            leaf from {
              type yang:mac-address;
              must
                "../explore and ../explore = 'true'";
              description
                "MAC address to explore beyond";
            }
    
            leaf reply_filter {
              type cfm-exploratory-traceroute-reply-filter-type;
              must
                "not(../explore) or ../explore = 'false'";
              description
                "Replay filtering on all ports.Only specify if Explore is FALSE";
            }
    
            leaf cos {
              type cfm-cos-type;
              description "Class of Service";
            }
    
            leaf timeout {
              type uint32 {
                range "1..31535999";
              }
              units "seconds";
              default "5";
              description
                "Seconds to wait for each response";
            }
    
            leaf fdb_only {
              type boolean;
              must
                "not(../explore) or ../explore = 'false'";
              description
                "Replies based on Filtering DB. Only specify if Explore is FALSE";
            }
    
            leaf ttl {
              type uint16 {
                range "1..255";
              }
              default "64";
              description
                "Specify the initial TTL";
            }
          }
    
          output {
            uses CFM-PM-MEP-TR-CACHE-BAG;
          }
        }  // rpc traceroute-ethernet-cfm
    
        rpc ping-ethernet-cfm {
          xr:xr-task "ethernet-services";
          description
            "Initiate a ping operation";
          input {
            uses TRACEROUTE-PING-CFM-INFO-TYPE;
    
            uses TRACEROUTE-PING-REMOTE-TARGET-TYPE;
    
            uses TRACEROUTE-PING-SOURCE-TYPE;
    
            leaf interval {
              type uint32 {
                range "1..4294967295";
              }
              units "seconds";
              default "1";
              description
                "Interval between ping messages (seconds)";
            }
    
            leaf timeout {
              type uint32 {
                range "1..2147483647";
              }
              units "seconds";
              default "5";
              description
                "Timeout for each ping response (seconds)";
            }
    
            leaf count {
              type uint32 {
                range "1..1000000";
              }
              default "5";
              description
                "Number of ping messages to send";
            }
    
            leaf data-length {
              type uint16 {
                range "22..10000";
              }
              units "bytes";
              description
                "Minimum size to pad ping frame to, in bytes";
            }
    
            leaf data-pattern {
              type yang:hex-string;
              description
                "Pattern of hexadecimal data to include.";
            }
    
            leaf cos {
              type cfm-cos-type;
              description "Class of Service";
            }
          }
    
          output {
            leaf lbrs-rcvd {
              type uint32;
              mandatory true;
              description
                "Number of loopback replies received";
              reference
                "IEEE 802.1Q-2018 Sn 20.30.7";
    
            }
    
            leaf lbrs-out-of-sequence {
              type uint32;
              mandatory true;
              description
                "Number of loopback replies received out-of-sequence";
            }
    
            leaf lbrs-bad-data {
              type uint32;
              mandatory true;
              description
                "Number of loopback rpls rcvd with non-matching user-specified data";
            }
    
            leaf rtt-min {
              type uint32;
              units "milliseconds";
              mandatory true;
              description
                "Minimum round-trip time (in milliseconds)";
            }
    
            leaf rtt-avg {
              type uint32;
              units "milliseconds";
              mandatory true;
              description
                "Average round-trip time (in milliseconds)";
            }
    
            leaf rtt-max {
              type uint32;
              units "milliseconds";
              mandatory true;
              description
                "Maximum round-trip time (in milliseconds)";
            }
    
            leaf rcvd-duration {
              type uint32;
              units "milliseconds";
              mandatory true;
              description
                "Time between first and last loopback replies received (in ms)";
            }
          }
        }  // rpc ping-ethernet-cfm
      }  // module Cisco-IOS-XR-ethernet-cfm-act
    

© 2023 YumaWorks, Inc. All rights reserved.