This section provides a sample of obtaining device status using the get method.
Operation |
XPATH |
---|---|
get |
/device-state |
Request example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <get> <filter type="subtree"> <dev:device-state xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device"/> </filter> </get> </rpc>
Response example
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0"> <data> <device-state xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> <clock> <boot-datetime>2016-11-03T02:32:58+00:00</boot-datetime> <current-datetime>2016-11-03T02:45:07+00:00</current-datetime> <up-times>698</up-times> </clock> <vendor>huawei</vendor> <esn>2102350DLR04xxxxxxxx</esn> <mac-address>00:10:00:20:00:04</mac-address> <model>S5720S-52X-SI-AC</model> <name>huawei</name> <patch-version/> <performance> <cpu-using-rate>9</cpu-using-rate> <memory-using-rate>10</memory-using-rate> <upstream-interfaces> <interface>GigabitEthernet0/0/16</interface> <management-vlan-id>1</management-vlan-id> <management-vlan-ip>192.168.50.112</management-vlan-ip> </upstream-interfaces> <user-define-info> <local-manage-ip>192.168.10.8/24</local-manage-ip> <stack-status>single</stack-status> <system-mac-address>00:0b:09:ef:5f:03</system-mac-address> </user-define-info> <version>V200R013C00SPC200</version> </device-state> </data> </rpc-reply>