This section provides a sample of delivering configurations in the MSTP process view to the device using the rpc method.
Operation |
XPATH |
---|---|
rpc |
/huawei-stp:stp/stp-mstp/process-list |
Data Requirements
Item |
Data |
Description |
---|---|---|
MSTP process ID |
1 |
Set the MSTP process ID to 1. |
Whether to enable BPDU protection for the MSTP process |
true |
Enable BPDU protection for the MSTP process. |
Instance ID of the MSTP process |
1 |
Set the instance ID of the MSTP process to 1. |
Priority of a specified instance in the MSTP process |
0 |
Set the priority of instance 1 in MSTP process 1 to 0. |
Whether to enable STP for the MSTP process |
true |
Enable STP for the MSTP process. |
STP mode in the MSTP process |
stp |
Set the STP mode in the MSTP process to stp. |
Whether to enable TC notification for the MSTP process |
true |
Enable TC notification for the MSTP process. |
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:stp-mstp> <huawei-stp:process-list> <huawei-stp:process-id>1</huawei-stp:process-id> <huawei-stp:bpdu-protection>true</huawei-stp:bpdu-protection> <huawei-stp:stp-priority> <huawei-stp:instance-id>1</huawei-stp:instance-id> <huawei-stp:priority>0</huawei-stp:priority> </huawei-stp:stp-priority> <huawei-stp:enabled>true</huawei-stp:enabled> <huawei-stp:mode>stp</huawei-stp:mode> <huawei-stp:tc-notify> <huawei-stp:tc-notify-process>true</huawei-stp:tc-notify-process> </huawei-stp:tc-notify> </huawei-stp:process-list> </huawei-stp:stp-mstp> </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="5"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-path>/huawei-stp:stp/stp-mstp/process-list</error-path> <error-message>parse rpc config error.(Unknown element "process-id".).</error-message> </rpc-error> </rpc-reply>