From: 37178 Date: Tue, 26 Mar 2024 05:32:43 +0000 (+0000) Subject: Bug 2358 Fix for Alarm Number for Alarm notification is getting started from 0 when... X-Git-Tag: release-v16.0-start~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=31ded24b16ff6996cd97e7ecb7f7f144f42a2ef5;p=osm%2FPOL.git Bug 2358 Fix for Alarm Number for Alarm notification is getting started from 0 when metric value is increased just after instantiation. Change-Id: I393ae8e5044126cd3108ecd195131c74ae8ef822 Signed-off-by: 37178 --- diff --git a/osm_policy_module/alarming/service.py b/osm_policy_module/alarming/service.py index 6466e13..f3a316d 100644 --- a/osm_policy_module/alarming/service.py +++ b/osm_policy_module/alarming/service.py @@ -273,7 +273,14 @@ class AlarmingService: status, ) try: - if status == "alarm" and alarm.last_action == "ok": + if ( + status == "alarm" + and alarm.last_action == "ok" + or ( + status == "alarm" + and alarm.last_action == "insufficient-data" + ) + ): alarm.id_suffix += 1 alarm.ok_ack = False if status == "ok" and alarm.last_action == "alarm":