< Home

Configuring a Stack Priority for a Stack Member Switch

This section describes how to configure a stack priority for a stack member switch using the config method.

Table 1 Configuring a stack priority for a member switch

Operation

XPATH

edit-config:config

/huawei-board:boards/board/hw-stack:priority

Data requirement 1

Table 2 Configuring a stack priority for a member switch

Item

Data

Description

Stack priority of a member switch

102

Changes the stack priority of a member switch from the default value 100 to 102.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="24" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <board:boards xmlns:board="urn:huawei:params:xml:ns:yang:huawei-board">
        <board:board>
          <board:name>0</board:name>
          <hw-stack:priority xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack">102</hw-stack:priority>
        </board:board>
      </board:boards>
    </config>
  </edit-config>
</rpc>

Response example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="8">
  <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Data requirement 2

Table 3 Changing the stack priority of a member switch

Item

Data

Description

Stack priority of a member switch

112

Changes the stack priority of a member switch from 102 to 112.

Replacement example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="26" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <board:boards xmlns:board="urn:huawei:params:xml:ns:yang:huawei-board">
        <board:board>
          <board:name>0</board:name>
          <hw-stack:priority xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">112</hw-stack:priority>
        </board:board>
      </board:boards>
    </config>
  </edit-config>
</rpc>

Response example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="8">
  <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Data requirement 3

Table 4 Deleting the stack priority of a member switch

Item

Data

Description

Stack priority of a member switch

115

Restores the stack priority of a member switch from 115 to the default value 100.

Deletion example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <board:boards xmlns:board="urn:huawei:params:xml:ns:yang:huawei-board">
        <board:board>
          <board:name>0</board:name>
          <hw-stack:priority xmlns:hw-stack="urn:huawei:params:xml:ns:yang:huawei-stack" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">115</hw-stack:priority>
        </board:board>
      </board:boards>
    </config>
  </edit-config>
</rpc>

Response example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="8">
  <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >