This section provides a sample of restoring the factory configuration using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-device:restore-factory-config/enable |
Data requirement
Item |
Data |
Description |
---|---|---|
Restoring the factory configuration |
true |
Delivering the factory configuration restoration operation in one-click mode. |
Request Example
<?xml version="1.0" encoding="UTF-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3537681e-dbfa-11e7-a47a-cc2cb373c439"> <dev:restore-factory-config xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"> <dev:enable>true</dev:enable> </dev:restore-factory-config> </rpc>
Response Example
Sample of successful response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3537681e-dbfa-11e7-a47a-cc2cb373c439"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3537681e-dbfa-11e7-a47a-cc2cb373c439"> <rpc-error> <error-type>application</error-type> <error-tag>unknown-element</error-tag> <error-severity>error</error-severity> <error-path>/huawei-device:restore-factory-config/enable</error-path> <error-message>An unexpected element is present.(Invalid value "fasle" in "enable" element.).</error-message> </rpc-error> </rpc-reply>