From: David Garcia Date: Thu, 26 May 2022 10:46:14 +0000 (+0200) Subject: Fix bug 2047: Remove fetching of actions for charms on update_vca_status X-Git-Tag: v12.0.0rc1~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F12129%2F2;p=osm%2FN2VC.git Fix bug 2047: Remove fetching of actions for charms on update_vca_status Change-Id: If599baf949b74d420400fd2752aeac6e4fd117f6 Signed-off-by: David Garcia --- 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()