From: Gulsum Atici Date: Mon, 15 May 2023 12:45:31 +0000 (+0300) Subject: Fix Healing operation: additionalParams KeyError X-Git-Tag: release-v14.0-start~8 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f4c1d2fe2123e408eec90f4a7c24504479c29837;p=osm%2FLCM.git Fix Healing operation: additionalParams KeyError If target_vnf does not have additionalParams KeyError is raised and additionalParams become optional within this change. Change-Id: I69cb579882b305befd2a64a60bede450e8e6c10d Signed-off-by: Gulsum Atici --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 8aa3f5a..305b70b 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -7890,9 +7890,9 @@ class NsLcm(LcmBase): for target_vdu in target_vdu_list: deploy_params_vdu = target_vdu # Set run-day1 vnf level value if not vdu level value exists - if not deploy_params_vdu.get("run-day1") and target_vnf[ - "additionalParams" - ].get("run-day1"): + if not deploy_params_vdu.get("run-day1") and target_vnf.get( + "additionalParams", {} + ).get("run-day1"): deploy_params_vdu["run-day1"] = target_vnf[ "additionalParams" ].get("run-day1")