xml-translate end

Function

The xml-translate end command translates configuration commands into XML packets in the NETCONF YANG model.

Format

xml-translate end

Parameters

None

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
netconf debug

Usage Guidelines

Usage Scenario

After the configuration commands to be translated are executed, to start the CLI-to-XML translation, run the xml-translate end command. The translation mode quits after the translation is complete.

Prerequisites

The CLI-to-XML translation mode has been accessed using the xml-translate begin command, and all the configuration commands to be translated have been executed.

Configuration Impact

After the xml-translate end command is run, the current running configuration database is unlocked, and the system view is returned.

Precautions

In the translation mode, if you run the xml-translate end command on a device without running the configuration commands first, the device displays an error message and exits the translation mode.

Only administrator users (at level 3 or 15) can run the xml-translate end command.

When the command to be converted corresponds to both the new and deprecated nodes, the YANG packet converted using the xml-translate end command contains the data of the two nodes. When the converted packet is sent, a message is displayed, indicating that the configuration already exists. You are advised to delete the data of a node based on the actual situation before the packet is sent.

In VS mode, this command is supported only by the admin VS.

If the YANG model corresponding to the converted command is an order-by-user list, the incremental synchronization result cannot be accurately returned in sequence. Therefore, the converted packet delivery cannot be consistent with the command execution result.

Example

# Translate configuration commands to XML packets in the NETCONF YANG model.
<HUAWEI> system-view
[~HUAWEI] xml-translate begin
Warning: The running database will be locked when you enter the CLI-to-XML translate mode. Are you sure you want to continue? [Y/N]:y
[*HUAWEI] acl 2001
[*HUAWEI-acl4-basic-2001] xml-translate end
.........
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="cli2xml-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <candidate></candidate>
    </target>
    <default-operation>none</default-operation>
    <error-option>rollback-on-error</error-option>
    <test-option>set</test-option>
    <config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <acl xmlns="http://www.huawei.com/netconf/vrp/huawei-acl">
        <aclGroups>
          <aclGroup nc:operation="create">
            <aclNumOrName>2001</aclNumOrName>
            <aclType>Basic</aclType>
          </aclGroup>
        </aclGroups>
      </acl>
    </config>   
  </edit-config>
</rpc>
[~HUAWEI]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic