The rollback capability indicates that the device can roll back to the corresponding configuration based on the specified file and commitId.
This capability is only available when the device supports the candidate configuration capability.
Roll back the current configuration to the configuration of the specified commitId.
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <cfg:rollback-by-commit-id xmlns:cfg="urn:huawei:yang:huawei-cfg"> <cfg:commit-id>1000033829</cfg:commit-id> </cfg:rollback-by-commit-id> </rpc>
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
The Rollback on Error capability is supported. More specifically, "rollback-on-error" can be carried in the <error-option> parameter of the <edit-config> operation. If an error occurs and the <rpc-error> element is generated, the server stops performing the <edit-config> operation and restores the specified configuration to the status before the <edit-config> operation is performed.
RPC request:
<?xml version="1.0" encoding="utf-8"?> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <ifm xmlns="urn:huawei:yang:huawei-ifm"> <interfaces> <interface> <name>GigabitEthernet1/0/0</name> <mtu>1000</mtu> </interface> </interfaces> </ifm> </config> </edit-config> </rpc>
RPC reply:
<?xml version="1.0" encoding="utf-8"?> <rpc-reply xmlns:nc-ext="urn:huawei:yang:huawei-ietf-netconf-ext" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101" nc-ext:flow-id="27"> <ok/> </rpc-reply>