No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Device Information

Device Information

Data Model

The data model file matching device information is huawei-device.yang.

Table 3-2168 Device information

Object

Description

huawei-device:device-state:performance

Indicates that the operation request (creating, deleting, and modifying) object is device information. It is only used to contain sub-objects, but does not have any data meaning.

huawei-device:device-state/performance/cpu-using-rate

Indicates the CPU usage of the control plane.

huawei-device:device-state/performance/cpu-forward-using-rate

Indicates the CPU usage of the forwarding plane.

huawei-device:device-state/performance/memory-using-rate

Indicates the memory usage.

huawei-device:device-state/performance/storages-using-rate

Indicates the storage media usage.

huawei-device:device-state/name

Indicates a device name.

huawei-device:device-state/model

Indicates a device model.

huawei-device:device-state/esn

Indicates the device ESN.

huawei-device:device-state/mac-address

Indicates the device MAC address.

huawei-device:device-state/vendor

Indicates the device vendor.

huawei-device:device-state/state

Indicates the device status.

huawei-device:device-state/version

Indicates the device version.

huawei-device:device-state/patch-version

Indicates the device patch version.

huawei-device:device-state/configuration-file/current-file-name

Indicates information about the startup configuration file of the device.

huawei-device:device-state/clock/current-datetime

Indicates the current device date and time.

huawei-device:device-state/clock/boot-datetime

Indicates the device startup date and time.

huawei-device:device-state/clock/up-times

Indicates the period during which the device has been in Up state.

huawei-device:device-state/resource/cpu

Indicates the number of CPUs on the device.

huawei-device:device-state/resource/memory

Indicates the device memory size.

huawei-device:device-state/resource/unreserved-memory

Indicates the memory size reserved for VMs.

huawei-device:device-state/user-define-info/token

Indicates the verification token delivered by the controller to the device, which is used to register with the controller and contained in the deployment email.

huawei-device:device/agile-controllers/agile-controller

Indicates the command used to register with the controller.

NOTE:

This object is supported in V300R003C10 and later versions.

huawei-device:device-state/upstream-interfaces/upstream-interface/name

Indicates the name of all uplink interfaces.

NOTE:

This object is supported in V300R003C10 and later versions.

huawei-device:device-state/upstream-interfaces/upstream-interface/correlate-interface

Indicates the logical interface associated with all uplink interfaces.

NOTE:

This object is supported in V300R003C10 and later versions.

huawei-device:device-state/upstream-interfaces/upstream-interface/status

Indicates the status of the interface through which the device registers with the controller. If the registration succeeds, the value is controller. If the registration fails, no data is displayed.

NOTE:

This object is supported in V300R003C10 and later versions.

Querying the CPU Usage

This section provides a sample of querying the CPU usage.

Table 3-2169 Querying the CPU usage

Operation

XPATH

get

huawei-device:device-state/performance/cpu-using-rate

huawei-device:device-state/performance/cpu-forward-using-rate

Table 3-2170 Querying the CPU usage

Item

Data

Description

CPU usage of the control plane

cpu-using-rate

Query the CPU usage of the control plane and the CPU usage of the forwarding plane.

CPU usage of the forwarding plane

cpu-forward-using-rate

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <get> 
  <filter> 
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <performance> 
     <cpu-using-rate/> 
     <cpu-forward-using-rate/> 
    </performance> 
   </device-state> 
  </filter> 
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <data> 
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
   <performance> 
    <cpu-using-rate>9</cpu-using-rate> 
    <cpu-forward-using-rate>0</cpu-forward-using-rate> 
   </performance> 
  </device-state> 
 </data> 
</rpc-reply>

Querying the Memory Usage

This section provides a sample of querying the memory usage.

Table 3-2171 Querying the memory usage

Operation

XPATH

get

huawei-device:device-state/performance/memory-using-rate

Table 3-2172 Querying the memory usage

Item

Data

Description

Memory usage

memory-using-rate

Query the memory usage.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <get> 
  <filter> 
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <performance> 
     <memory-using-rate/> 
    </performance> 
   </device-state> 
  </filter> 
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <data> 
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
   <performance> 
    <memory-using-rate>54</memory-using-rate> 
   </performance> 
  </device-state> 
 </data> 
</rpc-reply>

Querying the Storage Media Usage

This section provides a sample of querying the storage media usage.

Table 3-2173 Querying the storage media usage

