From a100366a1e9c730909c95fde4e21a51964e5ee44 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Tue, 16 Feb 2021 21:07:58 +0100 Subject: [PATCH] Fix minor issue If initial-config-primitive or config-primitive do not exists, there was an error. Change-Id: If43cef7369a5f6d57c99347ba8a4b7b08790d057 Signed-off-by: David Garcia (cherry picked from commit 95cc9c5f864ef0d5b78eca278e41a023d7e79281) --- osm_lcm/ns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 8e0beb6..5131f9f 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -3447,9 +3447,9 @@ class NsLcm(LcmBase): if kdu_name and get_kdu_configuration(db_vnfd, kdu_name): kdu_configuration = get_kdu_configuration(db_vnfd, kdu_name) actions = set() - for primitive in kdu_configuration["initial-config-primitive"]: + for primitive in kdu_configuration.get("initial-config-primitive", []): actions.add(primitive["name"]) - for primitive in kdu_configuration["config-primitive"]: + for primitive in kdu_configuration.get("config-primitive", []): actions.add(primitive["name"]) kdu_action = True if primitive_name in actions else False -- 2.25.1