This section describes how to create a BD using the rpc method.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-bd/bridge-domains |
Item |
Data |
Description |
---|---|---|
BD ID |
10 |
Create BD 10. |
<?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> <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd"> <bd:bridge-domain> <bd:id>10</bd:id> </bd:bridge-domain> </bd:bridge-domains> </config> </edit-config> </rpc>
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="0"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>Execute failed reason: Wrong parameter found at '^' position.</error-message> <error-info>Error on node /huawei-bd:bridge-domains/bridge-domain[id="10"]/id</error-info> </rpc-error> </rpc-reply>