Bug 2410 Fix Configmap creation while creating nodegroup in AWS
Change-Id: I0feb1dfa0c1cb42b349aeb32e1d4ba8ea284f408
Signed-off-by: yshah <shahithya.y@tataelxsi.co.in>
diff --git a/osm_lcm/odu_libs/nodegroup.py b/osm_lcm/odu_libs/nodegroup.py
index 488fe62..ff40f9c 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 @@
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 @@
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}")