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 12800 and 12800E V200R005C10

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 15-3 describes elements in requests.

    Table 15-3 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 15-4 describes status codes in responses.

    Table 15-4 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 15-5 describes elements in requests.

    Table 15-5 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 15-6 describes status codes in responses.

    Table 15-6 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 15-7 describes elements in requests.

    Table 15-7 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 15-8 describes status codes in responses.

    Table 15-8 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.

Querying the Log Server Address List

Operation

URI

Description

GET

/pnp/netProvisionInfos/netProvisionInfo/logServerLists

Query the log server address list.

  • Request example
    <?xml version="1.0" encoding="UTF-8"?> 
    <logServerLists> 
        <logServerList> 
           <logServer/> 
        </logServerList> 
    </logServerLists>

    Table 15-9 describes elements in a request.

    Table 15-9 Elements

    Element

    Description

    logServer

    Log server addresses (a maximum of eight) obtained from the DHCP reply message.

  • Response example (XML format)
    <?xml version="1.0" encoding="UTF-8"?> 
    <netProvisionInfos> 
        <netProvisionInfo> 
           <ifName>10GE1/0/1</ifName>
           <logServerLists> 
              <logServerList> 
                 <logServer>10.10.10.0</logServer> 
              </logServerList> 
           </logServerLists> 
        </netProvisionInfos> 
    </netProvisionInfos>

    Table 15-10 describes status codes in a response.

    Table 15-10 Status codes

    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 15-11 describes elements in requests.

    Table 15-11 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 15-12 describes status codes in responses.

    Table 15-12 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 15-13 describes status codes in responses.

    Table 15-13 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-04-03

Document ID: EDOC1100075372

Views: 10556

Downloads: 16

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