From: Benjamin Diaz Date: Tue, 21 May 2019 15:31:15 +0000 (-0300) Subject: Makes actions in vnf alarm optional X-Git-Tag: v6.0.0~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F7535%2F1;p=osm%2FPOL.git Makes actions in vnf alarm optional Change-Id: I4db3e01903d4c82cd8c89529e62fc0146853969f Signed-off-by: Benjamin Diaz --- diff --git a/osm_policy_module/alarming/service.py b/osm_policy_module/alarming/service.py index c54e02d..590b06a 100644 --- a/osm_policy_module/alarming/service.py +++ b/osm_policy_module/alarming/service.py @@ -103,7 +103,7 @@ class AlarmingService: vdu_name=vdur['name'] ) for action_type in ['ok', 'insufficient-data', 'alarm']: - if action_type in alarm_descriptor['actions']: + if 'actions' in alarm_descriptor and action_type in alarm_descriptor['actions']: for url in alarm_descriptor['actions'][action_type]: AlarmActionRepository.create( type=action_type,