This section provides a sample of delivering auto-recovery configurations to the device using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-stp:stp/auto-recovery |
Data Requirements
Item |
Data |
Description |
---|---|---|
Auto-recovery cause for an interface in error-down state |
bpdu-protection |
Set the auto-recovery cause for an interface in error-down state to bpdu-protection. |
Auto-recovery interval |
30 |
Set the auto-recovery interval to 30s. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <huawei-stp:stp xmlns:huawei-stp="urn:huawei:params:xml:ns:yang:huawei-stp"> <huawei-stp:auto-recovery> <huawei-stp:cause>bpdu-protection</huawei-stp:cause> <huawei-stp:interval>30</huawei-stp:interval> </huawei-stp:auto-recovery> </huawei-stp:stp> </config> </edit-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="3"> <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="4"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Wrong parameter.</error-message> <error-info>Error on node /huawei-stp:stp/auto-recovery</error-info> </rpc-error> </rpc-reply>