< Home

Querying Storm Control Configuration

This section describes how to query storm control configuration using the get method.

Table 1 Querying storm control configuration

Operation

XPATH

get

/huawei-storm-control:storm-controls/storm-control-state

Request Example

Query storm control configuration on GE0/0/1.

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" 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>GigabitEthernet0/0/1</if:name>
          <storm-control:storm-controls xmlns:storm-control="urn:huawei:yang:huawei-storm-control"/>
        </if:interface>
      </if:interfaces-state>
    </filter>
  </get>
</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="0">
  <data>
    <interfaces-state xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
      <interface>
        <name>GigabitEthernet0/0/1</name>
        <storm-controls xmlns="urn:huawei:yang:huawei-storm-control">
          <storm-control-state>
            <packet-type>broadcast</packet-type>
            <port-name>GE0/0/1</port-name>
            <min-rate>5000</min-rate>
            <max-rate>7500</max-rate>
            <mode-state>pps</mode-state>
            <action-state>none</action-state>
            <punish-status>normal</punish-status>
            <trap-state>off</trap-state>
            <log-state>off</log-state>
            <interval-state>5</interval-state>
            <last-punish-time>-</last-punish-time>
          </storm-control-state>
          <storm-control-state>
            <packet-type>unicast</packet-type>
            <port-name>GE0/0/1</port-name>
            <min-rate>5000</min-rate>
            <max-rate>8000</max-rate>
            <mode-state>pps</mode-state>
            <action-state>none</action-state>
            <punish-status>normal</punish-status>
            <trap-state>off</trap-state>
            <log-state>off</log-state>
            <interval-state>5</interval-state>
            <last-punish-time>-</last-punish-time>
          </storm-control-state>
        </storm-controls>
      </interface>
    </interfaces-state>
  </data>
</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="0">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path/>
    <error-message>Failed to get top datapath</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic