No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

RESTful API Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes the OPS APIs supported by the device, including OPS-supported operations, request examples, elements in the requests, response examples, elements in the responses, and response status codes.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
IPv4 Ping

IPv4 Ping

Start an IPv4 Ping Test

Operation

URI

Description

POST

/dgntl/ipv4/startIpPing

Start an IPv4 ping operation.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
              <startIpPing>
                <testName>ping</testName>
                <destAddr>192.168.1.2</destAddr>
                <sourceAddr>192.168.1.1</sourceAddr>
              </startIpPing>

    Table 3-563 describes elements in requests.

    Table 3-563  Elements

    Element

    Description

    destAddr

    Specifies the destination IP address of ICMP Echo Request packets. This element is mandatory.

    sourceAddr

    Specifies the source IP address of ICMP Echo Request packets.

    ifName

    Specifies the name of an interface for sending ICMP packets.

    packetCount

    Specifies the number of ICMP packets to be sent.

    packetSize

    Specifies the number of bytes of ICMP packets.

    interval

    Specifies an interval at which ICMP packets are sent.

    timeout

    Specifies the timeout period of ICMP packets.

    ttl

    Specifies the TTL of ICMP Echo Request packets to be sent.

    tos

    Specifies the ToS of ICMP Echo Request packets to be sent.

    vrfName

    Specifies a VPN instance name.

    testName

    Specifies a ping test name. This element is mandatory.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
    </rpc-reply>
    

    Table 3-564 describes status codes in responses.

    Table 3-564  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Stop an IPv4 Ping Test

Operation

URI

Description

POST

/dgntl/ipv4/stopIpPing

Stop an IPv4 ping test.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
              <stopIpPing>
                <testName>ping</testName>
              </stopIpPing>

    Table 3-565 describes elements in requests.

    Table 3-565  Elements

    Element

    Description

    testName

    Specifies a ping test name. This element is mandatory.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
    </rpc-reply>

    Table 3-566 describes status codes in responses.

    Table 3-566  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Delete an IPv4 Ping Test

Operation

URI

Description

POST

/dgntl/ipv4/deleteIpPing

Delete an IPv4 ping operation.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?>
              <deleteIpPing>
                <testName>ping</testName>
              </deleteIpPing>

    Table 3-567 describes elements in requests.

    Table 3-567  Elements

    Element

    Description

    testName

    Specifies a ping test name. This element is mandatory.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?>
    <rpc-reply message-id="801" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
    </rpc-reply>

    Table 3-568 describes status codes in responses.

    Table 3-568  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Query an IPv4 Ping Test

Operation

URI

Description

GET

/dgntl/ipv4/ipv4PingResults

Query all IPv4 ping results.

GET

/dgntl/ipv4/ipv4PingResults

