Fix bug 2047: Remove fetching of actions for charms on update_vca_status 29/12129/2
authorDavid Garcia <david.garcia@canonical.com>
Thu, 26 May 2022 10:46:14 +0000 (12:46 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Thu, 26 May 2022 10:51:16 +0000 (12:51 +0200)
Change-Id: If599baf949b74d420400fd2752aeac6e4fd117f6
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/k8s_juju_conn.py
n2vc/tests/unit/test_k8s_juju_conn.py

index 6744015..99e868b 100644 (file)
@@ -794,9 +794,7 @@ class K8sJujuConnector(K8sConnector):
 
                 for application in vcastatus[model_name]["applications"]:
                     # Adding application actions
-                    vcastatus[model_name]["applications"][application][
-                        "actions"
-                    ] = await libjuju.get_actions(application, kdu_instance)
+                    vcastatus[model_name]["applications"][application]["actions"] = {}
                     # Adding application configs
                     vcastatus[model_name]["applications"][application][
                         "configs"
index e0faaf0..915738e 100644 (file)
@@ -658,7 +658,6 @@ class UpdateVcaStatusTest(K8sJujuConnTestCase):
             self.k8s_juju_conn.update_vca_status(self.vcaStatus, self.kdu_instance)
         )
         self.k8s_juju_conn.libjuju.get_executed_actions.assert_called_once()
-        self.k8s_juju_conn.libjuju.get_actions.assert_called_once()
         self.k8s_juju_conn.libjuju.get_application_configs.assert_called_once()
 
     def test_exception(self):
@@ -669,7 +668,6 @@ class UpdateVcaStatusTest(K8sJujuConnTestCase):
                 self.k8s_juju_conn.update_vca_status(self.vcaStatus, self.kdu_instance)
             )
             self.k8s_juju_conn.libjuju.get_executed_actions.assert_not_called()
-            self.k8s_juju_conn.libjuju.get_actions.assert_not_called_once()
             self.k8s_juju_conn.libjuju.get_application_configs.assert_not_called_once()