From: yshah Date: Tue, 23 Sep 2025 10:09:58 +0000 (+0000) Subject: Bug 2410 Fix Configmap creation while creating nodegroup in AWS X-Git-Tag: v19.0.0~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=37d6ac95e0a52713228b9cf0d084f83183ac50d9;p=osm%2FLCM.git Bug 2410 Fix Configmap creation while creating nodegroup in AWS Change-Id: I0feb1dfa0c1cb42b349aeb32e1d4ba8ea284f408 Signed-off-by: yshah --- diff --git a/osm_lcm/odu_libs/nodegroup.py b/osm_lcm/odu_libs/nodegroup.py index 488fe628..ff40f9c8 100644 --- a/osm_lcm/odu_libs/nodegroup.py +++ b/osm_lcm/odu_libs/nodegroup.py @@ -17,6 +17,7 @@ import yaml +import json def gather_age_key(cluster): @@ -65,7 +66,7 @@ async def add_nodegroup(self, op_id, op_params, content): public_subnet = op_params.get("public_subnet", []) subnet = private_subnet + public_subnet self.logger.info(f"Subnets: {subnet}") - # formatted_subnet = f"{json.dumps(subnet)}" + formatted_subnet = f"{json.dumps(subnet)}" # self.logger.info(f"Formatted Subnet: {formatted_subnet}") # Create the ConfigMap for the subnets # TODO: this should be done in a declarative way, not imperative @@ -73,7 +74,7 @@ async def add_nodegroup(self, op_id, op_params, content): await self.create_configmap( configmap_name, "managed-resources", - {"subnet": subnet}, + {"subnet": formatted_subnet}, ) except Exception as e: self.logger.info(f"Cannot create configmap {configmap_name}: {e}")