huawei-nqa-instance

Description of submodule nqa-instance.

  • Version: 2021-04-29

    huawei-nqa-instance@2021-04-29


    
      submodule huawei-nqa-instance {
    
        yang-version 1;
    
        belongs-to huawei-nqa {
            prefix nqa;
        }
    
        import huawei-pub-type {
          prefix pub-type;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import huawei-extension {
          prefix ext;
        }
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-ifm {
          prefix ifm;
        }
        import ietf-yang-types {
          prefix yang;
        }
    
        include huawei-nqa-type;
        include huawei-nqa-test-flow;
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
         Bantian, Longgang
         Shenzhen 518129
         People's Republic of China
         Website: http://www.huawei.com
         Email: support@huawei.com";
    
        description
          "Description of submodule nqa-instance.";
    
        revision "2021-04-29" {
          description
            "Add ethernet-service test instance.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-03-19" {
          description
            "Modify default-value of probe-count, jitter-packet-num, and data-size in a jitter test instance.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-09-24" {
          description
            "Add MAC ping test instance.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-03-09" {
          description "Modify send-trap-bits.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-19" {
          description "Modify ni-name.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-14" {
          description "Modify execution-policy.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-13" {
          description
            "Modify TCP and ICMP Jitter.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-06" {
          description "Modify execution-policy.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-01-15" {
          description
            "Delete next-hop of icmp-input.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-01-11" {
          description
            "Modify execution-policy to rpc.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-12-12" {
          description "ICMP modification.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-10-30" {
          description "Init revision.";
          reference
            "Huawei private.";
    
        }
    
    
        typedef path-type {
          type enumeration {
            enum "bypass" {
              value 1;
              description "Bypath.";
            }
          }
          description "Path type.";
        }
    
        typedef ethsvc-profile {
          type enumeration {
            enum "profile-none" {
              value 0;
              description "None profile.";
            }
            enum "profile-imix" {
              value 1;
              description "Imix profile.";
            }
          }
          description
            "Description of ethsvc-profile.";
        }
    
        typedef jitter-code-type {
          type enumeration {
            enum "none" {
              value 1;
              description "None.";
            }
            enum "g711a" {
              value 2;
              description "G711a.";
            }
            enum "g711u" {
              value 3;
              description "G711u.";
            }
            enum "g729a" {
              value 4;
              description "G729a.";
            }
          }
          description
            "Description of jitter-code-type.";
        }
    
        typedef jitter-mode-type {
          type enumeration {
            enum "icmp-echo" {
              value 2;
              description "Icmp echo.";
            }
            enum "icmp-timestamp" {
              value 1;
              description "Icmp timestamp.";
            }
          }
          description
            "Description of jitter-mode-type.";
        }
    
        typedef time-unit-type {
          type enumeration {
            enum "microsecond" {
              value 1;
              description
                "Microsecond timestamp.";
            }
            enum "millisecond" {
              value 0;
              description
                "Millisecond timestamp.";
            }
          }
          description
            "Description of time-unit-type.";
        }
    
        typedef recv-time-unit-type {
          type enumeration {
            enum "unknown" {
              value 0;
              description "Unknown timestamp.";
            }
            enum "microsecond" {
              value 2;
              description
                "Microsecond timestamp.";
            }
            enum "millisecond" {
              value 1;
              description
                "Millisecond timestamp.";
            }
          }
          description
            "Description of recv-time-unit-type.";
        }
    
        typedef vxlan-reply-mode {
          type enumeration {
            enum "no-reply" {
              value 1;
              description "No reply.";
            }
            enum "udp" {
              value 2;
              description "UDP.";
            }
            enum "vxlan" {
              value 3;
              description "VXLAN.";
            }
          }
          description
            "Description of vxlan-reply-mode.";
        }
    
        typedef lsp-reply-mode-type {
          type enumeration {
            enum "no-reply" {
              value 1;
              description
                "NQA test packets are not to be responded.";
            }
            enum "udp" {
              value 2;
              description
                "UDP packets are used to respond NQA test packets.";
            }
            enum "level-control-channel" {
              value 4;
              description
                "Control-channel packets are used to respond to NQA test packets.";
            }
          }
          description
            "Description of lsp-reply-mode-type.";
        }
    
        typedef ip-lsp-reply-mode-type {
          type enumeration {
            enum "no-reply" {
              value 1;
              description
                "NQA test packets are not to be responded.";
            }
            enum "udp" {
              value 2;
              description
                "UDP packets are used to respond NQA test packets.";
            }
          }
          description
            "Description of ip-lsp-reply-mode-type.";
        }
    
        typedef bgp-lsp-reply-mode-type {
          type enumeration {
            enum "no-reply" {
              value 1;
              description
                "NQA test packets are not to be responded.";
            }
            enum "udp" {
              value 2;
              description
                "UDP packets are used to respond NQA test packets.";
            }
          }
          description
            "Description of ip-lsp-reply-mode-type.";
        }
    
        typedef te-lsp-reply-mode-type {
          type enumeration {
            enum "no-reply" {
              value 1;
              description
                "NQA test packets are not to be responded.";
            }
            enum "udp" {
              value 2;
              description
                "UDP packets are used to respond NQA test packets.";
            }
            enum "level-control-channel" {
              value 4;
              description
                "Control-channel packets are used to respond to NQA test packets.";
            }
          }
          description
            "Description of lsp-reply-mode-type.";
        }
    
        typedef lsp-path {
          type enumeration {
            enum "working" {
              value 0;
              description "Use working tunnel.";
            }
            enum "hot-standby" {
              value 1;
              description
                "Use hot standby tunnel.";
            }
            enum "primary" {
              value 2;
              description "Use primary tunnel.";
            }
          }
          description "Description of lsp-path.";
        }
    
        typedef lsp-ping-trace-lsp-path {
          type enumeration {
            enum "hot-standby" {
              value 1;
              description
                "Use hot standby tunnel.";
            }
            enum "primary" {
              value 2;
              description "Use primary tunnel.";
            }
          }
          description "Description of lsp-path.";
        }
    
        typedef remote-fec-type {
          type enumeration {
            enum "null" {
              value 0;
              description "Null.";
            }
            enum "ldp" {
              value 1;
              description "Ldp.";
            }
          }
          description
            "Description of remote-fec-type.";
        }
    
        typedef ttl-mode {
          type enumeration {
            enum "uniform" {
              value 1;
              description "Uniform.";
            }
            enum "pipe" {
              value 2;
              description "Pipe.";
            }
          }
          description "Description of ttl-mode.";
        }
    
        typedef vc-type {
          type enumeration {
            enum "ldp" {
              value 1;
              description "LDP.";
            }
          }
          description "Description of vc-type.";
        }
    
        typedef lsp-version {
          type enumeration {
            enum "rfc4379" {
              value 2;
              description "Rfc4379.";
            }
            enum "ptn-mode" {
              value 3;
              description "Ptn-mode.";
            }
          }
          description
            "Description of lsp-version.";
        }
    
        typedef pwe3-reply-mode-type {
          type enumeration {
            enum "no-reply" {
              value 1;
              description
                "NQA test packets are not to be responded.";
            }
            enum "udp" {
              value 2;
              description
                "UDP packets are used to respond NQA test packets.";
            }
            enum "level-control-channel" {
              value 4;
              description
                "Control-channel packets are used to respond to NQA test packets.";
            }
          }
          description
            "Description of pwe3-reply-mode-type.";
        }
    
        typedef vpls-reply-mode-type {
          type enumeration {
            enum "no-reply" {
              value 1;
              description "No-reply.";
            }
            enum "udp" {
              value 2;
              description "UDP.";
            }
            enum "udp-via-vpls" {
              value 5;
              description "UDP-via-vpls.";
            }
          }
          description
            "Description of vpls-reply-mode-type.";
        }
    
        typedef pw-type {
          type enumeration {
            enum "atm-aal5" {
              value 2;
              description "ATM aal5.";
            }
            enum "atm-cell-transport" {
              value 3;
              description "ATM cell transport.";
            }
            enum "vlan" {
              value 4;
              description "VLAN.";
            }
            enum "ethernet" {
              value 5;
              description "Ethernet.";
            }
            enum "hdlc" {
              value 6;
              description
                "High - level Data Link Control.";
            }
            enum "ppp" {
              value 7;
              description
                "Point - to - Point Protocol.";
            }
            enum "atm-nto1-vcc" {
              value 9;
              description
                "ATM n to one VCC cell mode.";
            }
            enum "atm-nto1-vpc" {
              value 10;
              description
                "ATM n to one VPC cell mode.";
            }
            enum "ip-layer2" {
              value 11;
              description "IP layer 2.";
            }
            enum "atm-1to1-vcc" {
              value 12;
              description
                "ATM one to one VCC cell mode.";
            }
            enum "atm-1to1-vpc" {
              value 13;
              description
                "ATM one to one VPC cell mode.";
            }
            enum "satop-e1" {
              value 17;
              description "Satop e1.";
            }
            enum "cesopsn-basic" {
              value 21;
              description "Cesopsn basi.";
            }
            enum "ip-interworking" {
              value 64;
              description "IP interworking.";
            }
          }
          description "Description of pw-type.";
        }
    
        typedef lsp-jitter-type {
          type enumeration {
            enum "ipv4" {
              value 0;
              description
                "The test-type of LSP jitter is IPv4.";
            }
            enum "te" {
              value 1;
              description
                "The test-type of LSP jitter is te.";
            }
          }
          description
            "Description of lsp-jitter-type.";
        }
    
        typedef test-measure-type {
          type enumeration {
            enum "delay" {
              value 1;
              description "Delay Test.";
            }
            enum "loss" {
              value 2;
              description "Loss Test.";
            }
            enum "throughput" {
              value 3;
              description "Throughput Test.";
            }
          }
          description
            "Description of test-measure-type.";
        }
    
        typedef test-rate-type {
          type enumeration {
            enum "information-rate" {
              value 2;
              description "Information rate.";
            }
            enum "utilized-line-rate" {
              value 1;
              description "Utilized line rate.";
            }
          }
          description
            "Description of test-rate-type.";
        }
    
        typedef test-ratio-unit-type {
          type enumeration {
            enum "10e-4" {
              value 0;
              description "10e-4.";
            }
            enum "10e-9" {
              value 1;
              description "10e-9.";
            }
          }
          description
            "Description of test-ratio-unit-type.";
        }
    
        typedef pwe3-label-type {
          type enumeration {
            enum "label-alert" {
              value 1;
              description "Label alert.";
            }
            enum "control-word" {
              value 2;
              description "Control word.";
            }
            enum "normal" {
              value 3;
              description "Normal.";
            }
          }
          description
            "Description of pwe3-label-type.";
        }
    
        typedef start-now-type {
          type enumeration {
            enum "start-now" {
              value 1;
              description "Start now.";
            }
          }
          description "Start now.";
        }
    
        typedef stop-type {
          type enumeration {
            enum "stop" {
              value 1;
              description "Stop.";
            }
          }
          description "Stop.";
        }
    
        typedef ethernet-service-profile-type {
          type enumeration {
            enum "profile-imix" {
              value 1;
              description "Imix profile.";
            }
          }
          description
            "Description of ethernet-service-profile-type.";
        }
    
        grouping instances-type {
          description
            "The network quality assurance.";
          list instance {
            key "admin-name test-name";
            description
              "Configure test instance.";
            leaf admin-name {
              type string {
                length "1..32";
              }
              description "Administrator name.";
            }
    
            leaf test-name {
              type string {
                length "1..32";
              }
              description "Test name.";
            }
    
            choice type {
              description
                "The test type of instance.";
              case icmp {
                description "ICMP NQA test.";
                container icmp-input {
                  must
                    "not(ipv4-next-hop and (ni-name != '_public_' or fwd-if-name or path-type = 'bypass'))";
                  must
                    "not(ipv6-next-hop and (ni-name != '_public_' or fwd-if-name or path-type = 'bypass'))";
                  must
                    "not(path-type = 'bypass' and (pass-route = 'true' or fwd-if-name or ipv6-dest-address or ipv6-source-address or ipv6-next-hop))";
                  must
                    "not(pass-route = 'true' and fwd-if-name)";
                  must
                    "not(out-if-name and fwd-if-name)";
                  presence
                    "ICMP PING test instance.";
                  description
                    "Enable/disable ICMP test instance input.";
                  uses icmp-instance-input;
                }  // container icmp-input
              }  // case icmp
    
              case trace {
                description "TRACE NQA test.";
                container trace-input {
                  must "first-ttl<=max-ttl";
                  must
                    "not(non-fragment = 'true' and (ipv6-dest-address or ipv6-source-address))";
                  presence
                    "Present enable trace test instance input.";
                  description
                    "Enable/disable trace test instance input.";
                  uses trace-instance-input;
                }  // container trace-input
              }  // case trace
    
              case udp {
                description "UDP NQA test.";
                container udp-input {
                  must
                    "not((pass-route = 'true' and ipv6-dest-address) or (pass-route = 'true' and ipv6-source-address))";
                  presence
                    "Present enable UDP test instance input.";
                  description
                    "Enable/disable UDP test instance input.";
                  uses udp-instance-input;
                }  // container udp-input
              }  // case udp
    
              case tcp {
                description "TCP NQA test.";
                container tcp-input {
                  presence
                    "Present enable TCP test instance input.";
                  description
                    "Enable/disable TCP test instance input.";
                  uses tcp-instance-input;
                }  // container tcp-input
              }  // case tcp
    
              case jitter {
                description
                  "Jitter NQA test that tests UDP-packet jitter.";
                container jitter-input {
                  must
                    "not(hardware-enable = 'true' and data-fill)";
                  must
                    "not(hardware-enable = 'false' and timestamp = 'microsecond')";
                  must
                    "(hardware-enable = 'false' and interval >= 20) or (hardware-enable = 'true' and interval >= 10)";
                  presence
                    "Present enable jitter test instance input";
                  description
                    "Enable/disable jitter test instance input.";
                  uses jitter-instance-input;
                }  // container jitter-input
              }  // case jitter
    
              case icmp-jitter {
                description
                  "ICMP jitter NQA test.";
                container icmp-jitter-input {
                  presence
                    "Present enable ICMP jitter test instance input.";
                  description
                    "Enable/disable ICMP jitter test instance input.";
                  uses icmp-jitter-instance-input;
                }  // container icmp-jitter-input
              }  // case icmp-jitter
    
              case lsp-ping {
                description "LSP ping NQA test.";
                container lsp-ping-input {
                  presence
                    "Present enable LSP ping test instance input.";
                  description
                    "Enable/disable LSP ping test instance input.";
                  uses lspping-instance-input;
                }  // container lsp-ping-input
              }  // case lsp-ping
    
              case lsp-trace {
                description
                  "LSP trace NQA test.";
                container lsp-trace-input {
                  presence
                    "Present enable LSP trace test instance input.";
                  description
                    "Enable/disable LSP trace test instance input.";
                  uses lsptrace-instance-input;
                }  // container lsp-trace-input
              }  // case lsp-trace
    
              case lsp-jitter {
                description
                  "LSP jitter NQA test.";
                container lsp-jitter-input {
                  presence
                    "Present enable LSP jitter test instance input";
                  description
                    "Enable/disable LSP jitter test instance input.";
                  uses lsp-jitter-instance-input;
                }  // container lsp-jitter-input
              }  // case lsp-jitter
    
              case pwe3-ping {
                description
                  "PWE3 ping NQA test.";
                container pwe3-ping-input {
                  presence
                    "Present enable PWE3 ping test instance input.";
                  description
                    "Enable/disable pwe3ping test instance input.";
                  uses pwe3-ping-instance-input;
                }  // container pwe3-ping-input
              }  // case pwe3-ping
    
              case path-mtu {
                description "Path MTU NQA test.";
                container path-mtu-input {
                  presence
                    "Present enable path mtu test instance input.";
                  description
                    "Enable/disable path mtu test instance input.";
                  uses path-mtu-instance-input;
                }  // container path-mtu-input
              }  // case path-mtu
    
              case pwe3-trace {
                description
                  "PWE3 trace NQA test.";
                container pwe3-trace-input {
                  presence
                    "Present enable PWE3 trace test instance input";
                  description
                    "Enable/disable PWE3 trace test instance input.";
                  uses pwe3-trace-instance-input;
                }  // container pwe3-trace-input
              }  // case pwe3-trace
    
              case mac-ping {
                description "MAC ping NQA test.";
                container mac-ping-input {
                  must
                    "(md-name and ma-name) or (not(md-name) and not(ma-name))";
                  presence
                    "Present enable MAC ping test instance input.";
                  description
                    "Enable/disable MAC ping test instance input.";
                  uses mac-ping-instance-input;
                }  // container mac-ping-input
              }  // case mac-ping
    
              case arp-ping-ip {
                description
                  "Arp ping IP NQA test.";
                container arp-ping-ip-input {
                  presence
                    "Present enable arp ping IP test intance input.";
                  description
                    "Enable/disable arp ping IP test intance input.";
                  uses arp-ping-ip-instance-input;
                }  // container arp-ping-ip-input
              }  // case arp-ping-ip
    
              case path-jitter {
                description
                  "Path jitter NQA test.";
                container path-jitter-input {
                  presence
                    "Present enable path jitter test intance input.";
                  description
                    "Enable/disable path jitter test intance input.";
                  uses path-jitter-instance-input;
                }  // container path-jitter-input
              }  // case path-jitter
    
              case vpls-mac-ping {
                description
                  "VPLS MAC ping NQA test.";
                container vpls-mac-ping-input {
                  presence
                    "Present enable VPLS MAC ping test instance input";
                  description
                    "Enable/disable VPLS MAC ping test instance input.";
                  uses vpls-mac-ping-instance-input;
                }  // container vpls-mac-ping-input
              }  // case vpls-mac-ping
    
              case ethernet-service {
                description
                  "Ethernet-service NQA test.";
                container ethernet-service-input {
                  presence
                    "Present enable ethernet service test instance input.";
                  description
                    "Configure ethernet-service test instance input.";
                  leaf fwd-if-name {
                    type leafref {
                      path
                        "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                    }
                    description
                      "Forwarding simulation inbound interface.";
                  }
    
                  leaf config-test-duration {
                    type uint32 {
                      range "1..60";
                    }
                    units "s";
                    default "3";
                    description
                      "Configuration test duration.";
                  }
    
                  leaf perf-test-duration {
                    type uint32 {
                      range "1..1440";
                    }
                    units "min";
                    default "15";
                    description
                      "Performance test duration.";
                  }
    
                  choice test-packet-size-mode {
                    default 'packet-size-list';
                    description
                      "Test packet size.";
                    case profile {
                      description
                        "Traffic profile for ethernet packet.";
                      leaf profile {
                        type ethernet-service-profile-type;
                        description
                          "Traffic profile.";
                      }
                    }  // case profile
    
                    case packet-size-list {
                      description
                        "Traffic packet size for ethernet packet.";
                      leaf datasizes {
                        type string {
                          length "2..50";
                          pattern
                            '((6[4-9])|([7-9][0-9])|([1-9][0-9][0-9])|(1[0-4][0-9][0-9])|(150[0-9])|(151[0-8])){1}([ ]((6[4-9])|([7-9][0-9])|([1-9][0-9][0-9])|(1[0-4][0-9][0-9])|(150[0-9])|(151[0-8]))){0,9}';
                        }
                        default "512";
                        description
                          "Packet size value list.";
                      }
                    }  // case packet-size-list
                  }  // choice test-packet-size-mode
    
                  leaf-list test-flow-id {
                    type leafref {
                      path
                        "../../../../testflows/test-flow/test-flow-id";
                    }
                    max-elements 16;
                    description
                      "Configure the ID of the test flow bound to the test instance.";
                  }
    
                  leaf result-num {
                    type uint32 {
                      range "1..10";
                    }
                    default "5";
                    description
                      "The maximum number of test result records.";
                  }
    
                  leaf description {
                    type string {
                      length "1..230";
                    }
                    description
                      "Description of test instance.";
                  }
    
                  leaf age-time {
                    type pub-type:time;
                    default "00:00:00";
                    description
                      "Aging time of test instance.";
                  }
                }  // container ethernet-service-input
              }  // case ethernet-service
            }  // choice type
    
            container execution-policy {
              config false;
              description
                "Statistics of the test instance execution policy.";
              choice execution-policy {
                description
                  "The test instance start policy.";
                case start {
                  description "Start the test.";
                  choice start-type {
                    description
                      "The test instance start type.";
                    case start-now {
                      description "Start now.";
                      leaf start-now {
                        type start-now-type;
                        description
                          "Start the test instance instantly.";
                      }
    
                      choice start-now-end-type {
                        description
                          "Test instance end type.";
                        case at {
                          description
                            "Stop the test at the specified time.";
                          leaf start-now-end-date-time {
                            type yang:date-and-time;
                            description
                              "The test instance end time.";
                          }
                        }  // case at
    
                        case delay {
                          description
                            "Stop the test after the specified delay time.";
                          leaf start-now-end-delay-seconds {
                            type uint32 {
                              range "6..86399";
                            }
                            units "s";
                            description
                              "The test instance end delay seconds.";
                          }
                        }  // case delay
    
                        case lifetime {
                          description
                            "Stop the test after the specified life time.";
                          leaf start-now-end-lifetime-seconds {
                            type uint32 {
                              range "6..86399";
                            }
                            units "s";
                            description
                              "The test instance end lifetime seconds.";
                          }
                        }  // case lifetime
                      }  // choice start-now-end-type
                    }  // case start-now
    
                    case start-at {
                      description
                        "Execute at the specified time.";
                      leaf start-date-time {
                        type yang:date-and-time;
                        description
                          "The test instance start time.";
                      }
    
                      choice start-at-end-type {
                        description
                          "Test instance end type.";
                        case at {
                          description
                            "Stop the test at the specified time.";
                          leaf start-at-end-date-time {
                            type yang:date-and-time;
                            description
                              "The test instance end time.";
                          }
                        }  // case at
    
                        case delay {
                          description
                            "Stop the test after the specified delay time.";
                          leaf start-at-end-delay-seconds {
                            type uint32 {
                              range "6..86399";
                            }
                            units "s";
                            description
                              "The test instance end delay seconds.";
                          }
                        }  // case delay
    
                        case lifetime {
                          description
                            "Stop the test after the specified life time.";
                          leaf start-at-end-lifetime-seconds {
                            type uint32 {
                              range "6..86399";
                            }
                            units "s";
                            description
                              "The test instance end lifetime seconds.";
                          }
                        }  // case lifetime
                      }  // choice start-at-end-type
                    }  // case start-at
    
                    case start-delay {
                      description
                        "Delay some time then execute testcase.";
                      leaf start-delay-seconds {
                        type uint32 {
                          range "1..86399";
                        }
                        units "s";
                        description
                          "The test instance start delay seconds.";
                      }
    
                      choice start-delay-end-type {
                        description
                          "Test instance end type.";
                        case at {
                          description
                            "Stop the test at the specified time.";
                          leaf start-delay-end-date-time {
                            type yang:date-and-time;
                            description
                              "The test instance end time.";
                          }
                        }  // case at
    
                        case delay {
                          description
                            "Stop the test after the specified delay time.";
                          leaf start-delay-end-delay-seconds {
                            type uint32 {
                              range "6..86399";
                            }
                            units "s";
                            description
                              "The test instance end delay seconds.";
                          }
                        }  // case delay
    
                        case lifetime {
                          description
                            "Stop the test after the specified life time.";
                          leaf start-delay-end-lifetime-seconds {
                            type uint32 {
                              range "6..86399";
                            }
                            units "s";
                            description
                              "The test instance end lifetime seconds.";
                          }
                        }  // case lifetime
                      }  // choice start-delay-end-type
                    }  // case start-delay
    
                    case start-daily {
                      description
                        "Execute the test instance daily.";
                      leaf daily-start-time {
                        type pub-type:time;
                        description
                          "Start time of daily execution.";
                      }
    
                      leaf daily-start-date {
                        type pub-type:date;
                        description
                          "Start date of daily execution.";
                      }
    
                      leaf daily-end-time {
                        type pub-type:time;
                        description
                          "End time of daily execution.";
                      }
    
                      leaf daily-end-date {
                        type pub-type:date;
                        description
                          "End date of daily execution.";
                      }
                    }  // case start-daily
                  }  // choice start-type
                }  // case start
    
                case stop {
                  description "Stop the test.";
                  leaf stop {
                    type stop-type;
                    description "Stop the test.";
                  }
                }  // case stop
              }  // choice execution-policy
            }  // container execution-policy
    
            container nqa-execution-policy {
              description
                "Configure the test instance to be executed at the specified time.";
              leaf start-date-time {
                type yang:date-and-time;
                description
                  "The start date and time of the test instance. Detele the start-date-time to stop the test.";
              }
    
              leaf end-date-time {
                when "../start-date-time";
                type yang:date-and-time;
                description
                  "The end date and time of the test instance.";
              }
            }  // container nqa-execution-policy
          }  // list instance
        }  // grouping instances-type
    
        grouping icmp-instance-input {
          description
            "Configure ICMP test instance input.";
          choice address {
            description "Address information.";
            case ipv4-address {
              description "IPv4 address.";
              leaf ipv4-dest-address {
                type inet:ipv4-address-no-zone;
                description
                  "Destination IPv4 address.";
              }
    
              leaf ipv4-source-address {
                type inet:ipv4-address-no-zone;
                description
                  "Source IPv4 address.";
              }
    
              leaf ipv4-next-hop {
                type inet:ipv4-address-no-zone;
                description
                  "IPv4 next hop address.";
              }
            }  // case ipv4-address
    
            case ipv6-address {
              description "IPv6 address.";
              leaf ipv6-dest-address {
                type inet:ipv6-address-no-zone;
                description
                  "Destination IPv6 address.";
              }
    
              leaf ipv6-source-address {
                type inet:ipv6-address-no-zone;
                description
                  "Source IPv6 address.";
              }
    
              leaf ipv6-next-hop {
                type inet:ipv6-address-no-zone;
                description
                  "IPv6 next hop address.";
              }
            }  // case ipv6-address
          }  // choice address
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf out-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf fwd-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description
              "Simulated inbound-interface name.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Indicates the packet loss ratio threshold of an NQA test instance. If the packet loss ratio exceeds the threshold, the test fails.";
          }
    
          leaf data-size {
            type uint32 {
              range "0..8100";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description "Time to live.";
          }
    
          leaf pass-route {
            type boolean;
            default "false";
            description
              "Enable/disable the function of sending packets without searching for routes.";
          }
    
          leaf probe-fails {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of probe failures of an NQA test to send trap or events.";
          }
    
          leaf test-fails {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf compatibility {
            type boolean;
            default "false";
            description
              "Enable/disable compatibility mode. When the ptn79 interworks with the ptn39, the no result is converted to failed and success.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf path-type {
            type path-type;
            description "Path type.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          choice priority {
            default 'tos-value';
            description "Priority type.";
            case tos-value {
              description "ToS value.";
              leaf tos {
                type uint16 {
                  range "0..255";
                }
                default "0";
                description "ToS.";
              }
            }  // case tos-value
    
            case dscp-value {
              description "DSCP value.";
              leaf dscp {
                type uint32 {
                  range "0..63";
                }
                description "DSCP value.";
              }
            }  // case dscp-value
          }  // choice priority
        }  // grouping icmp-instance-input
    
        grouping jitter-instance-input {
          description
            "Configure jitter test instance input.";
          choice address {
            description
              "IP address configurations.";
            case ipv4-address {
              description "IPv4 address.";
              leaf ipv4-dest-address {
                type inet:ipv4-address-no-zone;
                description
                  "Destination IPv4 address.";
              }
    
              leaf ipv4-source-address {
                type inet:ipv4-address-no-zone;
                description
                  "Source IPv4 address.";
              }
            }  // case ipv4-address
    
            case ipv6-address {
              description "IPv6 address.";
              leaf ipv6-dest-address {
                type inet:ipv6-address-no-zone;
                description
                  "Destination IPv6 address.";
              }
    
              leaf ipv6-source-address {
                type inet:ipv6-address-no-zone;
                description
                  "Source IPv6 address.";
              }
            }  // case ipv6-address
          }  // choice address
    
          leaf dest-port {
            type uint16 {
              range "1..65535";
            }
            description "UDP destination port.";
          }
    
          leaf source-port {
            type uint16 {
              range "1..65535";
            }
            description "UDP source port.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description "Time to live.";
          }
    
          leaf hardware-enable {
            type boolean;
            default "false";
            description
              "Enable/disable packets are sent by hardware.";
          }
    
          leaf interval {
            type uint32 {
              range "10..60000";
            }
            units "ms";
            default "20";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            ext:dynamic-default {
              ext:default-value "3" {
                when "../code-type='none'";
                description "The default value is 3 when code-type is none.";
              }
              ext:default-value "1" {
                when "../code-type='g711a' or ../code-type='g711u' or ../code-type='g729a'";
                description "The default value is 1 when code-type is g711a, g711u or g729a.";
              }
            }
            type uint32 {
              range "1..15";
            }
            description "Number of probes.";
          }
    
          leaf jitter-packet-num {
            ext:dynamic-default {
              ext:default-value "20" {
                when "../code-type='none'";
                description "The default value is 20 when code-type is none.";
              }
              ext:default-value "1000" {
                when "../code-type='g711a' or ../code-type='g711u' or ../code-type='g729a'";
                description "The default value is 1000 when code-type is g711a, g711u or g729a.";
              }
            }
            type uint32 {
              range "1..3000";
            }
            description
              "Number of sent packets.";
          }
    
          leaf data-size {
            ext:dynamic-default {
              ext:default-value "0" {
                when "../code-type='none'";
                description "The default value is 0 when code-type is none.";
              }
              ext:default-value "172" {
                when "../code-type='g711a' or ../code-type='g711u'";
                description "The default value is 172 when code-type is g711a or g711u.";
              }
              ext:default-value "32" {
                when "../code-type='g729a'";
                description "The default value is 32 when code-type is g729a.";
              }
            }
            type uint16 {
              range "0..8100";
            }
            units "Byte";
            must
              "(../hardware-enable = 'true' and ../data-size <= 1472) or (../hardware-enable = 'false') or not(../hardware-enable)";
            description "Packet size.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf pass-route {
            type boolean;
            default "false";
            description
              "Enable/disable the function of sending packets without searching for routes.";
          }
    
          leaf tos {
            type uint16 {
              range "0..255";
            }
            default "0";
            description "ToS.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf code-type {
            type jitter-code-type;
            default "none";
            description "Code type.";
          }
    
          leaf adv-factor {
            when
              "../code-type='g711a' or ../code-type='g711u' or ../code-type='g729a'";
            type uint8 {
              range "0..20";
            }
            default "0";
            description "Advantage factor.";
          }
    
          leaf threshold-owd-ds {
            type uint32 {
              range "1..60000";
            }
            description
              "One way delay threshold value from destination to source.";
          }
    
          leaf threshold-owd-sd {
            type uint32 {
              range "1..60000";
            }
            description
              "One way delay threshold value from source to destination.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Indicates the packet loss ratio threshold of an NQA test instance. If the packet loss ratio exceeds the threshold, the test fails.";
          }
    
          leaf test-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf timestamp {
            type time-unit-type;
            default "millisecond";
            description "The unit of timestamp.";
          }
    
          leaf out-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit owd-ds {
                position 26;
                description
                  "Indicates that a trap is sent when the OWD from the destination to the source exceeds the threshold.";
              }
              bit owd-sd {
                position 27;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping jitter-instance-input
    
        grouping icmp-jitter-instance-input {
          description
            "ICMP jitter test instance input parameters.";
          choice address {
            description
              "IP address configurations.";
            case ipv4-address {
              description "IPv4 address.";
              leaf ipv4-dest-address {
                type inet:ipv4-address-no-zone;
                description
                  "Destination IPv4 address.";
              }
    
              leaf ipv4-source-address {
                type inet:ipv4-address-no-zone;
                description
                  "Source IPv4 address.";
              }
            }  // case ipv4-address
    
            case ipv6-address {
              description "IPv6 address.";
              leaf ipv6-dest-address {
                type inet:ipv6-address-no-zone;
                description
                  "Destination IPv6 address.";
              }
    
              leaf ipv6-source-address {
                type inet:ipv6-address-no-zone;
                description
                  "Source IPv6 address.";
              }
            }  // case ipv6-address
          }  // choice address
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description "Time to live.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description "Number of probes.";
          }
    
          leaf hardware-enable {
            type boolean;
            must
              "../jitter-mode='icmp-timestamp' or (not(../jitter-mode='icmp-timestamp') and (../hardware-enable='false'))";
            default "false";
            description
              "Enable/disable packets are sent by hardware.";
          }
    
          leaf jitter-packet-num {
            type uint32 {
              range "1..3000";
            }
            default "20";
            description "Number of packets.";
          }
    
          leaf data-size {
            when "../jitter-mode='icmp-echo'";
            type uint16 {
              range "0..8100";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf data-fill {
            when "../jitter-mode='icmp-echo'";
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf tos {
            type uint16 {
              range "0..255";
            }
            default "0";
            description "ToS.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf jitter-mode {
            when
              "not(../ipv6-dest-address) and not(../ipv6-source-address)";
            type jitter-mode-type;
            default "icmp-timestamp";
            description "Packet format.";
          }
    
          leaf interval {
            type uint32 {
              range "10..60000";
            }
            units "ms";
            must
              "../hardware-enable = 'false' and ../interval >= 20 or ../hardware-enable = 'true'";
            default "20";
            description
              "Interval for sending packets.";
          }
    
          leaf timestamp {
            when
              "not(../ipv6-dest-address) and not(../ipv6-source-address)";
            type time-unit-type;
            must
              "(../hardware-enable='true') or (../hardware-enable='false' and ../timestamp='millisecond')";
            default "millisecond";
            description "The unit of timestamp.";
          }
    
          leaf out-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf receive-timeunit {
            type recv-time-unit-type;
            must
              "(../hardware-enable='true') or (../hardware-enable='false' and ../receive-timeunit='unknown')";
            default "unknown";
            description
              "The unit of receive timestamp.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Indicates the packet loss ratio threshold of an NQA test instance. If the packet loss ratio exceeds the threshold, the test fails.";
          }
    
          leaf test-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit jitter-ds {
                position 24;
                description
                  "Indicates that a trap is sent when the jitter from the destination to the source exceeds the threshold.";
              }
              bit jitter-sd {
                position 25;
                description
                  "Indicates that a trap is sent when the jitter from the source to the destination exceeds the threshold.";
              }
              bit owd-ds {
                position 26;
                description
                  "Indicates that a trap is sent when the OWD from the destination to the source exceeds the threshold.";
              }
              bit owd-sd {
                position 27;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf threshold-owd-ds {
            type uint32 {
              range "1..60000";
            }
            description
              "Specify the one-way delay threshold from destination to source.";
          }
    
          leaf threshold-owd-sd {
            type uint32 {
              range "1..60000";
            }
            description
              "Specify the one-way delay threshold from source to destination.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Specify the round-trip delay threshold.";
          }
    
          leaf threshold-jitter-ds {
            type uint32 {
              range "1..60000";
            }
            description
              "Specify the one-way jitter threshold from destination to source.";
          }
    
          leaf threshold-jitter-sd {
            type uint32 {
              range "1..60000";
            }
            description
              "Specify the one-way jitter threshold from source to destination.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping icmp-jitter-instance-input
    
        grouping path-mtu-instance-input {
          description
            "Path MTU test instance input parameters.";
          leaf dest-address {
            type inet:ipv4-address-no-zone;
            description
              "Destination IPv4 address.";
          }
    
          leaf source-address {
            type inet:ipv4-address-no-zone;
            description "Source IPv4 address.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf max-mtu {
            type uint16 {
              range "48..9198";
            }
            default "1500";
            description "Max mtu.";
          }
    
          leaf step {
            type uint16 {
              range "1..512";
            }
            default "10";
            description "Test step.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description "Number of probes.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf out-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "60..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping path-mtu-instance-input
    
        grouping trace-instance-input {
          description
            "Trace test instance input parameters.";
          choice address {
            description "Address information.";
            case ipv4-address {
              description "IPv4 address.";
              leaf ipv4-dest-address {
                type inet:ipv4-address-no-zone;
                description
                  "Destination IPv4 address.";
              }
    
              leaf ipv4-source-address {
                type inet:ipv4-address-no-zone;
                description
                  "Source IPv4 address.";
              }
    
              leaf ipv4-next-hop {
                type inet:ipv4-address-no-zone;
                description
                  "IPv4 next hop address.";
              }
            }  // case ipv4-address
    
            case ipv6-address {
              description "IPv6 address.";
              leaf ipv6-dest-address {
                type inet:ipv6-address-no-zone;
                description
                  "Destination IPv6 address.";
              }
    
              leaf ipv6-source-address {
                type inet:ipv6-address-no-zone;
                description
                  "Source IPv6 address.";
              }
    
              leaf ipv6-next-hop {
                type inet:ipv6-address-no-zone;
                description
                  "IPv6 next hop address.";
              }
            }  // case ipv6-address
          }  // choice address
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf first-ttl {
            type uint8 {
              range "1..255";
            }
            default "1";
            description
              "Start TTL of probe packet.";
          }
    
          leaf max-ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description
              "Maximum TTL of probe packet.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf data-size {
            type uint32 {
              range "0..8100";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "60..604800";
            }
            description
              "Cyclic scheduling period of test cases.";
          }
    
          choice priority {
            default 'tos-value';
            description "Priority type.";
            case tos-value {
              description "ToS value.";
              leaf tos {
                type uint16 {
                  range "0..255";
                }
                default "0";
                description "ToS.";
              }
            }  // case tos-value
    
            case dscp-value {
              description "DSCP value.";
              leaf dscp {
                type uint32 {
                  range "0..63";
                }
                description "DSCP value.";
              }
            }  // case dscp-value
          }  // choice priority
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf dest-port {
            type uint16 {
              range "1..65535";
            }
            default "33434";
            description
              "TRACE destination port number.";
          }
    
          leaf hop-fail-times {
            type uint32 {
              range "1..255";
            }
            default "5";
            description
              "The times of hop failure.";
          }
    
          leaf pass-route {
            type boolean;
            default "false";
            description
              "Enable/disable the function of sending packets without searching for routes.";
          }
    
          leaf out-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf test-fail-times {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf non-fragment {
            type boolean;
            default "false";
            description
              "Enable/disable the mark of message no fragment.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
        }  // grouping trace-instance-input
    
        grouping udp-instance-input {
          description
            "Configure UDP test instance input.";
          choice address {
            description "Address information.";
            case ipv4-address {
              description "IPv4 address.";
              leaf ipv4-dest-address {
                type inet:ipv4-address-no-zone;
                description
                  "Destination IPv4 address.";
              }
    
              leaf ipv4-source-address {
                type inet:ipv4-address-no-zone;
                description
                  "Source IPv4 address.";
              }
            }  // case ipv4-address
    
            case ipv6-address {
              description "IPv6 address.";
              leaf ipv6-dest-address {
                type inet:ipv6-address-no-zone;
                description
                  "Destination IPv6 address.";
              }
    
              leaf ipv6-source-address {
                type inet:ipv6-address-no-zone;
                description
                  "Source IPv6 address.";
              }
            }  // case ipv6-address
          }  // choice address
    
          leaf dest-port {
            type uint16 {
              range "1..65535";
            }
            default "7";
            description "UDP destination port.";
          }
    
          leaf source-port {
            type uint16 {
              range "1..65535";
            }
            description "UDP source port.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description "Time to live.";
          }
    
          leaf data-size {
            type uint16 {
              range "0..8100";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf pass-route {
            type boolean;
            default "false";
            description
              "Enable/disable the function of sending packets without searching for routes.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf probe-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of probe failures of an NQA test to send trap or events.";
          }
    
          leaf test-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf tos {
            type uint16 {
              range "0..255";
            }
            default "0";
            description "ToS.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Loss ratio, determining whether the test is successful.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (Number of Sent Packets - 1) * (Packet Sending Interval) + (Timeout Period).";
          }
        }  // grouping udp-instance-input
    
        grouping arp-ping-ip-instance-input {
          description
            "ARP ping IP test instance input parameters.";
          leaf ipv4-dest-address {
            type inet:ipv4-address-no-zone;
            description
              "Destination IPv4 address.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf out-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..10";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (Number of sent Packets - 1) * (Packet sending interval) + (Timeout period).";
          }
        }  // grouping arp-ping-ip-instance-input
    
        grouping tcp-instance-input {
          description
            "TCP test instance input parameters.";
          leaf dest-address {
            type inet:ipv4-address-no-zone;
            description
              "Destination IP address.";
          }
    
          leaf source-address {
            type inet:ipv4-address-no-zone;
            description "Source IP address.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description
              "TTL value of NQA test packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf tos {
            type uint16 {
              range "0..255";
            }
            default "0";
            description "ToS.";
          }
    
          leaf dest-port {
            type uint16 {
              range "1..65535";
            }
            default "7";
            description
              "TCP destination port number.";
          }
    
          leaf source-port {
            type uint16 {
              range "1..65535";
            }
            description
              "TCP source port number.";
          }
    
          leaf pass-route {
            type boolean;
            default "false";
            description
              "Enable/disable the function of sending packets without searching for routes.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf probe-fails {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of probe failures of an NQA test to send trap or events.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "The rate of loss that the test case performed successfully.";
          }
    
          leaf test-fail-times {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping tcp-instance-input
    
        grouping lspping-instance-input {
          description
            "LSP ping test instance input parameters.";
          choice lsp-protocol {
            default 'ipv4';
            description
              "The LSP type. The default LSP type is IPv4.";
            case ipv4 {
              description "The LSP type is LDP.";
              container ldp-lsp-ping {
                must
                  "(dest-address and mask-len) or (not(dest-address) and not(mask-len))";
                description
                  "Configure container of LDP LSP ping.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IPv4 address.";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 prefix mask length.";
                }
    
                leaf loopback-address {
                  when "../dest-address";
                  type inet:ipv4-address-no-zone;
                  description
                    "Set a 127/8 address of MPLS ping packets' destination address in the IP header.";
                }
    
                leaf next-hop {
                  type inet:ipv4-address-no-zone;
                  description
                    "Next hop address.";
                }
    
                leaf reply-mode {
                  type ip-lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container ldp-lsp-ping
            }  // case ipv4
    
            case bgp {
              description "The LSP type is BGP.";
              container bgp-lsp-ping {
                must
                  "(dest-address and mask-len) or (not(dest-address) and not(mask-len))";
                presence
                  "Present enable BGP LSP ping.";
                description
                  "Configure container of BGP LSP ping.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IPv4 address.";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 prefix mask length.";
                }
    
                leaf loopback-address {
                  when "../dest-address";
                  type inet:ipv4-address-no-zone;
                  description
                    "Set a 127/8 address of MPLS ping packets' destination address in the IP header.";
                }
    
                leaf next-hop {
                  type inet:ipv4-address-no-zone;
                  description
                    "Next hop address.";
                }
    
                leaf reply-mode {
                  type bgp-lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container bgp-lsp-ping
            }  // case bgp
    
            case te {
              description "The LSP type is TE.";
              container te-lsp-ping {
                presence
                  "Present enable TE LSP ping.";
                description
                  "Configure container of TE LSP ping.";
                leaf tunnel-name {
                  type leafref {
                    path
                      "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description "TE tunnel name.";
                }
    
                leaf lsp-path {
                  when "../tunnel-name";
                  type lsp-ping-trace-lsp-path;
                  description
                    "Lsp path (hot-standby or primary).";
                }
    
                leaf reply-mode {
                  type te-lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container te-lsp-ping
            }  // case te
    
            case srte {
              description
                "The LSP type is SR-TE.";
              container srte-lsp-ping {
                presence
                  "Present enable SR-TE LSP ping.";
                description
                  "Configure container of SR-TE LSP ping.";
                leaf tunnel-name {
                  type leafref {
                    path
                      "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description "TE tunnel name.";
                }
    
                leaf lsp-path {
                  when "../tunnel-name";
                  type lsp-ping-trace-lsp-path;
                  description
                    "Lsp path (hot-standby or primary).";
                }
              }  // container srte-lsp-ping
            }  // case srte
    
            case srbe {
              description
                "The LSP type is SR-BE.";
              container srbe-lsp-ping {
                must
                  "(dest-address and mask-len) or (not (dest-address) and not (mask-len))";
                presence
                  "Present enable SR-BE LSP ping.";
                description
                  "Configure container of SR-BE LSP ping.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IP address.";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 prefix mask length.";
                }
    
                leaf flex-algo-id {
                  type uint8 {
                    range "128..255";
                  }
                  description
                    "Flexible algorithm ID.";
                }
    
                leaf path-type {
                  type path-type;
                  description "Path type.";
                }
    
                choice remote-fec {
                  description "Remote FEC type.";
                  case ldp {
                    description
                      "Configure the remote FEC type as LDP.";
                    container remote-fec-ldp {
                      must
                        "(remote-fec-ip-address and remote-mask-len) or (not (remote-fec-ip-address) and not (remote-mask-len))";
                      presence
                        "Present enable remote FEC type as LDP.";
                      description
                        "Configure container of remote FEC LDP.";
                      leaf remote-fec-ip-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Configure remote FEC IPv4 address.";
                      }
    
                      leaf remote-mask-len {
                        type uint8 {
                          range "0..32";
                        }
                        description
                          "Configure remote FEC mask length.";
                      }
                    }  // container remote-fec-ldp
                  }  // case ldp
                }  // choice remote-fec
              }  // container srbe-lsp-ping
            }  // case srbe
    
            case srte-policy {
              description
                "The LSP type is SR-TE policy.";
              container srte-policy-lsp-ping {
                must
                  "(end-point-ip and color) or (not(end-point-ip) and not(color))";
                presence
                  "Present enable SR-TE policy LSP ping.";
                description
                  "Configure container of SR-TE policy LSP ping.";
                choice probe-type {
                  description
                    "Probe type of SR-TE policy.";
                  case policy-name {
                    description "Policy name.";
                    leaf policy-name {
                      type string {
                        length "1..31";
                      }
                      description
                        "SR-TE policy name.";
                    }
                  }  // case policy-name
    
                  case end-point {
                    description "End point.";
                    leaf end-point-ip {
                      type inet:ipv4-address-no-zone;
                      description
                        "Endpoint IPv4 address.";
                    }
    
                    leaf color {
                      type uint32 {
                        range "0..4294967295";
                      }
                      description
                        "Endpoint color ID.";
                    }
                  }  // case end-point
    
                  case binding-sid {
                    description "Policy name.";
                    leaf binding-sid {
                      type uint32 {
                        range "16..1048575";
                      }
                      description
                        "Binding segmentlist ID.";
                    }
                  }  // case binding-sid
                }  // choice probe-type
              }  // container srte-policy-lsp-ping
            }  // case srte-policy
          }  // choice lsp-protocol
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after test packets are sent.";
          }
    
          leaf frag-flag {
            type boolean;
            default "false";
            description
              "Enable/disable packet fragmentation function.";
          }
    
          leaf source-address {
            type inet:ipv4-address-no-zone;
            description "Source IPv4 address.";
          }
    
          leaf exp {
            type uint8 {
              range "0..7";
            }
            default "0";
            description
              "Configures the LSP EXP value.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description
              "TTL value of NQA test packets.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf data-size {
            type uint32 {
              range "0..9600";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Indicates the packet loss ratio threshold of an NQA test instance. If the packet loss ratio exceeds the threshold, the test fails.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping lspping-instance-input
    
        grouping lsptrace-instance-input {
          description
            "LSP trace test instance input parameters.";
          choice lsp-protocol {
            default 'ipv4';
            description
              "The LSP type. The default LSP type is IPv4.";
            case ipv4 {
              description "The LSP type is LDP.";
              container ldp-lsp-trace {
                must
                  "(dest-address and mask-len) or (not(dest-address) and not(mask-len))";
                description
                  "Configure container of LDP LSP trace.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IPv4 address.";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 prefix mask length.";
                }
    
                leaf loopback-address {
                  when "../dest-address";
                  type inet:ipv4-address-no-zone;
                  description
                    "Set a 127/8 address of MPLS ping packets' destination address in the IP header.";
                }
    
                leaf next-hop {
                  type inet:ipv4-address-no-zone;
                  description
                    "Next hop address.";
                }
    
                leaf reply-mode {
                  type ip-lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container ldp-lsp-trace
            }  // case ipv4
    
            case bgp {
              description "The LSP type is BGP.";
              container bgp-lsp-trace {
                must
                  "(dest-address and mask-len) or (not(dest-address) and not(mask-len))";
                presence
                  "Present enable BGP LSP trace.";
                description
                  "Configure container of BGP LSP trace.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IPv4 address.";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 prefix mask length.";
                }
    
                leaf loopback-address {
                  when "../dest-address";
                  type inet:ipv4-address-no-zone;
                  description
                    "Set a 127/8 address of MPLS ping packets' destination address in the IP header.";
                }
    
                leaf next-hop {
                  type inet:ipv4-address-no-zone;
                  description
                    "Next hop address.";
                }
    
                leaf reply-mode {
                  type bgp-lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container bgp-lsp-trace
            }  // case bgp
    
            case te {
              description "The LSP type is TE.";
              container te-lsp-trace {
                presence
                  "Present enable TE LSP trace.";
                description
                  "Configure container of TE LSP trace.";
                leaf tunnel-name {
                  type leafref {
                    path
                      "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description "TE tunnel name.";
                }
    
                leaf next-hop {
                  type inet:ipv4-address-no-zone;
                  description
                    "Next hop address.";
                }
    
                leaf lsp-path {
                  when "../tunnel-name";
                  type lsp-ping-trace-lsp-path;
                  description
                    "Lsp path (hot-standby or primary).";
                }
    
                leaf reply-mode {
                  type te-lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container te-lsp-trace
            }  // case te
    
            case srte {
              description
                "The LSP type is SR-TE.";
              container srte-lsp-trace {
                presence
                  "Present enable SR-TE LSP trace.";
                description
                  "Configure container of SR-TE LSP trace.";
                leaf tunnel-name {
                  type leafref {
                    path
                      "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description "TE tunnel name.";
                }
    
                leaf lsp-path {
                  when "../tunnel-name";
                  type lsp-ping-trace-lsp-path;
                  description
                    "Lsp path (hot-standby or primary).";
                }
              }  // container srte-lsp-trace
            }  // case srte
    
            case srbe {
              description
                "The LSP type is SR-BE.";
              container srbe-lsp-trace {
                must
                  "(dest-address and mask-len) or (not (dest-address) and not (mask-len))";
                presence
                  "Present enable SR-BE LSP trace.";
                description
                  "Configure container of SR-BE LSP trace.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IPv4 address.";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 prefix mask length.";
                }
    
                leaf flex-algo-id {
                  type uint8 {
                    range "128..255";
                  }
                  description
                    "Flexible algorithm ID.";
                }
    
                leaf path-type {
                  type path-type;
                  description "Path type.";
                }
    
                choice remote-fec {
                  description "Remote FEC type.";
                  case ldp {
                    description
                      "Configure the remote FEC type as LDP.";
                    container remote-fec-ldp {
                      must
                        "(remote-fec-ip-address and remote-mask-len) or (not (remote-fec-ip-address) and not (remote-mask-len))";
                      presence
                        "Present enable remote FEC type as LDP.";
                      description
                        "Configure container of remote FEC LDP.";
                      leaf remote-fec-ip-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Configure remote FEC IPv4 address.";
                      }
    
                      leaf remote-mask-len {
                        type uint8 {
                          range "0..32";
                        }
                        description
                          "Configure remote FEC mask length.";
                      }
                    }  // container remote-fec-ldp
                  }  // case ldp
                }  // choice remote-fec
              }  // container srbe-lsp-trace
            }  // case srbe
    
            case srte-policy {
              description
                "The LSP type is SR-TE policy.";
              container srte-policy-lsp-trace {
                must
                  "(end-point-ip and color) or (not(end-point-ip) and not(color))";
                presence
                  "Present enable SR-TE policy LSP trace.";
                description
                  "Configure container of SR-TE policy LSP trace.";
                choice probe-type {
                  description
                    "Probe type of SR-TE policy.";
                  case policy-name {
                    description "Policy name.";
                    leaf policy-name {
                      type string {
                        length "1..31";
                      }
                      description
                        "SR-TE policy name.";
                    }
                  }  // case policy-name
    
                  case end-point {
                    description "End point.";
                    leaf end-point-ip {
                      type inet:ipv4-address-no-zone;
                      description
                        "Endpoint IPv4 address.";
                    }
    
                    leaf color {
                      type uint32 {
                        range "0..4294967295";
                      }
                      description
                        "Endpoint color ID.";
                    }
                  }  // case end-point
    
                  case binding-sid {
                    description "Policy name.";
                    leaf binding-sid {
                      type uint32 {
                        range "16..1048575";
                      }
                      description
                        "Binding segmentlist ID.";
                    }
                  }  // case binding-sid
                }  // choice probe-type
              }  // container srte-policy-lsp-trace
            }  // case srte-policy
          }  // choice lsp-protocol
    
          leaf frag-flag {
            type boolean;
            default "false";
            description
              "Enable/disable packet fragmentation function.";
          }
    
          leaf exp {
            type uint8 {
              range "0..7";
            }
            default "0";
            description
              "Configures the LSP EXP value.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf source-address {
            type inet:ipv4-address-no-zone;
            description "Source IPv4 address.";
          }
    
          leaf first-ttl {
            type uint8 {
              range "1..255";
            }
            must '../first-ttl<=../max-ttl';
            default "1";
            description
              "Start TTL of probe packet.";
          }
    
          leaf max-ttl {
            type uint8 {
              range "1..255";
            }
            must '../first-ttl<=../max-ttl';
            default "30";
            description
              "Maximum TTL of probe packet.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf hop-fail-times {
            type uint8 {
              range "1..255";
            }
            default "5";
            description
              "Specify the upper limit of the number of failed hops before the NQA tracert test stops.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            must '(../frequency>=60)';
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping lsptrace-instance-input
    
        grouping lsp-jitter-instance-input {
          description
            "LSP jitter test instance input parameters.";
          choice lsp-protocol {
            default 'ipv4';
            description
              "The test-type of LSP. The default LSP type is IPv4.";
            case ipv4 {
              description
                "The test-type of LSP is LDP.";
              container ldp-lsp-jitter {
                must
                  "(dest-address and mask-len) or (not(dest-address) and not(mask-len))";
                description
                  "Configure container of ldp jitter instance.";
                leaf dest-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IP address. (Must specify the destination address to start the test)";
                }
    
                leaf mask-len {
                  type uint8 {
                    range "0..32";
                  }
                  description
                    "LSP IPv4 address prefix mask length.";
                }
    
                leaf loopback-address {
                  when "../dest-address";
                  type inet:ipv4-address-no-zone;
                  description
                    "The IP address of the 127.0.0.0/8 network segment in the LSP jitter message header.";
                }
    
                leaf reply-mode {
                  type ip-lsp-reply-mode-type;
                  default "udp";
                  description "LSP reply mode.";
                }
              }  // container ldp-lsp-jitter
            }  // case ipv4
    
            case te {
              description
                "The test-type of LSP is TE.";
              container te-lsp-jitter {
                presence
                  "Present enable te jitter test instance input.";
                description
                  "Enable/disable te jitter instance container.";
                leaf tunnel-name {
                  type leafref {
                    path
                      "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description "TE tunnel name.";
                }
    
                leaf lsp-path {
                  when "../tunnel-name";
                  type lsp-path;
                  default "working";
                  description
                    "LSP path (working or hot-standby or primary).";
                }
    
                leaf reply-mode {
                  type lsp-reply-mode-type;
                  default "udp";
                  description
                    "Specify an LSP test reply mode.";
                }
              }  // container te-lsp-jitter
            }  // case te
          }  // choice lsp-protocol
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf frag-flag {
            type boolean;
            default "false";
            description
              "Enable/disable packet fragmentation function.";
          }
    
          leaf source-address {
            type inet:ipv4-address-no-zone;
            description "Source IP address.";
          }
    
          leaf exp {
            type uint8 {
              range "0..7";
            }
            default "0";
            description
              "Configures the LSP EXP value.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description
              "TTL value of NQA test packets.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "1";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description "Number of probes.";
          }
    
          leaf jitter-packet-num {
            type uint32 {
              range "1..3000";
            }
            default "20";
            description
              "Number of sent packets.";
          }
    
          leaf data-size {
            type uint32 {
              range "0..9600";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Indicates the packet loss ratio threshold of an NQA test instance. If the packet loss ratio exceeds the threshold, the test fails.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping lsp-jitter-instance-input
    
        grouping pwe3-ping-instance-input {
          description
            "PWE3 ping test instance input parameters.";
          leaf vc-type {
            type vc-type;
            default "ldp";
            description "VC type.";
          }
    
          leaf local-pw-type {
            type pw-type;
            default "ethernet";
            description "Local PW type.";
          }
    
          leaf local-pw-id {
            type uint32 {
              range "1..4294967295";
            }
            description "Local PW ID.";
          }
    
          leaf label-type {
            type pwe3-label-type;
            default "control-word";
            description "Label type.";
          }
    
          leaf remote-pw-id {
            type uint32 {
              range "1..4294967295";
            }
            description "Remote PW ID.";
          }
    
          leaf dest-address {
            type inet:ipv4-address-no-zone;
            description
              "Destination IPv4 address.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf max-ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description "Packet maximum TTL.";
          }
    
          leaf exp {
            type uint8 {
              range "0..7";
            }
            default "0";
            description
              "Configure the PWE3 ping exp value.";
          }
    
          leaf reply-mode {
            type pwe3-reply-mode-type;
            default "udp";
            description
              "Specify a PWE3 ping test reply mode.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf data-size {
            type uint32 {
              range "0..9600";
            }
            units "Byte";
            default "0";
            description "Packets size.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify NQA test packets payload string.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Loss ratio, determining whether the test is successful.";
          }
    
          leaf probe-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of probe failures of an NQA test to send trap or events.";
          }
    
          leaf test-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf sender-address {
            type inet:ipv4-address-no-zone;
            description
              "Set the source address of the targeted session.";
          }
    
          leaf no-cw-flag {
            when "../label-type!='control-word'";
            type boolean;
            default "false";
            description
              "Enable/disable the function of not carrying control word.";
          }
    
          leaf ttl-mode {
            type ttl-mode;
            default "uniform";
            description
              "TTL mode (uniform or pipe).";
          }
    
          leaf frag-flag {
            type boolean;
            default "false";
            description
              "Enable/disable packet fragmentation function.";
          }
    
          leaf peer-address {
            type inet:ipv4-address-no-zone;
            description "Peer IPv4 address.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (Number of sent Packets - 1) * (Packet sending interval) + (Timeout period).";
          }
        }  // grouping pwe3-ping-instance-input
    
        grouping pwe3-trace-instance-input {
          description
            "PWE3 trace test instance input parameters.";
          leaf vc-type {
            type vc-type;
            default "ldp";
            description "VC type.";
          }
    
          leaf local-pw-type {
            type pw-type;
            default "ethernet";
            description "Local PW type.";
          }
    
          leaf local-pw-id {
            type uint32 {
              range "1..4294967295";
            }
            description "Local PW ID.";
          }
    
          leaf label-type {
            type pwe3-label-type;
            default "control-word";
            description "Label type.";
          }
    
          leaf dest-address {
            type inet:ipv4-address-no-zone;
            description
              "Destination IP address. (Must specify the destination address to start the test)";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf first-ttl {
            type uint8 {
              range "1..255";
            }
            must "(../first-ttl <= ../max-ttl)";
            default "1";
            description
              "Start TTL of probe packet.";
          }
    
          leaf max-ttl {
            type uint8 {
              range "1..255";
            }
            must "(../max-ttl >= ../first-ttl)";
            default "30";
            description
              "Maximum TTL of probe packet.";
          }
    
          leaf exp {
            type uint8 {
              range "0..7";
            }
            default "0";
            description
              "Configures the Pwe3Trace EXP value.";
          }
    
          leaf reply-mode {
            type lsp-reply-mode-type;
            default "udp";
            description
              "Specify an LSP test reply mode.";
          }
    
          leaf packet-count {
            type uint32 {
              range "1..15";
            }
            units "packet";
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf probe-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of probe failures of an NQA test to send trap or events.";
          }
    
          leaf test-failtimes {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf lsp-version {
            type lsp-version;
            default "rfc4379";
            description "Lsp version.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf ttl-mode {
            type ttl-mode;
            default "uniform";
            description
              "TTL mode (uniform or pipe).";
          }
    
          leaf hop-fail-times {
            type uint8 {
              range "1..255";
            }
            default "5";
            description
              "Specify the upper limit of the number of failed hops before the NQA tracert test stops.";
          }
    
          leaf frag-flag {
            type boolean;
            default "false";
            description
              "Enable/disable packet fragmentation function.";
          }
    
          leaf peer-address {
            type inet:ipv4-address-no-zone;
            description "Peer IP Address.";
          }
    
          leaf no-cw-flag {
            when "../label-type!='control-word'";
            type boolean;
            default "false";
            description
              "Enable/disable the option of not carrying control word.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap is sent when the OWD from the source to the
                 destination exceeds the threshold.
                 This parameter applies only to jitter test instances.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "60..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping pwe3-trace-instance-input
    
        grouping mac-ping-instance-input {
          description
            "MAC ping test instance input parameters.";
          choice destination {
            description
              "Destination information.";
            case mac-address {
              description "MAC address.";
              leaf dest-mac-address {
                type unicast-mac-address;
                description
                  "Destination MAC, must be unicast MAC and not 0-0-0 MAC.";
              }
            }  // case mac-address
    
            case remote-mep-id {
              description "Remote MEP ID.";
              leaf remote-mep-id {
                type uint32 {
                  range "1..8191";
                }
                description "Remote MEP ID.";
              }
            }  // case remote-mep-id
          }  // choice destination
    
          leaf mep-id {
            type uint32 {
              range "1..8191";
            }
            description "MEP ID.";
          }
    
          leaf md-name {
            type string {
              length "1..43";
            }
            description
              "Maintenance domain name.";
          }
    
          leaf ma-name {
            type string {
              length "1..43";
            }
            description
              "Maintenance association name.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf data-size {
            type uint32 {
              range "64..2000";
            }
            units "Byte";
            default "95";
            description "Packet size.";
          }
    
          leaf source-if-name {
            type leafref {
              path
                "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
            }
            description "Out interface name.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Loss ratio, determining whether the test is successful.";
          }
    
          leaf probe-fails {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of probe failures of an NQA test to send trap or events.";
          }
    
          leaf test-fails {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap is sent when the RTD exceeds the threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap is sent when the OWD from the source to the destination exceeds the threshold.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf jitter-packet-num {
            type uint32 {
              range "1..3000";
            }
            default "1";
            description
              "Number of sent packets.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The Frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (Number of Sent Packets - 1) * (Packet Sending Interval) + (Timeout Period)";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
        }  // grouping mac-ping-instance-input
    
        grouping path-jitter-instance-input {
          description
            "Path jitter test intance input parameters.";
          leaf dest-address {
            type inet:ipv4-address-no-zone;
            description
              "Destination IP address.";
          }
    
          leaf source-address {
            type inet:ipv4-address-no-zone;
            description "Source IP address.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Loss ratio, determining whether the test is sucessful.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf first-ttl {
            type uint8 {
              range "1";
            }
            default "1";
            description "Packet first TTL.";
          }
    
          leaf max-ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description "Packet maximum TTL.";
          }
    
          leaf interval {
            type uint32 {
              range "20..60000";
            }
            units "ms";
            default "20";
            description
              "Interval for sending packets.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description "Number of probes.";
          }
    
          leaf jitter-packet-num {
            type uint32 {
              range "1..3000";
            }
            default "20";
            description "Number of packets.";
          }
    
          leaf data-size {
            when "../jitter-mode='icmp-echo'";
            type uint16 {
              range "0..8100";
            }
            units "Byte";
            default "0";
            description "Packet size.";
          }
    
          leaf data-fill {
            when "../jitter-mode='icmp-echo'";
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf jitter-mode {
            type jitter-mode-type;
            default "icmp-timestamp";
            description "Packet format.";
          }
    
          leaf tos {
            type uint16 {
              range "0..255";
            }
            default "0";
            description "TOS.";
          }
    
          leaf ni-name {
            type leafref {
              path
                "/ni:network-instance/ni:instances/ni:instance/ni:name";
            }
            default "_public_";
            description
              "Name of a VPN instance.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Test instance frequency. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping path-jitter-instance-input
    
        grouping vpls-mac-ping-instance-input {
          description
            "VPLS MAC ping test instance input parameters.";
          leaf vsi-name {
            type string {
              length "1..31";
            }
            description "Name of a VSI.";
          }
    
          leaf dest-address {
            type pub-type:mac-address;
            description
              "Destination MAC address.";
          }
    
          leaf data-fill {
            type string {
              length "1..230";
            }
            description
              "Specify an NQA test packet payload string.";
          }
    
          leaf data-size {
            type uint32 {
              range "100..1442";
            }
            units "Byte";
            default "100";
            description "Packet size.";
          }
    
          leaf exp {
            type uint8 {
              range "0..7";
            }
            default "0";
            description
              "Configures the VPLS MAC ping EXP value.";
          }
    
          leaf reply-mode {
            type vpls-reply-mode-type;
            default "udp";
            description
              "Specify a VPLS MAC ping test reply mode.";
          }
    
          leaf ttl {
            type uint8 {
              range "1..255";
            }
            default "30";
            description
              "TTL value of NQA test packets.";
          }
    
          leaf interval {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "4";
            description
              "Interval for sending packets.";
          }
    
          leaf fail-percent {
            type uint32 {
              range "1..100";
            }
            units "%";
            default "100";
            description
              "Loss ratio, determining whether the test is successful.";
          }
    
          leaf test-fail-times {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive test failures to send trap or events.";
          }
    
          leaf probe-fail-times {
            type uint32 {
              range "1..15";
            }
            default "1";
            description
              "The maximum number of the NQA test consecutive probe failures to send trap or events.";
          }
    
          leaf send-trap-bits {
            type bits {
              bit rtd {
                position 28;
                description
                  "Indicates that a trap message is sent if the RTD reaches the specified threshold.";
              }
              bit testcomplete {
                position 29;
                description
                  "Indicates that a trap is sent when a test succeeds.";
              }
              bit testfailure {
                position 30;
                description
                  "Indicates that a trap is sent when the number of test failures reaches the threshold.";
              }
              bit probefailure {
                position 31;
                description
                  "Indicates that a trap message is sent if a probe attempt fails.";
              }
            }
            description
              "Configure conditions for sending traps.";
          }
    
          leaf probe-count {
            type uint32 {
              range "1..15";
            }
            default "3";
            description
              "Number of sent packets.";
          }
    
          leaf timeout {
            type uint32 {
              range "1..60";
            }
            units "s";
            default "3";
            description
              "Time to wait for a response packet after a test packet is sent.";
          }
    
          leaf threshold-rtd {
            type uint32 {
              range "1..60000";
            }
            description
              "Threshold value of round trip delay.";
          }
    
          leaf vlan {
            type uint32 {
              range "1..4094";
            }
            description "Specifies a VLAN ID.";
          }
    
          leaf frag-flag {
            type boolean;
            default "false";
            description
              "Enable/disable packet fragmentation function.";
          }
    
          leaf result-num {
            type uint32 {
              range "1..10";
            }
            default "5";
            description
              "The maximum number of test result records.";
          }
    
          leaf history-num {
            type uint32 {
              range "0..1000";
            }
            default "60";
            description
              "The maximum number of historical test records.";
          }
    
          leaf description {
            type string {
              length "1..230";
            }
            description
              "Description of test instance.";
          }
    
          leaf age-time {
            type pub-type:time;
            default "00:00:00";
            description
              "Aging time of test instance.";
          }
    
          leaf frequency {
            type uint32 {
              range "1..604800";
            }
            units "s";
            description
              "Cyclic scheduling period of test cases. The frequency must be greater than the value of the following formula; otherwise, the test results may be inaccurate:
             (number of sent packets - 1) * (packet sending interval) + (timeout period).";
          }
        }  // grouping vpls-mac-ping-instance-input
      }  // submodule huawei-nqa-instance
    

© 2023 YumaWorks, Inc. All rights reserved.