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).
PNP

PNP

Query Network Configurations

Operation

URI

Description

GET

/pnp/netProvisionInfos/netProvisionInfo

Query network configurations.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <netProvisionInfo> 
        <ifName/> 
        <ipAddr/> 
        <ipMask/> 
        <serverIpAddr/> 
        <tftpServerAddr/> 
        <tftpServerName/> 
        <bootfileName/> 
    </netProvisionInfo>

    Table 3-286 describes elements in requests.

    Table 3-286  Elements

    Element

    Description

    ifName

    Specifies the name of the interface to which an IP address is assigned.

    ipAddr

    Specifies an IP address obtained.

    ipMask

    Specifies the mask of an IP address obtained.

    serverIpAddr

    Specifies the IP address of the server that has assigned addresses to users.

    tftpServerAddr

    Specifies the IP address of a TFTP server.

    tftpServerName

    Specifies the name of a TFTP server.

    bootfileName

    Specifies the name of a startup file.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <rpc-reply> 
        <netProvisionInfos> 
           <netProvisionInfo> 
              <ifName>10GE1/0/1</ifName> 
              <ipAddr>10.2.2.254</ipAddr> 
              <ipMask>255.255.255.0</ipMask> 
              <serverIpAddr>10.2.2.2</serverIpAddr> 
              <tftpServerAddr>10.3.3.5</tftpServerAddr> 
              <tftpServerName>tftpserver</tftpServerName> 
              <domainName>domain-name</domainName> 
              <bootfileName>bootfile.py</bootfileName> 
           </netProvisionInfo> 
        </netProvisionInfos> 
    </rpc-reply>

    Table 3-287 describes status codes in responses.

    Table 3-287  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 a DNS Address List

Operation

URI

Description

GET

/pnp/netProvisionInfos/netProvisionInfo/dnsLists

Query a DNS address list.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <dnsLists> 
        <dnsList> 
           <dns/> 
        </dnsList> 
    </dnsLists>

    Table 3-288 describes elements in requests.

    Table 3-288  Elements

    Element

    Description

    dns

    Specifies a DNS address carried in a DHCP response message. A maximum of eight DNS addresses can be returned per message.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <netProvisionInfos> 
        <netProvisionInfo> 
           <ifName>10GE1/0/1</ifName> 
           <dnsLists> 
              <dnsList> 
                 <dns>10.3.2.3</dns> 
              </dnsList> 
           </dnsLists> 
        </netProvisionInfo> 
    </netProvisionInfos>

    Table 3-289 describes status codes in responses.

    Table 3-289  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 a Gateway Address List

Operation

URI

Description

GET

/pnp/netProvisionInfos/netProvisionInfo/gatewayLists

Query a gateway address list.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <gatewayLists> 
        <gatewayList> 
           <gateway/> 
        </gatewayList> 
    </gatewayLists>

    Table 3-290 describes elements in requests.

    Table 3-290  Elements

    Element

    Description

    gateway

    Specifies a DNS address carried in a DHCP response message. A maximum of eight DNS addresses can be returned per message.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <netProvisionInfos> 
        <netProvisionInfo> 
           <ifName>10GE1/0/1</ifName> 
           <gatewayLists> 
              <gatewayList> 
                 <gateway>10.3.2.3</gateway> 
              </gatewayList> 
           </gatewayLists> 
        </netProvisionInfo> 
    </netProvisionInfos>

    Table 3-291 describes status codes in responses.

    Table 3-291  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.

Start PNP

Operation

URI

Description

POST

/pnp/startPnp

Start PNP to obtain network configurations.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <startPnp> 
        <mode>ZTP</mode> 
        <portType>MEth</portType> 
    </startPnp>

    Table 3-292 describes elements in requests.

    Table 3-292  Elements

    Element

    Description

    mode

    Specifies a PNP startup mode. Currently, the value can only be ZTP.

    portType

    Specifies a PnP-capable interface type. The value can be:

    • Meth
    • Ethernet
    • GigabitEthernet
    • 10GE
    • 40GE
    • 100GE

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <ok/>

    Table 3-293 describes status codes in responses.

    Table 3-293  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 PNP

Operation

URI

Description

POST

/pnp/stopPnp

Stop PNP from obtaining network configurations.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <stopPnp> 
    </stopPnp>
  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <ok/>

    Table 3-294 describes status codes in responses.

    Table 3-294  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: 27930

Downloads: 123

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