From: David Garcia Date: Tue, 16 Feb 2021 20:07:58 +0000 (+0100) Subject: Fix minor issue X-Git-Tag: v9.1.0~10 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=95cc9c5f864ef0d5b78eca278e41a023d7e79281;p=osm%2FLCM.git 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 --- 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