Operation

XPATH

get

huawei-device:device-state/performance/storages-using-rate

Table 3-2174 Querying the storage media usage

Item

Data

Description

Storage media usage

storages-using-rate

Query the storage media usage.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <get> 
  <filter> 
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <performance> 
     <storages-using-rate/> 
    </performance> 
   </device-state> 
  </filter> 
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <data> 
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
   <performance> 
    <storages-using-rate> 
     <storage-using-rate> 
      <device>flash:</device> 
      <type>flash</type> 
      <total-size>366</total-size> 
      <used-size>225</used-size> 
     </storage-using-rate> 
    </storages-using-rate> 
   </performance> 
  </device-state> 
 </data> 
</rpc-reply>

Querying All Device Information

This section provides a sample of querying all device information.

Table 3-2175 Querying all device information

Operation

XPATH

get

huawei-device:device-state/name

huawei-device:device-state/model

huawei-device:device-state/esn

huawei-device:device-state/mac-address

huawei-device:device-state/vendor

huawei-device:device-state/state

huawei-device:device-state/version

huawei-device:device-state/patch-version

huawei-device:device-state/configuration-file/current-file-name

huawei-device:device-state/clock/current-datetime

huawei-device:device-state/clock/boot-datetime

huawei-device:device-state/clock/up-times

Table 3-2176 Querying all device information

Item

Data

Description

Device name

name

Display a device name.

Device model

model

Display a device model.

Device ESN

esn

Display the device ESN.

Device MAC address

mac-address

Display the device MAC address.

Device vendor

vendor

Display the device vendor.

Device status

state

Display the device status.

Device version

version

Display the device version.

Device patch version

patch-version

Display the device patch version.

Startup configuration file information

current-file-name

Display information about the startup configuration file of the device.

Current device date and time

current-datetime

Display the current device date and time.

Device startup date and time

boot-datetime

Display the device startup date and time.

Period during which the device has been in Up state

up-times

Display the period during which the device has been in Up state.

CPU usage

cpu-using-rate

Display the CPU usage.

Memory usage

memory-using-rate

Display the memory usage.

Storage usage

storages-using-rate

Display the storage usage.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <get> 
  <filter> 
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <name/> 
    <model/> 
    <esn/> 
    <mac-address/> 
    <vendor/> 
    <state/> 
    <version/> 
    <patch-version/> 
    <configuration-file> 
     <current-file-name/> 
    </configuration-file> 
    <performance> 
     <cpu-using-rate/> 
     <memory-using-rate/> 
     <storages-using-rate/> 
    </performance> 
    <clock> 
     <current-datetime/> 
     <boot-datetime/> 
     <up-times/> 
    </clock> 
   </device-state> 
  </filter> 
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <data> 
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
   <name>AR3670</name> 
   <model>AR3670</model> 
   <esn>2188032VRE2017102114524912700C28</esn> 
   <mac-address>00:E0:FC:03:02:00</mac-address> 
   <vendor>Huawei Technologies Co., Ltd</vendor> 
   <state>green</state> 
   <version>V200R009C10</version> 
   <patch-version>ARV200R009C10SPC030</patch-version> 
   <configuration-file> 
    <current-file-name>vrp.cfg<current-file-name/> 
   </configuration-file> 
   <performance> 
    <cpu-using-rate>80</cpu-using-rate> 
    <memory-using-rate>54</memory-using-rate> 
    <storage-using-rate> 
     <device>flash:</device> 
     <type>flash</type> 
     <total-size>366</total-size> 
     <used-size>225</used-size> 
    </storage-using-rate> 
   </performance> 
   <clock> 
    <current-datetime>2017-11-10 16:00:03</current-datetime> 
    <boot-datetime>2017-11-10 16:00:03</boot-datetime> 
    <up-times>5257</up-times> 
   </clock> 
  </device-state> 
 </data> 
</rpc-reply>

Querying Basic Device Information

This section provides a sample of querying basic device information.

Table 3-2177 Querying basic device information

Operation

XPATH

get

huawei-device:device-state/name

huawei-device:device-state/model

huawei-device:device-state/esn

huawei-device:device-state/mac-address

huawei-device:device-state/vendor

huawei-device:device-state/state

huawei-device:device-state/version

huawei-device:device-state/patch-version

huawei-device:device-state/clock/current-datetime

huawei-device:device-state/clock/boot-datetime

