This section provides a sample of delivering MST region configurations to the device using the rpc method.
Operation |
XPATH |
|---|---|
rpc |
/huawei-stp:stp/region-configuration |
Data Requirements
Item |
Data |
Description |
|---|---|---|
Name of an MST region |
11 |
Set the name of an MST region to 11. |
Revision level of the MST region |
1 |
Set the revision level of the MST region to 1. |
Instance ID of the MST region |
1 |
Set the instance ID of the MST region to 1. |
Mapping VLAN of the MST region |
100 |
Set the mapping VLAN of the MST region to VLAN 100. |
Request Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" 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:region-configuration>
<huawei-stp:region-name>11</huawei-stp:region-name>
<huawei-stp:revision-level>1</huawei-stp:revision-level>
<huawei-stp:instance>
<huawei-stp:instance-id>1</huawei-stp:instance-id>
<huawei-stp:map-vlan>100</huawei-stp:map-vlan>
</huawei-stp:instance>
</huawei-stp:region-configuration>
</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-> <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->
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-path>/huawei-stp:stp</error-path>
<error-message>parse rpc config error.(Unknown element "region-configuration".).</error-message>
</rpc-error>
</rpc-reply>