This section provides a sample of querying information about CDP neighbors using the get method.
| Operation | XPATH |
|---|---|
| get | /ietf-interfaces:interfaces-state/interface/huawei-lldp:cdp |
<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<if:interfaces-state xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<if:interface>
<if:name/>
<huawei-lldp:cdp xmlns:huawei-lldp="urn:huawei:params:xml:ns:yang:huawei-lldp"/>
</if:interface>
</if:interfaces-state>
</filter>
</get>
</rpc>
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6">
<data>
<interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>GigabitEthernet0/0/1</name>
<cdp xmlns="urn:huawei:params:xml:ns:yang:huawei-lldp">
<remote-port>
<index>1</index>
<device-id>hw20180927</device-id>
<port-id>GigabitEthernet0/0/10</port-id>
<system-platform>huawei</system-platform>
<system-mac-address>00:22:11:2d:e3:00</system-mac-address>
<system-capabilities>router switch igmp</system-capabilities>
</remote-port>
</cdp>
</interface>
</interfaces-state>
</data>
</rpc-reply>