huawei-device:device-state/clock/up-times

Table 3-2178 Querying basic device information

Item

Data

Description

Device name

name

Display a device name.

Device model

model

Display a device model.

Device ESN

esn

Display the device ESN.

Device MAC address

mac-address

Display the device MAC address.

Device vendor

vendor

Display the device vendor.

Device status

state

Display the device status.

Device version

version

Display the device version.

Device patch version

patch-version

Display the device patch version.

Current device date and time

current-datetime

Display the current device date and time.

Device startup date and time

boot-datetime

Display the device startup date and time.

Period during which the device has been in Up state

up-times

Display the period during which the device has been in Up state.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <get> 
  <filter> 
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <name/> 
    <model/> 
    <esn/> 
    <mac-address/> 
    <vendor/> 
    <state/> 
    <version/> 
    <patch-version/> 
    <clock> 
     <current-datetime/> 
     <boot-datetime/> 
     <up-times/> 
    </clock> 
   </device-state> 
  </filter> 
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <data> 
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
   <name>AR3670</name> 
   <model>AR3670</model> 
   <esn>2188032VRE2017102114524912700C28</esn> 
   <mac-address>00:E0:FC:03:02:00</mac-address> 
   <vendor>Huawei Technologies Co., Ltd</vendor> 
   <state>green</state> 
   <version>V200R009C10</version> 
   <patch-version>ARV200R009C10SPC030</patch-version> 
   <clock> 
    <current-datetime>2017-11-10 16:00:03<current-datetime/> 
    <boot-datetime>2017-11-10 16:00:03<boot-datetime/> 
    <up-times>5257</up-times> 
   </clock> 
  </device-state> 
 </data> 
</rpc-reply>

Querying the Number of CPUs on the Device

This section provides a sample of querying the number of CPUs on the device.

Table 3-2179 Querying the number of CPUs on the device

Operation

XPATH

get

huawei-device:device-state/resource/cpu

Data Requirements
Table 3-2180 Querying the number of CPUs on the device

Item

Data

Description

CPU

cpu

Querying the number of CPUs on the device

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
  <filter>
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <resource>
     <cpu/>
    </resource>
   </device-state>
  </filter>
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013">
 <data>
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
   <resource>
    <cpu>
     <total>5</total>
     <free>2</free>
    </cpu>
   </resource>
  </device-state>
 </data>
</rpc-reply> 
Table 3-2181 Response example output description

Item

Description

total

Total number of CPUs.

free

Number of idle CPUs.

Querying the Device Memory Size

This section provides a sample of querying the device memory size.

Table 3-2182 Querying the device memory size

Operation

XPATH

get

huawei-device:device-state/resource/memory

Data Requirements
Table 3-2183 Querying the device memory size

Item

Data

Description

Memory information

memory

Query the device memory size.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
  <filter>
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <resource>
     <memory/>
    </resource>
   </device-state>
  </filter>
 </get>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013">
 <data>
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
   <resource>
    <memory>
     <total>15880</total>
     <free>13740</free>
    </memory>
   </resource>
  </device-state>
 </data>
</rpc-reply>
Table 3-2184 Response example output description

Item

Description

total

Total device memory. The value is an integer, in MB.

free

Idle device memory. The value is an integer, in MB.

Querying the Device Storage Space

This section provides a sample of querying the device storage space.

Table 3-2185 Querying the device storage space

Operation

XPATH

get

huawei-device:device-state/performance/storages-using-rate

Data Requirements
Table 3-2186 Querying the device storage space

Item

Data

Description

Storage information

storages-using-rate

Query the device storage space.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
  <filter>
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <performance>
     <storages-using-rate/>
    </performance>
   </device-state>
  </filter>
 </get>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013">
 <data>
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
   <performance>
    <storages-using-rate>
     <storage-using-rate>
      <device>flash:</device>
      <type>flash</type>
      <total-size>6936</total-size>
      <used-size>677</used-size>
     </storage-using-rate>
     <storage-using-rate>
      <device>vhdd0:</device>
      <type>hotplugable_harddisk</type>
      <total-size>51618</total-size>
      <used-size>2950</used-size>
     </storage-using-rate>
    </storages-using-rate>
   </performance>
  </device-state>
 </data>
</rpc-reply> 
Table 3-2187 Response example output description

Item

Description

device

Device disk path.

type

Device disk type.

