< Home

Setting a Device Name

This section provides a sample of setting a device name using the edit-config method.

Table 1 Setting a device name

Operation

XPATH

edit-config

huawei-device:device/

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<dev:device xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device">
<dev:name>HUAWEI</dev:name>
</dev:device>
</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>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic