From 861496318a5cfbdebcf2335ca96c637711590a91 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 14 Nov 2024 16:17:16 +0000 Subject: [PATCH] Adding same cluster key pairs to default profiles Change-Id: I42884e763faac4f92c3cd1ac1758517bd0432bd0 Signed-off-by: rshri --- osm_lcm/k8s.py | 3 ++- osm_lcm/lcm.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py index bef5d586..17afe85c 100644 --- a/osm_lcm/k8s.py +++ b/osm_lcm/k8s.py @@ -413,6 +413,7 @@ class ClusterLcm(GitOpsLcm): "app_profiles": "k8sapp", "resource_profiles": "k8sresource", } + self.logger.info("the db_cluster is :{}".format(db_cluster)) for profile_type in profiles: profile_id = db_cluster[profile_type] self.logger.info("profile id is : {}".format(profile_id)) @@ -425,7 +426,7 @@ class ClusterLcm(GitOpsLcm): db_profile["resourceState"] = db_cluster["resourceState"] db_profile["operatingState"] = db_cluster["operatingState"] db_profile["age_pubkey"] = db_cluster["age_pubkey"] - db_profile["age_privkey"] = db_profile["age_privkey"] + db_profile["age_privkey"] = db_cluster["age_privkey"] db_profile = self.update_operation_history( db_profile, op_id, workflow_status, resource_status ) diff --git a/osm_lcm/lcm.py b/osm_lcm/lcm.py index fe937780..2e67db69 100644 --- a/osm_lcm/lcm.py +++ b/osm_lcm/lcm.py @@ -865,10 +865,12 @@ class Lcm: return elif command == "upgrade" or command == "scale" or command == "update": # db_vim = self.db.get_one("vim_accounts", {"_id": db_cluster["vim_account"]}) + """ db_vim = self.db.get_one( "vim_accounts", {"name": db_cluster["vim_account"]} ) db_content["vim_account"] = db_vim + """ task = asyncio.ensure_future( self.cluster.update(op_id, op_params, db_content) ) -- 2.25.1