Makes actions in vnf alarm optional 35/7535/1
authorBenjamin Diaz <bdiaz@whitestack.com>
Tue, 21 May 2019 15:31:15 +0000 (12:31 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Tue, 21 May 2019 15:31:15 +0000 (12:31 -0300)
Change-Id: I4db3e01903d4c82cd8c89529e62fc0146853969f
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
osm_policy_module/alarming/service.py

index c54e02d..590b06a 100644 (file)
@@ -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,