Fix bug 2025: Execute Helm Kdu actions in Proxy charms 28/12028/1
authorDavid Garcia <david.garcia@canonical.com>
Tue, 10 May 2022 12:07:12 +0000 (14:07 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Tue, 10 May 2022 12:10:47 +0000 (14:10 +0200)
Change-Id: Ief88be9a49b00d6f8ae96ea0dfd85c4665aca9b9
Signed-off-by: David Garcia <david.garcia@canonical.com>
osm_lcm/ns.py

index 901954e..7bd6a92 100644 (file)
@@ -5065,7 +5065,17 @@ class NsLcm(LcmBase):
                     actions.add(primitive["name"])
                 for primitive in kdu_configuration.get("config-primitive", []):
                     actions.add(primitive["name"])
-                kdu_action = True if primitive_name in actions else False
+                kdu = find_in_list(
+                    nsr_deployed["K8s"],
+                    lambda kdu: kdu_name == kdu["kdu-name"]
+                    and kdu["member-vnf-index"] == vnf_index,
+                )
+                kdu_action = (
+                    True
+                    if primitive_name in actions
+                    and kdu["k8scluster-type"] not in ("helm-chart", "helm-chart-v3")
+                    else False
+                )
 
             # TODO check if ns is in a proper status
             if kdu_name and (