From 93bee7ea8407c7501daf04190f1bae7947e7d74c Mon Sep 17 00:00:00 2001 From: David Garcia Date: Thu, 26 May 2022 12:46:14 +0200 Subject: [PATCH] Fix bug 2047: Remove fetching of actions for charms on update_vca_status Change-Id: If599baf949b74d420400fd2752aeac6e4fd117f6 Signed-off-by: David Garcia --- n2vc/k8s_juju_conn.py | 4 +--- n2vc/tests/unit/test_k8s_juju_conn.py | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/n2vc/k8s_juju_conn.py b/n2vc/k8s_juju_conn.py index 6744015..99e868b 100644 --- a/n2vc/k8s_juju_conn.py +++ b/n2vc/k8s_juju_conn.py @@ -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" diff --git a/n2vc/tests/unit/test_k8s_juju_conn.py b/n2vc/tests/unit/test_k8s_juju_conn.py index e0faaf0..915738e 100644 --- a/n2vc/tests/unit/test_k8s_juju_conn.py +++ b/n2vc/tests/unit/test_k8s_juju_conn.py @@ -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() -- 2.25.1