From: garciadeblas Date: Mon, 20 Jul 2020 11:05:42 +0000 (+0000) Subject: Fix bug 1160: remove get primitive from descritor for implicit actions on KDU X-Git-Tag: v8.0.0rc3~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F9473%2F1;p=osm%2FLCM.git Fix bug 1160: remove get primitive from descritor for implicit actions on KDU Change-Id: I14a1f6cc1aa4499b49dd4af4e15eddefcf92069a Signed-off-by: garciadeblas --- 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: