huawei-twamp-controller

TWAMP Controller.

  • Version: 2020-03-14

    huawei-twamp-controller@2020-03-14


    
      module huawei-twamp-controller {
    
        yang-version 1;
    
        namespace
          "urn:huawei:yang:huawei-twamp-controller";
    
        prefix twamp-controller;
    
        import huawei-extension {
          prefix ext;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-l3vpn {
          prefix l3vpn;
        }
        import huawei-ifm {
          prefix ifm;
        }
    
        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 "TWAMP Controller.";
    
        revision "2020-03-14" {
          description "Modify description.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-12-27" {
          description "Solve some errors.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-05-05" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "twampclient";
    
        typedef period-type {
          type enumeration {
            enum "10ms" {
              value 1;
              description
                "The period of sending packets is 10ms.";
            }
            enum "100ms" {
              value 2;
              description
                "The period of sending packets is 100ms.";
            }
            enum "1000ms" {
              value 3;
              description
                "The period of sending packets is 1000ms.";
            }
            enum "30000ms" {
              value 4;
              description
                "The period of sending packets is 30000ms.";
            }
          }
          description
            "The period of sending packets.";
        }
    
        typedef test-state {
          type enumeration {
            enum "initial" {
              value 0;
              description
                "Test session state is initial.";
            }
            enum "active" {
              value 2;
              description
                "Test session state is active.";
            }
            enum "inactive" {
              value 1;
              description
                "Test session state is inactive.";
            }
            enum "unknown" {
              value 3;
              description
                "Test session state is unknown.";
            }
            enum "inconsistent" {
              value 4;
              description
                "Test session state is inconsistent.";
            }
          }
          description "Test session state.";
        }
    
        typedef session-start-type {
          type enumeration {
            enum "continual" {
              value 1;
              description
                "Session start type is continual.";
            }
            enum "on-demand" {
              value 2;
              description
                "Session start type is on-demand.";
            }
            enum "unknown" {
              value 0;
              description
                "Session start type is unknown.";
            }
            enum "regular" {
              value 3;
              description
                "Session start type is regular.";
            }
          }
          description "Session start type.";
        }
    
        typedef ctrl-auth-mode {
          type enumeration {
            enum "unauthenticated" {
              value 0;
              description
                "Controller authentication mode is unauthenticated.";
            }
            enum "authenticated" {
              value 1;
              description
                "Controller authentication mode is authenticated.";
            }
            enum "encrypted" {
              value 2;
              description
                "Controller authentication mode is encrypted.";
            }
            enum "unknown" {
              value 3;
              description
                "Controller authentication mode is unknown.";
            }
          }
          description
            "Controller authentication mode.";
        }
    
        typedef padding-info {
          type enumeration {
            enum "00" {
              value 0;
              description
                "Padding information is 00.";
            }
            enum "aa" {
              value 170;
              description
                "Padding information is aa.";
            }
            enum "55" {
              value 85;
              description
                "Padding information is 55.";
            }
            enum "ff" {
              value 255;
              description
                "Padding information is ff.";
            }
          }
          description "Padding information.";
        }
    
        typedef inactive-reason {
          type enumeration {
            enum "not-startup" {
              value 1;
              description
                "The inactive reason is not startup.";
            }
            enum "absence-resource" {
              value 2;
              description
                "The inactive reason is absence of resource.";
            }
            enum "board-fault" {
              value 3;
              description
                "The inactive reason is board fault.";
            }
          }
          description "The inactive reason.";
        }
    
        container twamp-controller {
          description "TWAMP Controller.";
          container client {
            presence "Enable client of TWAMP.";
            description
              "Configure the client of TWAMP light.";
            container sessions {
              description
                "List of configuration session.";
              list session {
                key "id";
                unique "send-ip-addr ref-ip-addr send-port ref-port vrf-name";
                description
                  "Configure the object of session.";
                leaf id {
                  type uint32 {
                    range "1..65535";
                  }
                  description
                    "The session ID of configuration session.";
                }
    
                leaf send-ip-addr {
                  type inet:ip-address-no-zone;
                  must
                    "((../send-ip-addr) != (../ref-ip-addr))";
                  mandatory true;
                  description
                    "The sender IP address of configuration session.";
                }
    
                leaf ref-ip-addr {
                  type inet:ip-address-no-zone;
                  must
                    "((../send-ip-addr) != (../ref-ip-addr))";
                  mandatory true;
                  description
                    "The reflector IP address of configuration session.";
                }
    
                leaf send-port {
                  type uint16 {
                    range "862..863|1025..65535";
                  }
                  mandatory true;
                  description
                    "The sender port of configuration session.";
                }
    
                leaf ref-port {
                  type uint16 {
                    range "862..863|1025..65535";
                  }
                  mandatory true;
                  description
                    "The reflector port of configuration session.";
                }
    
                leaf vrf-name {
                  type leafref {
                    path "/ni:network-instance/ni:instances/ni:instance/ni:name";
                  }
                  must
                    "(contains(../send-ip-addr,':') and /ni:network-instance/ni:instances/ni:instance[ni:name = current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv6-unicast']) or (not(contains(../send-ip-addr,':'))and /ni:network-instance/ni:instances/ni:instance[ni:name = current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast'])";
                  description
                    "The VRF name of configuration session.";
                }
    
                leaf dscp-value {
                  type uint32 {
                    range "0..63";
                  }
                  default "0";
                  description
                    "The DSCP value of configuration session.";
                }
    
                leaf padding-length {
                  type uint32 {
                    range "32..1454";
                  }
                  must
                    "(contains(../send-ip-addr,':') and ((../link-bundle-if and ../padding-length>=38 and ../padding-length<=1428) or (not(../link-bundle-if) and ../padding-length<=1434))) or (not(contains(../send-ip-addr,':')) and ((../link-bundle-if and ../padding-length>=38 and ../padding-length<=1448) or not(../link-bundle-if)))";
                  default "128";
                  description
                    "The padding length of configuration session. The value range is 32-1454 and 32-1434 in V4 and V6, respectively.";
                }
    
                leaf padding-type {
                  type padding-info;
                  default "00";
                  description "Padding type.";
                }
    
                leaf binded-interface {
                  type leafref {
                    path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description
                    "The interface name which the test-session is binded to.";
                }
    
                leaf description {
                  type string {
                    length "3..32";
                  }
                  description
                    "Session description.";
                }
    
                leaf link-bundle-if {
                  type leafref {
                    path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  must
                    "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name = current()]/ifm:type='Eth-Trunk'";
                  must
                    "not(../binded-interface)";
                  description
                    "Link-bundle interface that the session binds.";
                }
    
                container twoway-loss-threshold {
                  description
                    "Configure the twoway loss threshold of session.";
                  leaf up-limit {
                    type string {
                      length "1..7";
                      pattern
                        '[0-1]{0,1}[0-9]{0,1}[0-9]{0,1}(\.[0-9]{1,4})?';
                    }
                    units "%";
                    default "0.1";
                    description
                      "Twoway loss threshold upper limit.";
                  }
    
                  leaf low-limit {
                    type string {
                      length "1..7";
                      pattern
                        '[0-1]{0,1}[0-9]{0,1}[0-9]{0,1}(\.[0-9]{1,4})?';
                    }
                    units "%";
                    default "0.05";
                    description
                      "Twoway loss threshold lower limit.";
                  }
                }  // container twoway-loss-threshold
    
                container twoway-delay-threshold {
                  description
                    "Configure the twoway delay threshold of session.";
                  leaf up-limit {
                    type uint32 {
                      range "2..1000";
                    }
                    units "ms";
                    must
                      "../low-limit < ../up-limit";
                    default "100";
                    description
                      "Twoway delay threshold upper limit.";
                  }
    
                  leaf low-limit {
                    type uint32 {
                      range "1..999";
                    }
                    units "ms";
                    must
                      "../low-limit < ../up-limit";
                    default "80";
                    description
                      "Twoway delay threshold lower limit.";
                  }
                }  // container twoway-delay-threshold
    
                container twoway-jitter-threshold {
                  description
                    "Configure the twoway jitter threshold of session.";
                  leaf up-limit {
                    type uint32 {
                      range "2..1000";
                    }
                    units "ms";
                    must
                      "../low-limit < ../up-limit";
                    default "10";
                    description
                      "Twoway jitter threshold upper limit.";
                  }
    
                  leaf low-limit {
                    type uint32 {
                      range "1..999";
                    }
                    units "ms";
                    must
                      "../low-limit < ../up-limit";
                    default "8";
                    description
                      "Twoway jitter threshold lower limit.";
                  }
                }  // container twoway-jitter-threshold
    
                container session-detail {
                  config false;
                  description
                    "Statistics of the running session information.";
                  leaf state {
                    type test-state;
                    description
                      "The state of configuration session.";
                  }
    
                  leaf type {
                    type session-start-type;
                    description
                      "The type of configuration session.";
                  }
    
                  leaf auth-mode {
                    type ctrl-auth-mode;
                    description
                      "The authentication mode of configuration session.";
                  }
    
                  leaf last-start-time {
                    type yang:date-and-time;
                    description
                      "The last start time of configuration session.";
                  }
    
                  leaf last-stop-time {
                    type yang:date-and-time;
                    description
                      "The last stop time of configuration session.";
                  }
    
                  leaf duration-time {
                    type uint32;
                    units "s";
                    description
                      "The duation time of configuration session.";
                  }
    
                  leaf packet-count {
                    type uint32;
                    description
                      "The packet count of configuration session.";
                  }
    
                  leaf period {
                    type period-type;
                    units "ms";
                    description
                      "The period of configuration session.";
                  }
    
                  leaf timeout {
                    type uint16 {
                      range "1..10";
                    }
                    units "s";
                    description
                      "The timeout of configuration session.";
                  }
    
                  container member-interface-infos {
                    description
                      "List of member interface information.";
                    list member-interface-info {
                      key "member-if";
                      description
                        "Statistics of the member interface information.";
                      leaf member-if {
                        type leafref {
                          path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                        }
                        description
                          "Member interface name.";
                      }
    
                      leaf state {
                        type test-state;
                        description
                          "The state of configuration session.";
                      }
    
                      leaf inactive-reason {
                        type inactive-reason;
                        description
                          "The inactive reason.";
                      }
    
                      leaf last-start-time {
                        type yang:date-and-time;
                        description
                          "The last start time of configuration session.";
                      }
    
                      leaf last-stop-time {
                        type yang:date-and-time;
                        description
                          "The last stop time of configuration session.";
                      }
                    }  // list member-interface-info
                  }  // container member-interface-infos
                }  // container session-detail
    
                container twoway-delay-result {
                  config false;
                  description
                    "Statistics of the result of two way delay.";
                  leaf average-delay {
                    type uint32;
                    units "us";
                    description
                      "The average delay.";
                  }
    
                  leaf maximum-delay {
                    type uint32;
                    units "us";
                    description
                      "The maximum delay.";
                  }
    
                  leaf minimum-delay {
                    type uint32;
                    units "us";
                    description
                      "The minimum delay.";
                  }
    
                  leaf average-jitter {
                    type uint32;
                    units "us";
                    description
                      "The average jitter.";
                  }
    
                  leaf maximum-jitter {
                    type uint32;
                    units "us";
                    description
                      "The maximum jitter.";
                  }
    
                  leaf minimum-jitter {
                    type uint32;
                    units "us";
                    description
                      "The minimum jitter.";
                  }
    
                  leaf average-tx-jitter {
                    type uint32;
                    units "us";
                    description
                      "The average TX jitter.";
                  }
    
                  leaf maximum-tx-jitter {
                    type uint32;
                    units "us";
                    description
                      "The maximum TX jitter.";
                  }
    
                  leaf minimum-tx-jitter {
                    type uint32;
                    units "us";
                    description
                      "The minimum TX jitter.";
                  }
    
                  leaf average-rx-jitter {
                    type uint32;
                    units "us";
                    description
                      "The average RX jitter.";
                  }
    
                  leaf maximum-rx-jitter {
                    type uint32;
                    units "us";
                    description
                      "The maximum RX jitter.";
                  }
    
                  leaf minimum-rx-jitter {
                    type uint32;
                    units "us";
                    description
                      "The minimum RX jitter.";
                  }
    
                  container twoway-delay-datas {
                    description
                      "List of two way delay data.";
                    list twoway-delay-data {
                      key "index";
                      description
                        "Statistics of data of two-way delay measurement.";
                      leaf index {
                        type uint32;
                        description
                          "Data index of two-way delay measurement.";
                      }
    
                      leaf delay {
                        type uint32;
                        units "us";
                        description
                          "Two-way delay results.";
                      }
    
                      leaf jitter {
                        type uint32;
                        units "us";
                        description
                          "Two-way jitter results.";
                      }
    
                      leaf tx-jitter {
                        type uint32;
                        units "us";
                        description
                          "Two-way TX jitter results.";
                      }
    
                      leaf rx-jitter {
                        type uint32;
                        units "us";
                        description
                          "Two-way RX jitter results.";
                      }
                    }  // list twoway-delay-data
                  }  // container twoway-delay-datas
                }  // container twoway-delay-result
    
                container twoway-delay-result-link-bundle-ifs {
                  config false;
                  description
                    "List of the result of two way delay of link bundle session.";
                  list twoway-delay-result-link-bundle-if {
                    key "member-if";
                    description
                      "Statistics of data of two-way loss measurement.";
                    leaf member-if {
                      type leafref {
                        path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                      }
                      description
                        "Member interface name.";
                    }
    
                    leaf average-delay {
                      type uint32;
                      units "us";
                      description
                        "The average delay.";
                    }
    
                    leaf maximum-delay {
                      type uint32;
                      units "us";
                      description
                        "The maximum delay.";
                    }
    
                    leaf minimum-delay {
                      type uint32;
                      units "us";
                      description
                        "The minimum delay.";
                    }
    
                    leaf average-jitter {
                      type uint32;
                      units "us";
                      description
                        "The average jitter.";
                    }
    
                    leaf maximum-jitter {
                      type uint32;
                      units "us";
                      description
                        "The maximum jitter.";
                    }
    
                    leaf minimum-jitter {
                      type uint32;
                      units "us";
                      description
                        "The minimum jitter.";
                    }
    
                    leaf average-tx-jitter {
                      type uint32;
                      units "us";
                      description
                        "The average TX jitter.";
                    }
    
                    leaf maximum-tx-jitter {
                      type uint32;
                      units "us";
                      description
                        "The maximum TX jitter.";
                    }
    
                    leaf minimum-tx-jitter {
                      type uint32;
                      units "us";
                      description
                        "The minimum TX jitter.";
                    }
    
                    leaf average-rx-jitter {
                      type uint32;
                      units "us";
                      description
                        "The average RX jitter.";
                    }
    
                    leaf maximum-rx-jitter {
                      type uint32;
                      units "us";
                      description
                        "The maximum RX jitter.";
                    }
    
                    leaf minimum-rx-jitter {
                      type uint32;
                      units "us";
                      description
                        "The minimum RX jitter.";
                    }
    
                    container twoway-delay-datas {
                      description
                        "List of two way delay data.";
                      list twoway-delay-data {
                        key "index";
                        description
                          "Statistics of data of two-way delay measurement.";
                        leaf index {
                          type uint32;
                          description
                            "Data index of two-way delay measurement.";
                        }
    
                        leaf delay {
                          type uint32;
                          units "us";
                          description
                            "Two-way delay results.";
                        }
    
                        leaf jitter {
                          type uint32;
                          units "us";
                          description
                            "Two-way jitter results.";
                        }
    
                        leaf tx-jitter {
                          type uint32;
                          units "us";
                          description
                            "Two-way TX jitter results.";
                        }
    
                        leaf rx-jitter {
                          type uint32;
                          units "us";
                          description
                            "Two-way RX jitter results.";
                        }
                      }  // list twoway-delay-data
                    }  // container twoway-delay-datas
                  }  // list twoway-delay-result-link-bundle-if
                }  // container twoway-delay-result-link-bundle-ifs
    
                container twoway-loss-result {
                  config false;
                  description
                    "Statistics of the result of two way loss.";
                  leaf average-loss {
                    type uint32;
                    description
                      "The average loss.";
                  }
    
                  leaf maximum-loss {
                    type uint32;
                    description
                      "The maximum loss.";
                  }
    
                  leaf minimum-loss {
                    type uint32;
                    description
                      "The minimum loss.";
                  }
    
                  leaf average-loss-ratio {
                    type string {
                      length "1..9";
                    }
                    description
                      "The average loss ratio.";
                  }
    
                  leaf maximum-loss-ratio {
                    type string {
                      length "1..9";
                    }
                    description
                      "The maximum loss ratio.";
                  }
    
                  leaf minimum-loss-ratio {
                    type string {
                      length "1..9";
                    }
                    description
                      "The minimum loss ratio.";
                  }
    
                  leaf average-rx-error {
                    type uint32;
                    description
                      "The average RX error.";
                  }
    
                  leaf maximum-rx-error {
                    type uint32;
                    description
                      "The maximum RX error.";
                  }
    
                  leaf minium-rx-error {
                    type uint32;
                    description
                      "The minium RX error.";
                  }
    
                  leaf average-rx-error-ratio {
                    type string {
                      length "1..9";
                    }
                    description
                      "The average RX error ratio.";
                  }
    
                  leaf maximum-rx-error-ratio {
                    type string {
                      length "1..9";
                    }
                    description
                      "The maximum RX error ratio.";
                  }
    
                  leaf minimum-rx-error-ratio {
                    type string {
                      length "1..9";
                    }
                    description
                      "The minimum RX error ratio.";
                  }
    
                  container twoway-loss-datas {
                    description
                      "List of two way loss data.";
                    list twoway-loss-data {
                      key "index";
                      description
                        "Statistics of data of two-way loss measurement.";
                      leaf index {
                        type uint32;
                        description
                          "Data index of two-way loss measurement.";
                      }
    
                      leaf loss {
                        type uint32;
                        description
                          "Two-way loss results.";
                      }
    
                      leaf loss-ratio {
                        type string {
                          length "1..9";
                        }
                        description
                          "Two-way lossRatio results.";
                      }
    
                      leaf error {
                        type uint32;
                        description
                          "Two-way error results.";
                      }
    
                      leaf error-ratio {
                        type string {
                          length "1..9";
                        }
                        description
                          "Two-way error ratio results.";
                      }
                    }  // list twoway-loss-data
                  }  // container twoway-loss-datas
                }  // container twoway-loss-result
    
                container twoway-loss-result-link-bundle-ifs {
                  config false;
                  description
                    "List of the result of two way loss of link bundle session.";
                  list twoway-loss-result-link-bundle-if {
                    key "member-if";
                    description
                      "Statistics of data of two-way loss measurement.";
                    leaf member-if {
                      type leafref {
                        path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                      }
                      description
                        "Member interface name.";
                    }
    
                    leaf average-loss {
                      type uint32;
                      description
                        "The average loss.";
                    }
    
                    leaf maximum-loss {
                      type uint32;
                      description
                        "The maximum loss.";
                    }
    
                    leaf minimum-loss {
                      type uint32;
                      description
                        "The minimum loss.";
                    }
    
                    leaf average-loss-ratio {
                      type string {
                        length "1..9";
                      }
                      description
                        "The average loss ratio.";
                    }
    
                    leaf maximum-loss-ratio {
                      type string {
                        length "1..9";
                      }
                      description
                        "The maximum loss ratio.";
                    }
    
                    leaf minimum-loss-ratio {
                      type string {
                        length "1..9";
                      }
                      description
                        "The minimum loss ratio.";
                    }
    
                    leaf average-rx-error {
                      type uint32;
                      description
                        "The average RX error.";
                    }
    
                    leaf maximum-rx-error {
                      type uint32;
                      description
                        "The maximum RX error.";
                    }
    
                    leaf minium-rx-error {
                      type uint32;
                      description
                        "The minium RX error.";
                    }
    
                    leaf average-rx-error-ratio {
                      type string {
                        length "1..9";
                      }
                      description
                        "The average RX error ratio.";
                    }
    
                    leaf maximum-rx-error-ratio {
                      type string {
                        length "1..9";
                      }
                      description
                        "The maximum RX error ratio.";
                    }
    
                    leaf minimum-rx-error-ratio {
                      type string {
                        length "1..9";
                      }
                      description
                        "The minimum RX error ratio.";
                    }
    
                    container twoway-loss-datas {
                      description
                        "List of two way loss data.";
                      list twoway-loss-data {
                        key "index";
                        description
                          "Statistics of data of two-way loss measurement.";
                        leaf index {
                          type uint32;
                          description
                            "Data index of two-way loss measurement.";
                        }
    
                        leaf loss {
                          type uint32;
                          description
                            "Two-way loss results.";
                        }
    
                        leaf loss-ratio {
                          type string {
                            length "1..9";
                          }
                          description
                            "Two-way lossRatio results.";
                        }
    
                        leaf error {
                          type uint32;
                          description
                            "Two-way error results.";
                        }
    
                        leaf error-ratio {
                          type string {
                            length "1..9";
                          }
                          description
                            "Two-way error ratio results.";
                        }
                      }  // list twoway-loss-data
                    }  // container twoway-loss-datas
                  }  // list twoway-loss-result-link-bundle-if
                }  // container twoway-loss-result-link-bundle-ifs
              }  // list session
            }  // container sessions
          }  // container client
    
          container sender {
            presence "Enable sender of TWAMP";
            description
              "Configure the sender of TWAMP light.";
            container sessions {
              description
                "List of sender session.";
              list session {
                key "id";
                description
                  "Configure the object of sender session.";
                leaf id {
                  type leafref {
                    path "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session/twamp-controller:id";
                  }
                  description
                    "Configure the session ID of sender session.";
                }
    
                leaf period {
                  type period-type;
                  units "ms";
                  default "100ms";
                  description
                    "The period of sender session.";
                }
    
                leaf timeout {
                  type uint16 {
                    range "1..10";
                  }
                  units "s";
                  default "5";
                  description
                    "The timeout of sender session.";
                }
              }  // list session
            }  // container sessions
    
            container regular-sessions {
              description
                "List of sender regular session.";
              list regular-session {
                key "id";
                description
                  "Configure the object of sender regular session.";
                leaf id {
                  type leafref {
                    path "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session/twamp-controller:id";
                  }
                  description
                    "The session ID of regular sender session.";
                }
    
                leaf regular-time {
                  ext:operation-exclude "update|delete";
                  type uint16 {
                    range "10..60";
                  }
                  units "s";
                  default "30";
                  description
                    "The regular time of sender regular session.";
                }
    
                leaf packet-count {
                  ext:operation-exclude "update|delete";
                  type uint32 {
                    range "10..1000";
                  }
                  default "100";
                  description
                    "The packet count of sender regular session.";
                }
    
                leaf timeout {
                  ext:operation-exclude "update|delete";
                  type uint8 {
                    range "1..10";
                  }
                  units "s";
                  default "5";
                  description
                    "The timeout of sender regular session.";
                }
              }  // list regular-session
            }  // container regular-sessions
          }  // container sender
        }  // container twamp-controller
    
        rpc start-on-demand-test {
          ext:node-ref "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session";
          description
            "Start twamp-light on demand test.";
          input {
            leaf id {
              type leafref {
                path "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session/twamp-controller:id";
              }
              mandatory true;
              description
                "The session ID of on demand test session.";
            }
    
            choice packet-sent-type {
              mandatory true;
              description
                "Configure the type how the packet is sent in on demand test session.";
              case duration-type {
                description
                  "The packet is sent in dedicated duration.";
                leaf duration-time {
                  type uint32 {
                    range "60..300";
                  }
                  units "s";
                  description
                    "The duation time of on demand test session.";
                }
              }  // case duration-type
    
              case count-type {
                description
                  "The packet is sent by total count.";
                leaf packet-count {
                  type uint32 {
                    range "100..3000";
                  }
                  description
                    "The packet count of on demand test session.";
                }
              }  // case count-type
            }  // choice packet-sent-type
    
            leaf period {
              type period-type;
              units "ms";
              default "100ms";
              description
                "The period of on demand test session.";
            }
    
            leaf timeout {
              type uint16 {
                range "1..10";
              }
              units "s";
              default "5";
              description
                "The timeout of on demand test session.";
            }
          }
        }  // rpc start-on-demand-test
    
        rpc stop-on-demand-test {
          ext:node-ref "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session";
          description
            "Stop twamp-light on demand test.";
          input {
            leaf id {
              type leafref {
                path "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session/twamp-controller:id";
              }
              description
                "The session ID of on demand test session.";
            }
          }
        }  // rpc stop-on-demand-test
    
        rpc reset-statistics {
          ext:node-ref "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session";
          description
            "Reset the twamp-light statistics.";
          input {
            leaf id {
              type leafref {
                path "/twamp-controller:twamp-controller/twamp-controller:client/twamp-controller:sessions/twamp-controller:session/twamp-controller:id";
              }
              description
                "The session ID of test session.";
            }
          }
        }  // rpc reset-statistics
      }  // module huawei-twamp-controller
    

© 2023 YumaWorks, Inc. All rights reserved.