< Home

Querying the Name of an Eth-Trunk into Which an Interface Is Added

This section provides a sample of obtaining the name of an Eth-Trunk into which an interface is added using the get method.

Table 1 Querying the name of an Eth-Trunk into which an interface is added

Operation

XPATH

get

/ietf-interfaces:interfaces-state/interface/hw-eth-trunk:eth-trunk/trunk-name

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" 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>XGigabitEthernet0/0/1</if:name>
         <hw-eth-trunk:eth-trunk xmlns:hw-eth-trunk="urn:huawei:params:xml:ns:yang:huawei-eth-trunk">
          <hw-eth-trunk:trunk-name/>
         </hw-eth-trunk:eth-trunk>
       </if:interface>
      </if:interfaces-state>
     </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="1">
  <data>
     <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
       <name>XGigabitEthernet0/0/1</name>
       <eth-trunk xmlns="urn:huawei:params:xml:ns:yang:huawei-eth-trunk">
         <trunk-name>Eth-Trunk10</trunk-name>
       </eth-trunk>
      </interface>
     </interfaces-state>
   </data>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >