Clear 280.003 alarm on subcloud deletion

When a subcloud was deleted, the 280.003 alarm  was not cleared.
The change was to add the 280.003 alarm to the list of alarms that are checked.

Test Plan:

PASS: Install and bootstrap DC.
PASS: create a subcloud backup and power off the subcloud after reaching:
"Run subcloud1 backup playbook".
PASS: Wait for the alarm 280.003 to be set, then umanage and
delete the subcloud and check if the 280.003 alarm was cleared.

Closes-bug: 2004638

Signed-off-by: Christopher Souza <Christopher.DeOliveiraSouza@windriver.com>
Change-Id: I70458b1fe6da4b9c0bf458ee57720a4ffaeafbfb
This commit is contained in:
Christopher Souza 2023-02-03 07:57:07 -03:00
parent ae7d2f33ea
commit 591a06e858
1 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# Copyright 2017 Ericsson AB.
# Copyright (c) 2017-2022 Wind River Systems, Inc.
# Copyright (c) 2017-2023 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -1562,12 +1562,15 @@ class SubcloudManager(manager.Manager):
# for a subcloud, we manually clear the following:
# - subcloud offline
# - subloud resource out of sync
# - Subcloud Backup Failure
for alarm_id, entity_instance_id in (
(fm_const.FM_ALARM_ID_DC_SUBCLOUD_OFFLINE,
"subcloud=%s" % subcloud.name),
(fm_const.FM_ALARM_ID_DC_SUBCLOUD_RESOURCE_OUT_OF_SYNC,
"subcloud=%s.resource=%s" %
(subcloud.name, dccommon_consts.ENDPOINT_TYPE_DC_CERT))):
(subcloud.name, dccommon_consts.ENDPOINT_TYPE_DC_CERT)),
(fm_const.FM_ALARM_ID_DC_SUBCLOUD_BACKUP_FAILED,
"subcloud=%s" % subcloud.name)):
try:
fault = self.fm_api.get_fault(alarm_id,
entity_instance_id)