total-size

Device disk size. The value is an integer, in MB.

used-size

Used disk size. The value is an integer, in MB.

Querying the Memory Size Reserved for VMs

This section provides a sample of querying the device memory size reserved for VMs.

NOTE:

Only the AR3670, AR1610-X6, AR169-P-M9, AR169W-P-M9, and AR169RW-P-M9 support virtualization.

Table 3-2188 Querying the device memory size reserved for VMs

Operation

XPATH

get

huawei-device:device-state/resource/unreserved-memory

Data Requirements
Table 3-2189 Querying the device memory size reserved for VMs

Item

Data

Description

Memory size reserved for VMs

memory

Query the memory size reserved for VMs.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <get> 
  <filter> 
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <resource> 
     <unreserved-memory/> 
    </resource> 
   </device-state> 
  </filter> 
 </get> 
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013"> 
 <data> 
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
   <resource> 
    <unreserved-memory> 
     <total>20232</total> 
     <free>19090</free> 
    </unreserved-memory> 
   </resource> 
  </device-state> 
 </data> 
</rpc-reply>
Table 3-2190 Response example output description

Item

Description

total

Total memory reserved for VMs. The value is an integer, in MB.

free

Idle memory reserved for VMs. The value is an integer, in MB.

Querying the Verification Token Code Delivered by the Controller to the Device

This section provides a sample of querying the verification token code delivered by the controller to the device.

Table 3-2191 Querying the verification token code delivered by the controller to the device

Operation

XPATH

get

huawei-device:device-state/user-define-info/token

Data Requirements
Table 3-2192 Querying the verification token code delivered by the controller to the device

Item

Data

Description

Verification token code delivered by the controller to the device

token

Query the verification token code delivered by the controller to the device.

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
  <filter>
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <user-define-info>
     <token/>
    </user-define-info>
   </device-state>
  </filter>
 </get>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013">
 <data>
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
   <user-define-info>
    <token>12345678901234567890ffff12345678901234567890ffff</token>
   </user-define-info>
  </device-state>
 </data>
</rpc-reply>
Table 3-2193 Response example output description

Item

Description

12345678901234567890ffff12345678901234567890ffff

Verification token code delivered by the controller to the device.

Querying the Information about All Uplink Interfaces on the Device

This section provides a sample of querying the information about all uplink interfaces on the device.

NOTE:

This function is supported in V300R003C10 and later versions.

Table 3-2194 Querying the information about all uplink interfaces on the device

Operation

XPATH

get

huawei-device:device-state/upstream-interfaces/upstream-interface

Data Requirements

None

Request Example
<rpc message-id="1013" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <get>
  <filter>
   <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <upstream-interfaces/>
   </device-state>
  </filter>
 </get>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1013">
 <data>
  <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
   <upstream-interfaces>
    <upstream-interface>
     <name>GigabitEthernet0/0/0</name>
     <status>controller</status>
    </upstream-interface>
    <upstream-interface>
     <name>GigabitEthernet0/0/4</name>
     <correlate-interface>Dialer1</correlate-interface>
    </upstream-interface>
   </upstream-interfaces>
  </device-state>
 </data>
</rpc-reply>
Table 3-2195 Description of output information in the response example

Item

Description

name

Name of all uplink interfaces.

status

Status of all uplink interfaces on the device. If the value is controller, the device successfully registers with the controller.

correlate-interface

Logical interface associated with all uplink interfaces on the device.

Executing the command to register with a controller

NOTE:

V300R003C10 and later versions support the node.

This section provides a sample of executing the command to register with a controller.

Table 3-2196 Executing the command to register with a controller

Operation

XPATH

edit-config:merge

huawei-device:device/agile-controllers/agile-controller

Data Requirements
Table 3-2197 Executing the command to register with a controller

Item

Data

Description

IP address

2.2.2.2

Executes the command to register with a controller.

Port number

10020

Name of the VPN instance

123

NOTE:

If the value is default-routing-instance, the command does not contain the VPN instance name.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b">
 <edit-config>
  <target>
   <running/>
  </target>
 <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <device xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <agile-controllers> 
     <agile-controller>
      <address>2.2.2.2</address>
      <port>10020</port>
      <vpn-instance>123</vpn-instance>
     </agile-controller>
    </agile-controllers>
   </device>
  </config> 
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
  <ok/> 
</rpc-reply> 
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8311

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next