Adding same cluster key pairs to default profiles 30/14730/5
authorYour Name <shrinithi.r@tataelxsi.co.in>
Thu, 14 Nov 2024 16:17:16 +0000 (16:17 +0000)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 3 Dec 2024 11:32:01 +0000 (12:32 +0100)
Change-Id: I42884e763faac4f92c3cd1ac1758517bd0432bd0
Signed-off-by: rshri <shrinithi.r@tataelxsi.co.in>
osm_lcm/k8s.py
osm_lcm/lcm.py

index bef5d58..17afe85 100644 (file)
@@ -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
             )
index fe93778..2e67db6 100644 (file)
@@ -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)
                 )