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

Configuration Guide - Network Management and Monitoring

CloudEngine 12800 and 12800E V200R005C10

This document describes the configurations of Network Management and Monitoring, including SNMP, RMON, LLDP, NQA, Service Diagnosis, Mirroring, Packet Capture, sFlow, and NETCONF.
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).
Query Parameters

Query Parameters

Each RESTCONF operation allows a request RUI to contain zero or more query parameters. You can specify query parameters as required.

  • Query parameters can be present in any sequence.
  • A request URL can contain multiple query parameters. Each of them can appear only once.
  • The names and values of query parameters are case sensitive.
Table 4-15 RESTCONF query parameters

Query Parameter

Operation Method

Description

content

GET,HEAD

Selects configuration data or all data.

depth

GET,HEAD

Returns the subtree depth of the content.

fields

GET,HEAD

Requests a subset of the target resource content.

with-defaults

GET,HEAD

Controls the function to query default values.

content

content indicates the type of the data you access. This parameter is allowed only for the GET or HEAD method. If it is used in other operation methods, "400 Bad Request" is returned.

The values of this parameter are as follows:
  • config: Only configuration data is accessed.
  • all: Both configuration data and non-configuration data are accessed. all is the default value.
Example 1 (XML format): If you want to view all data types, specify content as all or leave it unspecified.
  • Request

    GET /restconf/data/huawei-aaa:aaa/domains?content=all HTTP/1.1
    Host:X.X.X.X
    Accept:application/yang-data+xml
  • Response

    HTTP/1.1 200 OK
    Content-Type:application/yang-data+xml
    Content-Length:1744
    
    <?xml version="1.0" encoding="UTF-8"?>
    <domains xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
        <domain>
            <domainName>default</domainName>
            <accessLimit>283648</accessLimit>
            <onlineNum>2</onlineNum>
        </domain>
    
Example 2 (XML format): If you want to query only the configuration data, specify content as config.
  • Request

    GET /restconf/data/huawei-aaa:aaa/domains?content=config HTTP/1.1
    Host:X.X.X.X
    Accept:application/yang-data+xml
  • Response

    HTTP/1.1 200 OK
    Content-Type:application/yang-data+xml
    Content-Length:1744
    
    <?xml version="1.0" encoding="UTF-8"?>
    <domains xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
        <domain>
            <domainName>default</domainName>
            <accessLimit>283648</accessLimit>
        </domain>
    

depth

depth defines how deep you can query data. This parameter is allowed only for the GET or HEAD method. If it is used in other operation methods, "400 Bad Request" is returned. If the depth of a data node is greater than the value of the depth parameter, no query result is returned.

The values of this parameter are as follows:
  • 1-65535: maximum number of data layers that you can query. Figure 4-5 shows the data layers. For example, depth=1 indicates that the target data itself is queried.

    Figure 4-5 Example of data layers of the query result
  • unbounded: All child nodes are queried. unbounded is the default value.
Example 1 (XML format): If you want to view all child nodes, specify depth as unbounded or leave it unspecified.
  • Request

    GET /restconf/data/huawei-aaa:aaa/domains?depth=unbounded  HTTP/1.1
    Host:X.X.X.X
    Accept:application/yang-data+xml
  • Response

    HTTP/1.1 200 OK
    Content-Type:application/yang-data+xml
    Content-Length:1744
    
    <?xml version="1.0" encoding="UTF-8"?>
    <domains xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
        <domain>
            <domainName>default</domainName>
            <authenSchemeName>default</authenSchemeName>
            <acctSchemeName>default</acctSchemeName>
            <authorSchemeName>default</authorSchemeName>
            <domainState>active</domainState>
            <accessLimit>283648</accessLimit>
            <onlineNum>2</onlineNum>
            <serviceTerminal>true</serviceTerminal>
            <serviceTelnet>true</serviceTelnet>
            <serviceFtp>true</serviceFtp>
            <servicePpp>true</servicePpp>
            <serviceSsh>true</serviceSsh>
            <serviceQx>true</serviceQx>
            <serviceSnmp>true</serviceSnmp>
            <serviceMml>true</serviceMml>
            <serviceDot1x>true</serviceDot1x>
            <serviceHttp>true/serviceHttp>
            <timeRangeEnable>false</timeRangeEnable>
        </domain>
    </domains>
    
Example 2 (XML format): If you want to confirm whether one or more pieces of data exist in the specified target data, specify depth as 1.
  • Request

    GET /restconf/data/huawei-aaa:aaa/domains?depth=1  HTTP/1.1
    Host:X.X.X.X
    Accept:application/yang-data+xml
  • Response

    HTTP/1.1 200 OK
    Content-Type:application/yang-data+xml
    Content-Length:1744
    
    <?xml version="1.0" encoding="UTF-8"?>
    <domains xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
    </domains>
    

fields

The fields parameter can be used to retrieve the subsets of the target data content. This parameter is allowed only for the GET or HEAD method. If it is used in other operation methods, "400 Bad Request" is returned.

Example: query nodes of domainName and accessLimit.
  • Request

    GET /restconf/data?fields=huawei-aaa:aaa/domains(domainName;accessLimit) HTTP/1.1
    Host:X.X.X.X
    Accept:application/yang-data+json
  • Response

    {
     "ietf-restconf:data" : {
        "huawei-aaa:aaa" : {
          "domains" : {
            "domain" : [{
              "domainName" : "default",
              "accessLimit" : "283648"
            },
            {
              "domainName" : "default_admin",
              "accessLimit" : "283648"
            }]
          }
        }
     }
    }

with-defaults

with-defaults indicates that a device is capable of specifying how information about default data nodes should be returned. This parameter is allowed only for the GET method. If it is used in other operation methods, "400 Bad Request" is returned.

The values of this parameter are as follows:
  • report-all: All data nodes are reported, and no operation is performed on any node. report-all is the default value.
  • trim: Nodes whose configuration values equal the default values are not displayed in query results.
  • report-all-tagged: All nodes are queried, and nodes whose configuration values equal the default values are marked using default="true".
Example: The fields parameter is specified when you want to query some specific content in the target data.
  • Request

    GET /restconf/data/huawei-aaa:aaa/domains?with-defaults=report-all-tagged  HTTP/1.1
    Host:X.X.X.X
    Accept:application/yang-data+xml
  • Response

    HTTP/1.1 200 OK
    Content-Type:application/yang-data+xml
    Content-Length:1744
    
    <?xml version="1.0" encoding="UTF-8"?>
    <domains xmlns="http://www.huawei.com/netconf/vrp/huawei-aaa">
        <domain>
            <domainName>default</domainName>
            <authenSchemeName>default</authenSchemeName>
            <acctSchemeName>default</acctSchemeName>
            <domainState wd:default="true">active</domainState>
            <accessLimit>283648</accessLimit>
            <onlineNum>2</onlineNum>
            <serviceTerminal wd:default="true">true</serviceTerminal>
            <serviceTelnet wd:default="true">true</serviceTelnet>
            <serviceFtp wd:default="true">true</serviceFtp>
            <servicePpp wd:default="true">true</servicePpp>
            <serviceSsh wd:default="true">true</serviceSsh>
            <serviceQx wd:default="true">true</serviceQx>
            <serviceSnmp wd:default="true">true</serviceSnmp>
            <serviceMml wd:default="true">true</serviceMml>
            <serviceDot1x wd:default="true">true</serviceDot1x>
            <serviceHttp wd:default="true">true/serviceHttp>
            <timeRangeEnable wd:default="true">false</timeRangeEnable>
        </domain>
    </domains>
    
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100075344

Views: 31007

Downloads: 29

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