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

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
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).
NETCONF Response

NETCONF Response

After processing the <rpc> requests (successful or failed) from the client, the NETCONF server encapsulates the responses into <rpc-reply> and sends them to the client.

get/get-config Request

The get request is used to obtain the server configuration and status information, and the get-config request is used to obtain the server configuration. The server encapsulates obtained contents through the <data> element in <rpc-reply>. When the client requests the security policy configuration, an example of the response from the server is as follows:

<?xml version="1.0" encoding="UTF-8"?> 
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1011">  
  <data> 
<sec-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-security-policy">  
      <vsys>  
        <name>public</name>  
        <default-policy>  
          <action>true</action>  
        </default-policy> 
        <static-policy>  
          <rule>  
            <name>test1</name>  
          </rule>  
        </static-policy>  
      </vsys>  
    </sec-policy>  
  </data>  
</rpc-reply>  
]]>]]>

edit-config Request

The edit-config request is used for operations such as addition, update, and deletion on the server. After processing the edit-config request, the server returns <ok> or <reply-error> information.

  • <ok>
    <?xml version="1.0" encoding="UTF-8"?>  
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1001">  
      <ok/>  
    </rpc-reply>  
    ]]>]]>
  • <reply-error>
    <?xml version="1.0" encoding="UTF-8"?>  
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1001">  
      <rpc-error>  
        <error-type>application</error-type>  
        <error-tag>operation-failed</error-tag>  
        <error-severity>error</error-severity>  
        <error-message>Failed to apply configuration changes to device.</error-message>  
      </rpc-error>  
      <default:rpc-error xmlns:default="urn:ietf:params:xml:ns:netconf:base:1.0">  
        <error-type>application</error-type>  
        <error-tag>data-missing</error-tag>  
        <error-severity>error</error-severity>  
        <error-path>/hw-secply:sec-policy/hw-secply:vsys[hw-secply:name=public]/hw-secply:static-policy/hw-secply:rule[hw-secply:name=test12]/hw-secply:source-zone</error-path>  
        <error-message>Request could not be completed because the relevant data model content(e.g., vsys) does not exist.</error-message>  
      </default:rpc-error>  
    </rpc-reply>  
    ]]>]]>

    The <rpc-reply> element encapsulates different types of error information. After receiving <reply-error>, the client needs to parse elements including <error-tag>, <error-path>, and <error-message>. The format of <reply-error> of different error types is the same, and only the element value is different.

    • <error-type>: identifies the layer at which an error occurs.
    • <error-tag>: identifies an error condition.
    • <error-severity>: identifies an error severity.
    • <error-path>: identifies the element path to the node that is associated with the error being reported. For /hw-secply:sec-policy/hw-secply:vsys[hw-secply:name=public]/hw-secply:static-policy/hw-secply:rule[hw-secply:name=test12]/hw-secply:source-zone, an error occurs on the source-zone node of huawei-security-policy. hw-secply is the prefix of huawei-security-policy. The node where an error occurs can be located based on Xpath parsing. The key value of the list node is described in []. This element is optional.
    • <error-message>: indicates the error description, which is optional.

      V500R001C10SPC100 NETCONF API is based on NETCONF Error List defined in RFC 6241, and is not described here.

  • <error-tag>

    <error-tag> describes an error condition. For details, see RFC 6241.

Table 2-3 <error-tag>

Value

Description

in-use

The object is in use. The ACL that is being referenced by IPSec cannot be deleted.

invalid-value

The element value is invalid.

too-big

The number of request or response messages exceeds the maximum value allowed by the server.

missing-attribute

There is no mandatory attribute of an element.

bad-attribute

The element attribute value is invalid.

unknown-attribute

The element attribute is not defined.

missing-element

There is no mandatory element.

bad-element

The element value is invalid.

unknown-element

The element node is not defined.

unknown-namespace

The naming space is not defined.

access-denied

The access is rejected. Users have no access permission or authentication fails.

lock-denied

Access resources have been locked.

resource-denied

Requesting resources fails. For example, specifications of the server are exceeded, and security policies exceeding specifications are created.

rollback-failed

Operation rollback on the server fails.

data-exists

Data already exists. For example, an existing object is created.

data-missing

Data does not exist. For example, a nonexistent object is deleted.

operation-not-supported

The operation is not supported.

operation-failed

The operation fails.

malformed-message

The XML format is invalid.

Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8189

Downloads: 69

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