< Home

Changing the Enablement Status of Alarm Reporting

This section provides a sample of changing the enablement status of alarm reporting using the replace method.

Table 1 Changing the enablement status of alarm reporting

Operation

XPATH

edit-config:replace

/ietf-alarms:alarms/control/notify-status-changes

Data requirement

Table 2 Changing the enablement status of alarm reporting

Item

Data

Description

Alarm enablement status

false

Disables alarm reporting.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="8" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <error-option>rollback-on-error</error-option>
    <config>
      <alarms:alarms xmlns:alarms="urn:ietf:params:xml:ns:yang:ietf-alarms" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">
        <alarms:control>
          <alarms:notify-status-changes>false</alarms:notify-status-changes>
        </alarms:control>
      </alarms:alarms>
    </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 >