If initial-config-primitive or config-primitive do not exists, there was
an error.
Change-Id: If43cef7369a5f6d57c99347ba8a4b7b08790d057
Signed-off-by: David Garcia <david.garcia@canonical.com>
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