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).
<edit-config>

<edit-config>

The <edit-config> operation loads all or some configurations to a specified target configuration database (<running/> or <candidate/>). The device authenticates the operation in <edit-config>. After the authentication succeeds, the device performs corresponding modification.

The <edit-config> operation supports multiple configuration loading modes. For example, local files and remote files can be loaded, and files can be edited online. If a NETCONF server supports the URL capability, the <url> parameter that identifies the local configuration file can be used to replace the <config> parameter.

Parameters in an RPC packet of the <edit-config> operation are described as follows:
  • <config>: A group of hierarchical configuration items defined in the data model.

    <config> may contain the optional attribute <operation>, which is used to specify an operation type for a configuration item. If the <operation> attribute is not carried, the <merge> operation is performed by default. The <operation> attribute values are as follows:
    • merge: In the database, modify the existing data or create data that does not exist. This is the default operation.
    • create: Add configuration data to the configuration database only when the configuration data to be created does not exist in the configuration database. If the configuration data exists, <rpc-error> is returned, in which the <error-tag> value is data-exists.
    • delete: Delete a specified configuration data record from the configuration database. If the data record exists, the data is deleted. If the data does not exist, <rpc-error> is returned, in which the <error-tag> value is data-missing.
    • remove: Delete a specified configuration data record from the configuration database. If the data exists, the data is deleted. If the data does not exist, a success message is returned.
    • replace: In the database, replace the existing data or create data that does not exist.
  • <target>: Configuration database to be edited. The configuration database can be set based on the scenario.

    • In immediate validation mode, set the database to <running/>.

    • In two-phase validation mode, set the database to <candidate/>. After editing the database, perform the <commit> operation to submit the configuration for the modification to take effect.

    • In the trial mode, set the database to <candidate/>.

  • <default-operation>: Set a default operation for the <edit-config> operation.

    The <default-operation> parameter is optional. Its default value is merge. The values are as follows:

    • merge: Merge the configuration data in the <config> parameter with the configuration data in the target configuration database. This is the default operation.

    • replace: Completely replace the configuration data in the target configuration database with the configuration data in the <config> parameter.

    • none: Except that the operation specified by the <operation> attribute is performed, the configuration data in the target configuration database is not affected by other configuration data in <config>. If the <config> parameter contains the configuration data that does not exist at the corresponding data level in the target configuration database, <rpc-error> is returned, in which the <error-tag> value is data-missing. In this way, redundant elements are not created when a specified operation is performed. For example, when a specified child element is deleted, <config> contains the parent hierarchical structure of the child element but the target database does not contain the configuration of the parent element. If the <default-operation> value is not none, the configuration of the parent element is created in the database when the child element is deleted. If the <default-operation> value is none, the child element is deleted and the configuration of the parent element is not created.

  • <error-option>: Set a processing mode for subsequent instances after a configuration error of an instance occurs. The default value is stop-on-error. The values are as follows:

    • stop-on-error: Stop the operation when an error occurs.
    • continue-on-error: Record the error information and continue the execution when an error occurs. The NETCONF server returns an <rpc-reply> message indicating an operation failure to the client after an error occurs.
    • rollback-on-error: Stop the operation when an error occurs and roll back the configuration to the state before the <edit-config> operation is performed. This operation is supported only when the device supports the <rollback-on-error> capability.
Change the ifDescr value of the interface named 10GE1/0/1 in the configuration database to huawei.
  • RPC request
    <rpc message-id="60" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <edit-config>
        <target>
          <running/>  
        </target>
        <default-operation>merge</default-operation>
        <error-option>rollback-on-error</error-option>
        <config>
          <ifm xmlns="http://www.huawei.com/netconf/vrp/huawei-ifm">
            <interfaces>
              <interface>
                <ifName>10GE1/0/1</ifName>
                <ifDescr>huawei</ifDescr>   
              </interface>
            </interfaces>
          </ifm>
        </config>
      </edit-config>
    </rpc>
  • RPC reply
    <rpc-reply message-id="60" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" flow-id="104">
      <ok />
    </rpc-reply>
Delete the configuration on the interface named 10GE1/0/1 from the running configuration database.
  • RPC request
    <rpc message-id="60" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <edit-config>
        <target>
          <running/>  
        </target>
        <default-operation>none</default-operation>
        <config>
          <ifm xmlns="http://www.huawei.com/netconf/vrp/huawei-ifm">
            <interfaces>
              <interface operation="delete">
                <ifName>10GE1/0/1</ifName>
              </interface>
            </interfaces>
          </ifm>
        </config>
      </edit-config>
    </rpc>
  • RPC reply
    <rpc-reply message-id="60" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" flow-id="104">
      <ok />
    </rpc-reply>
If the <validate> capability is supported, the <edit-config> operation can carry the <test-option> parameter. If the <test-option> parameter is not specified, the system processes the <edit-config> operation based on the test-then-set process by default.
  • If the <test-option> parameter value is test-then-set or the parameter is not specified, nodes at any layer support the <replace> operation that replaces the configuration in the target database with that in the current RPC request.

    RPC request

    <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
      <edit-config>
        <target>
          <running/>
        </target>
        <test-option>test-then-set</test-option>
        <config>
          <ifm xmlns="http://www.huawei.com/netconf/vrp/huawei-ifm">
            <interfaces>
              <interface xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="replace">
                <ifName>10GE1/0/1</ifName>
                <ifDescr>text</ifDescr>
              </interface>
            </interfaces>
          </ifm>
        </config>
      </edit-config>
    </rpc>
    

    RPC reply

    <rpc-reply message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
    </rpc-reply>
    
  • If the <test-option> parameter value is test-then-set or the parameter is not specified, nodes at any layer support the <delete> and <remove> operations that delete all configuration data of a specified node in the configuration database.

    Example of deleting the vplsInstances configuration.

    RPC request

    <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
      <edit-config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
        <target>
          <running/>
        </target>
        <config>
          <l2vpn xmlns="http://www.huawei.com/netconf/vrp/huawei-l2vpn">
            <l2vpnvpls>
              <vplsInstances nc:operation="delete">
              </vplsInstances>
            </l2vpnvpls>
          </l2vpn>
        </config>
      </edit-config>
    </rpc>

    RPC reply

    <rpc-reply message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <ok/>
    </rpc-reply>
    
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100075344

Views: 20850

Downloads: 22

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