Feature 11057: Cluster management in Openshift-based infrastructures
Change-Id: I2ff2f415b0d45e096b9f2f00dcb9b4015a8c8b52
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_nbi/k8s_topics.py b/osm_nbi/k8s_topics.py
index dc6016c..89f8031 100644
--- a/osm_nbi/k8s_topics.py
+++ b/osm_nbi/k8s_topics.py
@@ -328,8 +328,7 @@
"vim_accounts", {"name": content["vim_account"]}
)
- # Add optional fields if they exist in the request
-
+ # Add optional fields if they don't exist in the request
if "region_name" not in indata:
region_name = vim_account_details.get("config", {}).get("region_name")
if region_name:
@@ -342,10 +341,12 @@
version = "k8s_version" in content
if not version:
- content["k8s_version"] = "1.28"
+ content["k8s_version"] = "1.32"
+ # Additional cluster information, specific for each cluster type
+ content["config"] = indata.get("config", {})
content["node_count"] = indata.get("node_count", 0)
content["ksu_count"] = 0
- self.logger.info(f"cotent is : {content}")
+ self.logger.info(f"content is : {content}")
return content
def check_vim(self, session, name):
@@ -896,6 +897,7 @@
"credentials": cls_add_request["credentials"],
"vim_account": cls_add_request["vim_account"],
"bootstrap": cls_add_request["bootstrap"],
+ "openshift": cls_add_request.get("openshift", False),
"infra_controller_profiles": [
self._create_default_profiles(
rollback, session, indata, kwargs, headers, self.infra_contr_topic