Query an IPv4 ping result.

  • Request example

    Query all results.

    <?xml version='1.0' encoding='UTF-8'?>  
    <ipv4PingResults>
        <ipv4PingResult>
           <testName></testName> 
           <packetRecv/> 
           <packetSend/> 
           <lossRatio/> 
           <rttMin/> 
           <rttMax/> 
           <averageRtt/> 
           <status/> 
           <errorType/> 
        </ipv4PingResult>
    </ipv4PingResults>
    Query a single result.
    <?xml version='1.0' encoding='UTF-8'?> 
    <ipv4PingResults> 
        <ipv4PingResult> 
           <testName>testName</testName> 
           <packetRecv/> 
           <packetSend/> 
           <lossRatio/> 
           <rttMin/> 
           <rttMax/> 
           <averageRtt/> 
           <status/> 
           <errorType/> 
        </ipv4PingResult> 
    </ipv4PingResults>

    Table 3-569 describes elements in requests.

    Table 3-569  Elements

    Element

    Description

    testName

    Specifies a ping test name. This element is mandatory.

    packetRecv

    Specifies the number of packets received.

    packetSend

    Specifies the number of packets sent.

    lossRatio

    Specifies a packet loss rate.

    rttMin

    Specifies the minimum delay.

    rttMax

    Specifies the maximum delay.

    averageRtt

    Specifies the average delay.

    status

    Specifies the detection status.

    • finished
    • processing

    errorType

    Specifies a ping result.

    • success
    • failed

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <ipv4PingResults> 
        <ipv4PingResult> 
            <testName>s7</testName> 
            <packetRecv>3</packetRecv> 
            <packetSend>3</packetSend> 
            <lossRatio>0</lossRatio> 
            <rttMin>1</rttMin> 
            <rttMax>1</rttMax> 
            <averageRtt>1</averageRtt> 
            <status>finished</status> 
            <errorType>success</errorType> 
        </ipv4PingResult> 
    </ipv4PingResults>

    Table 3-570 describes elements in responses.

    Table 3-570  Elements

    Element

    Description

    testName

    Specifies a ping test name.

    packetRecv

    Specifies the number of packets received.

    packetSend

    Specifies the number of packets sent.

    lossRatio

    Specifies a packet loss rate.

    rttMin

    Specifies the minimum delay.

    rttMax

    Specifies the maximum delay.

    averageRtt

    Specifies the average delay.

    status

    Specifies the detection status.

    • finished
    • processing

    errorType

    Specifies a ping result.

    • success
    • failed

    Table 3-571 describes status codes in responses.

    Table 3-571  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Query the Detailed IPv4 Ping Result

Operation

URI

Description

GET

/dgntl/ipv4/ipv4PingResults/ipv4PingResult

Query the detailed IPv4 ping result.

  • Request example
    <?xml version='1.0' encoding='UTF-8'?> 
    <ipv4PingResult>
    <testName>s7</testName>
    <pingResultDetails> 
        <pingResultDetail> 
           <testName></testName> 
           <index></index> 
           <ipAddr/> 
           <packetSize/> 
           <ttl/> 
           <rtt/> 
           <isDelete/> 
           <resultType/> 
        </pingResultDetail> 
    </pingResultDetails>
    </ipv4PingResult>

    Table 3-572 describes elements in requests.

    Table 3-572  Elements

    Element

    Description

    testName

    Specifies a ping test name. This element is mandatory.

    index

    Specifies a packet index. This element is mandatory.

    ipAddr

    Specifies the IP address of packets.

    packetSize

    Specifies the number of bytes of a packet.

    ttl

    Specifies the TTL of packets.

    rtt

    Specifies a delay.

    isDelete

    Indicates whether the ping test is deleted.

    resultType

    Specifies a ping result.

    • success
    • timeout
    • failed

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <pingResultDetails> 
        <pingResultDetail> 
            <testName>s7</testName> 
            <index>2</index> 
            <ipAddr>127.0.0.1</ipAddr> 
            <packetSize>56</packetSize> 
            <ttl>255</ttl> 
            <rtt>1</rtt> 
            <isDelete>false</isDelete> 
            <resultType>success</resultType> 
        </pingResultDetail> 
    </pingResultDetails>

    Table 3-573 describes elements in responses.

    Table 3-573  Elements

    Element

    Description

    testName

    Specifies a ping test name.

    index

    Specifies a packet index.

    ipAddr

    Specifies the IP address of packets.

    packetSize

    Specifies the number of bytes of a packet.

    ttl

    Specifies the TTL of packets.

    rtt

    Specifies a delay.

    isDelete

    Indicates whether the ping test is deleted.

    resultType

    Specifies a ping result.

    • success
    • timeout
    • failed

    Table 3-574 describes status codes in responses.

    Table 3-574  Status codes in responses

    Status Code

    Description

    200 OK

    The operation succeeded.

    400 Bad Request

    The request operation failed because the request is incorrect in syntax or the information attribute in the request is incorrect.

    500 Internal Server Error

    The request operation failed because of internal errors in services or unidentified processing errors.

Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166567

Views: 30001

Downloads: 127

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next