< Home

Create a BD

This section describes how to create a BD using the rpc method.

Table 1 Create a BD

Operation

XPATH

edit-config:merge

/huawei-bd/bridge-domains

Data requirement

Table 2 Create a BD

Item

Data

Description

BD ID

10

Create BD 10.

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>
      <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>

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="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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >