Added a fix for performing Day1 and Day2 in a KDU using Helm based Execution Environments 16/14816/3
authorjegan <jegan.s@tataelxsi.co.in>
Fri, 6 Dec 2024 07:19:34 +0000 (07:19 +0000)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 12 Dec 2024 13:18:34 +0000 (14:18 +0100)
Change-Id: I5f38f35e6144abdf048d85b776687f43ebcbc3e7
Signed-off-by: jegan <jegan.s@tataelxsi.co.in>
osm_lcm/data_utils/vnfd.py
osm_lcm/ns.py

index 954a84c..c4aee2e 100644 (file)
@@ -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
 
index a947949..ccfda6d 100644 (file)
@@ -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"