< Home

Querying the Role of a Stack Member Switch

This section describes how to query the role of a stack member switch using the get method.

Table 1 Querying the role of a member switch

Operation

XPATH

get

/huawei-board/boards-state/board/hw-stack:role

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">
   <board:boards-state xmlns:board="urn:huawei:params:xml:ns:yang:huawei-board">
    <board:board>
     <board:name/>
     <hw-stack:role xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack"/>
    </board:board>
   </board:boards-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>
  <boards-state xmlns="urn:huawei:params:xml:ns:yang:huawei-board">
   <board>
    <name>1</name>
    <role xmlns="urn:huawei:params:xml:ns:yang:huawei-stack">standby</role>
   </board>
   <board>
    <name>3</name>
    <role xmlns="urn:huawei:params:xml:ns:yang:huawei-stack">master</role>
   </board>
  </boards-state>
 </data>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >