< Home

Change VLAN description and name

This chapter mainly introduces the configuration description and name under xml based on VLAN.

Table 1 Change VLAN description and name

Operation

XPATH

RPC

/huawei-vlan:vlans/name

/huawei-vlan:vlans/description

Data requirement

Table 2 Change VLAN description and name

Item

Data

Description

VLAN name

1000

Change the VLAN name to 1000

VLAN description

2000

Change the VLAN description to 2000

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-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
        <huawei-vlan:vlan>
          <huawei-vlan:id>100</huawei-vlan:id>
          <huawei-vlan:name>1000</huawei-vlan:name>
          <huawei-vlan:description>2000</huawei-vlan:description>
        </huawei-vlan:vlan>
      </huawei-vlan:vlans>
    </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="0">
  <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-app-tag>1</error-app-tag>
    <error-message>Service process failed.</error-message>
    <error-info>Error on node /huawei-vlan:vlans/vlan[id="100"]/description</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >