From 003ac806464ebd0221ba2e9d6b6b5a8510f9c452 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 20 Jul 2020 11:05:42 +0000 Subject: [PATCH] Fix bug 1160: remove get primitive from descritor for implicit actions on KDU Change-Id: I14a1f6cc1aa4499b49dd4af4e15eddefcf92069a Signed-off-by: garciadeblas --- osm_lcm/ns.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 139c8e4..b7d10cd 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -3596,11 +3596,15 @@ class NsLcm(LcmBase): config_primitive_desc = config_primitive break - if not config_primitive_desc and not (kdu_name and primitive in ("upgrade", "rollback", "status")): - raise LcmException("Primitive {} not found at [ns|vnf|vdu]-configuration:config-primitive ". - format(primitive)) - primitive_name = config_primitive_desc.get("execution-environment-primitive", primitive) - ee_descriptor_id = config_primitive_desc.get("execution-environment-ref") + if not config_primitive_desc: + if not (kdu_name and primitive in ("upgrade", "rollback", "status")): + raise LcmException("Primitive {} not found at [ns|vnf|vdu]-configuration:config-primitive ". + format(primitive)) + primitive_name = primitive + ee_descriptor_id = None + else: + primitive_name = config_primitive_desc.get("execution-environment-primitive", primitive) + ee_descriptor_id = config_primitive_desc.get("execution-environment-ref") if vnf_index: if vdu_id: -- 2.25.1