<get>
The <get> operation retrieves configuration and state data from the <running/> configuration database.
If the <get> operation is successful, the server sends an <rpc-reply> element containing a <data> element with the results of the query. Otherwise, the server returns an <rpc-reply> element containing an <rpc-error> element.
- The <get-config> operation can retrieve data from the <running/>, <candidate/>, and <startup/> configuration databases, whereas the <get> operation can only retrieve data from the <running/> configuration database.
- The <get-config> operation can only retrieve configuration data, whereas the <get> operation can retrieve both configuration and state data.
Query interface configuration of the IFM feature in the <running/> configuration database and return the interface information in an RPC reply message:
RPC request:
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="831"> <get> <filter type="subtree"> <ifm:ifm xmlns:ifm="urn:huawei:yang:huawei-ifm"> <ifm:interfaces> <ifm:interface/> </ifm:interfaces> </ifm:ifm> </filter> </get> </rpc>
RPC reply:
<?xml version="1.0" encoding="utf-8"?> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ifm xmlns="urn:huawei:yang:huawei-ifm"> <interfaces> <interface> <name>GigabitEthernet1/0/0</name> <index>4</index> <class>main-interface</class> <type>MEth</type> <position>0/0/0</position> <number>0/0/0</number> <admin-status>up</admin-status> <link-protocol>ethernet</link-protocol> <statistic-enable>true</statistic-enable> <mtu>1500</mtu> <spread-mtu-flag>false</spread-mtu-flag> <vrf-name>_public_</vrf-name> <dynamic> <oper-status>up</oper-status> <physical-status>up</physical-status> <link-status>up</link-status> <mtu>1500</mtu> <bandwidth>100000000</bandwidth> <ipv4-status>up</ipv4-status> <ipv6-status>down</ipv6-status> <is-control-flap-damp>false</is-control-flap-damp> <mac-address>3868-f711-1110</mac-address> <line-protocol-up-time>2019-05-25T02:33:46Z</line-protocol-up-time> <is-offline>false</is-offline> <link-quality-grade>good</link-quality-grade> </dynamic> <mib-statistics> <receive-byte>0</receive-byte> <send-byte>0</send-byte> <receive-packet>363175</receive-packet> <send-packet>61660</send-packet> <receive-unicast-packet>66334</receive-unicast-packet> <receive-multicast-packet>169727</receive-multicast-packet> <receive-broad-packet>127122</receive-broad-packet> <send-unicast-packet>61363</send-unicast-packet> <send-multicast-packet>0</send-multicast-packet> <send-broad-packet>299</send-broad-packet> <receive-error-packet>0</receive-error-packet> <receive-drop-packet>0</receive-drop-packet> <send-error-packet>0</send-error-packet> <send-drop-packet>0</send-drop-packet> </mib-statistics> <common-statistics> <stati-interval>300</stati-interval> <in-byte-rate>40</in-byte-rate> <in-bit-rate>320</in-bit-rate> <in-packet-rate>2</in-packet-rate> <in-use-rate>0.01%</in-use-rate> <out-byte-rate>0</out-byte-rate> <out-bit-rate>0</out-bit-rate> <out-packet-rate>0</out-packet-rate> <out-use-rate>0.00%</out-use-rate> <receive-byte>0</receive-byte> <send-byte>0</send-byte> <receive-packet>363183</receive-packet> <send-packet>61662</send-packet> <receive-unicast-packet>66334</receive-unicast-packet> <receive-multicast-packet>169727</receive-multicast-packet> <receive-broad-packet>127122</receive-broad-packet> <send-unicast-packet>61363</send-unicast-packet> <send-multicast-packet>0</send-multicast-packet> <send-broad-packet>299</send-broad-packet> <receive-error-packet>0</receive-error-packet> <receive-drop-packet>0</receive-drop-packet> <send-error-packet>0</send-error-packet> <send-drop-packet>0</send-drop-packet> <send-unicast-bit>0</send-unicast-bit> <receive-unicast-bit>0</receive-unicast-bit> <send-multicast-bit>0</send-multicast-bit> <receive-multicast-bit>0</receive-multicast-bit> <send-broad-bit>0</send-broad-bit> <receive-broad-bit>0</receive-broad-bit> <send-unicast-bit-rate>0</send-unicast-bit-rate> <receive-unicast-bit-rate>0</receive-unicast-bit-rate> <send-multicast-bit-rate>0</send-multicast-bit-rate> <receive-multicast-bit-rate>0</receive-multicast-bit-rate> <send-broad-bit-rate>0</send-broad-bit-rate> <receive-broad-bit-rate>0</receive-broad-bit-rate> <send-unicast-packet-rate>0</send-unicast-packet-rate> <receive-unicast-packet-rate>0</receive-unicast-packet-rate> <send-multicast-packet-rate>0</send-multicast-packet-rate> <receive-multicast-packet-rate>0</receive-multicast-packet-rate> <send-broadcast-packet-rate>0</send-broadcast-packet-rate> <receive-broadcast-packet-rate>0</receive-broadcast-packet-rate> </common-statistics> </interface> </ifm> </data>