From: garciadeblas Date: Fri, 17 Jan 2025 00:06:05 +0000 (+0100) Subject: Fix sw_catalog_path in KsuLcm operations for KSU based on OKA X-Git-Tag: v18.0.0~50 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=9f7c9c5670ce4f42700e658338706ccb13ebfa6b;p=osm%2FLCM.git Fix sw_catalog_path in KsuLcm operations for KSU based on OKA Change-Id: If413bfc9efb3cee56bed3fae39f3c7ae9c5ab054 Signed-off-by: garciadeblas --- diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py index 2d2d42b2..da20e56b 100644 --- a/osm_lcm/k8s.py +++ b/osm_lcm/k8s.py @@ -1719,6 +1719,7 @@ class KsuLcm(GitOpsLcm): ksu_params["profile"]["name"] = db_profile["name"] ksu_params["profile"]["age_pubkey"] = db_profile.get("age_pubkey", "") # Update ksu_params["oka"] with sw_catalog_path (when missing) + # TODO: remove this in favor of doing it in ODU workflow for oka in ksu_params["oka"]: if "sw_catalog_path" not in oka: oka_id = oka["_id"] @@ -1726,7 +1727,9 @@ class KsuLcm(GitOpsLcm): oka_type = MAP_PROFILE[ db_oka.get("profile_type", "infra_controller_profiles") ] - oka["sw_catalog_path"] = f"{oka_type}/{db_oka['git_name']}" + oka[ + "sw_catalog_path" + ] = f"{oka_type}/{db_oka['git_name']}/templates" op_params.append(ksu_params) _, workflow_name = await self.odu.launch_workflow( @@ -1773,6 +1776,7 @@ class KsuLcm(GitOpsLcm): ksu_params["profile"]["name"] = db_profile["name"] ksu_params["profile"]["age_pubkey"] = db_profile.get("age_pubkey", "") # Update ksu_params["oka"] with sw_catalog_path (when missing) + # TODO: remove this in favor of doing it in ODU workflow for oka in ksu_params["oka"]: if "sw_catalog_path" not in oka: oka_id = oka["_id"] @@ -1780,7 +1784,9 @@ class KsuLcm(GitOpsLcm): oka_type = MAP_PROFILE[ db_oka.get("profile_type", "infra_controller_profiles") ] - oka["sw_catalog_path"] = f"{oka_type}/{db_oka['git_name']}" + oka[ + "sw_catalog_path" + ] = f"{oka_type}/{db_oka['git_name']}/templates" op_params.append(ksu_params) _, workflow_name = await self.odu.launch_workflow(