From: jegan Date: Fri, 6 Dec 2024 07:19:34 +0000 (+0000) Subject: Added a fix for performing Day1 and Day2 in a KDU using Helm based Execution Environments X-Git-Tag: v17.0.0~15 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F14816%2F3;p=osm%2FLCM.git Added a fix for performing Day1 and Day2 in a KDU using Helm based Execution Environments Change-Id: I5f38f35e6144abdf048d85b776687f43ebcbc3e7 Signed-off-by: jegan --- diff --git a/osm_lcm/data_utils/vnfd.py b/osm_lcm/data_utils/vnfd.py index 954a84c0..c4aee2ed 100644 --- a/osm_lcm/data_utils/vnfd.py +++ b/osm_lcm/data_utils/vnfd.py @@ -167,6 +167,13 @@ def get_juju_ee_ref(vnfd, entity_id): ) +def get_helm_ee_ref(vnfd, entity_id): + return list_utils.find_in_list( + get_configuration(vnfd, entity_id).get("execution-environment-list", []), + lambda ee: "helm-chart" in ee, + ) + + def find_software_version(vnfd: dict) -> str: """Find the sotware version in the VNFD descriptors diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index a9479499..ccfda6d4 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -84,6 +84,7 @@ from osm_lcm.data_utils.vnfd import ( get_scaling_aspect, get_number_of_instances, get_juju_ee_ref, + get_helm_ee_ref, get_kdu_resource_profile, find_software_version, check_helm_ee_in_ns, @@ -3668,6 +3669,7 @@ class NsLcm(LcmBase): kdu_config and kdu_config.get("initial-config-primitive") and get_juju_ee_ref(vnfd, k8s_instance_info["kdu-name"]) is None + and get_helm_ee_ref(vnfd, k8s_instance_info["kdu-name"]) is None ): initial_config_primitive_list = kdu_config.get( "initial-config-primitive"