This section provides a sample of delivering BPDU protection configurations to the device using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-stp:stp/bpdu-protection |
Data Requirements
Item |
Data |
Description |
---|---|---|
BPDU protection |
true |
Enable BPDU protection. |
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:bpdu-protection>true</huawei-stp:bpdu-protection> </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="1"> <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="2"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-stp:stp/bpdu-protection</error-path> <error-message>parse rpc config error.(Invalid value "true1" in "bpdu-protection" element.).</error-message> </rpc-error> </rpc-reply>