This section provides a sample of delivering stp-priority configurations to the device using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-stp:stp/stp-priority |
Data Requirements
Item |
Data |
Description |
---|---|---|
STP instance ID |
1 |
Set the STP instance ID to 1. |
STP priority |
4096 |
Set the STP priority of the device to 4096. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="2" 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:stp-priority> <huawei-stp:instance-id>1</huawei-stp:instance-id> <huawei-stp:priority>4096</huawei-stp:priority> </huawei-stp:stp-priority> </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="2"> <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-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-stp:stp/stp-priority</error-path> <error-message>parse rpc config error.(Unknown element "instance-id".).</error-message> </rpc-error> </rpc-reply>