huawei-diagnostic-tools-gmac

MAC diagnosis tool.

  • Version: 2020-01-14

    huawei-diagnostic-tools-gmac@2020-01-14


    
      submodule huawei-diagnostic-tools-gmac {
    
        yang-version 1;
    
        belongs-to huawei-diagnostic-tools {
            prefix diagnostic-tools;
        }
    
        import huawei-pub-type {
          prefix pub-type;
        }
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-extension {
          prefix ext;
        }
    
        include huawei-diagnostic-tools-common;
        include huawei-diagnostic-tools-type;
    
        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 "MAC diagnosis tool.";
    
        revision "2020-01-14" {
          description "Add container for list.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-04-13" {
          description "Init revision.";
          reference
            "Huawei private.";
    
        }
    
    
        grouping gmac-ping-trace-result-type {
          description "Gmac test result.";
          container ping-results {
            config false;
            description
              "List of ping test results.";
            list ping-result {
              key "test-name";
              config false;
              description
                "Statistics of ping test result.";
              leaf test-name {
                type string {
                  length "1..32";
                }
                config false;
                description "Test name.";
              }
    
              leaf packet-send {
                type uint32;
                config false;
                description
                  "Total number of sent packets.";
              }
    
              leaf packet-receive {
                type uint32;
                config false;
                description
                  "Total number of received packets.";
              }
    
              leaf loss-ratio {
                type pub-type:percent;
                units "%";
                config false;
                description
                  "Packet loss ratio of a test.";
              }
    
              leaf rtt-min {
                type uint32;
                units "ms";
                config false;
                description
                  "Minimum RTT of all test packets.";
              }
    
              leaf rtt-max {
                type uint32;
                units "ms";
                config false;
                description
                  "Maximum RTT of all test packets.";
              }
    
              leaf rtt-average {
                type uint32;
                units "ms";
                config false;
                description
                  "Average RTT of all test packets.";
              }
    
              leaf status {
                type dgntl-test-status-type;
                config false;
                description "Test status.";
              }
    
              container probes {
                config false;
                description
                  "List of probe test results.";
                list probe {
                  key "sequence";
                  config false;
                  description
                    "Statistics of probe result.";
                  leaf sequence {
                    type uint32;
                    config false;
                    description
                      "Serial number of a test packet received by a certain hop.";
                  }
    
                  leaf dest-mac {
                    type pub-type:mac-address;
                    config false;
                    description
                      "Destination mac address of the related hop in a test.";
                  }
    
                  leaf data-bytes {
                    type uint32;
                    config false;
                    description
                      "Number of bytes in a received response packet.";
                  }
    
                  leaf rtt {
                    type uint32;
                    units "ms";
                    config false;
                    description
                      "The round-trip time of the test message, in milliseconds.";
                  }
    
                  leaf result-type {
                    type probe-result-type;
                    config false;
                    description
                      "Result of packet sending, which is either success or timeout.";
                  }
    
                  leaf is-delete {
                    ext:support-filter "true";
                    type boolean;
                    config false;
                    description
                      "Enable/disable the function of deleting test results.";
                  }
                }  // list probe
              }  // container probes
            }  // list ping-result
          }  // container ping-results
        }  // grouping gmac-ping-trace-result-type
    
        rpc gmac-start-ping {
          ext:node-ref "/diagnostic-tools:diagnostic-tools/diagnostic-tools:gmac/diagnostic-tools:ping-results";
          description "Start gmac ping.";
          input {
            leaf test-name {
              type string {
                length "1..32";
              }
              mandatory true;
              description "Test name.";
            }
    
            leaf dest-mac {
              type pub-type:mac-address;
              mandatory true;
              description
                "Destination mac address of the related hop in a test.";
            }
    
            choice l2-protocol {
              description "L2 protocol.";
              case vsi {
                description "VSI.";
                leaf vsi-name {
                  type string {
                    length "1..31";
                  }
                  description "VSI name.";
                }
              }  // case vsi
            }  // choice l2-protocol
    
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              description "Interface name.";
            }
    
            choice vlan-type {
              description "VLAN type.";
              case qinq {
                description "QINQ VLAN.";
                leaf pe-vid {
                  type uint16 {
                    range "1..4094";
                  }
                  description "PE VLAN ID.";
                }
    
                leaf ce-vid {
                  type uint16 {
                    range "1..4094";
                  }
                  description "CE VLAN ID.";
                }
              }  // case qinq
    
              case dot1q {
                description "DOT1Q VLAN.";
                leaf dot1q-vlan {
                  type uint16 {
                    range "1..4094";
                  }
                  description
                    "Config DOT1Q VLAN ID.";
                }
              }  // case dot1q
            }  // choice vlan-type
    
            leaf count {
              type uint32 {
                range "1..4294967295";
              }
              default "5";
              description
                "Specify the times of ping action (default is 5).";
            }
    
            leaf packet-size {
              type uint32 {
                range "95..9000";
              }
              units "Byte";
              default "95";
              description
                "Number of data bytes to be sent.";
            }
    
            leaf timeout {
              type uint32 {
                range "1..65535";
              }
              units "ms";
              default "2000";
              description
                "Specifies the time-out period.";
            }
    
            leaf priority {
              type uint32 {
                range "0..7";
              }
              default "7";
              description
                "Message priority, the default value is 7.";
            }
          }
        }  // rpc gmac-start-ping
    
        rpc gmac-stop-ping {
          ext:node-ref "/diagnostic-tools:diagnostic-tools/diagnostic-tools:gmac/diagnostic-tools:ping-results";
          description "Stop gmac ping.";
          input {
            leaf test-name {
              type leafref {
                path "/diagnostic-tools:diagnostic-tools/diagnostic-tools:gmac/diagnostic-tools:ping-results/diagnostic-tools:ping-result/diagnostic-tools:test-name";
              }
              mandatory true;
              description "Test name.";
            }
          }
        }  // rpc gmac-stop-ping
    
        rpc gmac-delete-ping {
          ext:node-ref "/diagnostic-tools:diagnostic-tools/diagnostic-tools:gmac/diagnostic-tools:ping-results";
          description "Delete gmac ping.";
          input {
            leaf test-name {
              type leafref {
                path "/diagnostic-tools:diagnostic-tools/diagnostic-tools:gmac/diagnostic-tools:ping-results/diagnostic-tools:ping-result/diagnostic-tools:test-name";
              }
              mandatory true;
              description "Test name.";
            }
          }
        }  // rpc gmac-delete-ping
    
        augment /diagnostic-tools:diagnostic-tools {
          description
            "List of gmac Ping & Trace tests.";
          container gmac {
            config false;
            description
              "Statistics of gmac Ping & Trace.";
            uses diagnostic-tools:gmac-ping-trace-result-type;
          }  // container gmac
        }
      }  // submodule huawei-diagnostic-tools-gmac
    

© 2023 YumaWorks, Inc. All rights reserved.