From 94d3b679c36c2a258f01645ccae86ba2449de7cb Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 24 Oct 2023 08:43:53 +0000 Subject: [PATCH] node-proxy: fetch idrac details from NodeProxyCache() The class ` NodeProxyCache()` is intended for that, it already has this information so there's no need to make a call to `get_store()` each time we want to access idrac details. Signed-off-by: Guillaume Abrioux (cherry picked from commit a0f96aa5f1a27ec84e09f0bd030f62e39203e4f7) --- src/pybind/mgr/cephadm/agent.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/cephadm/agent.py b/src/pybind/mgr/cephadm/agent.py index f2ae92a603fc8..86726728bccbb 100644 --- a/src/pybind/mgr/cephadm/agent.py +++ b/src/pybind/mgr/cephadm/agent.py @@ -119,9 +119,8 @@ class NodeProxy: results: Dict[str, Any] = {} if self.validate_node_proxy_data(data): - idrac_details = self.mgr.get_store('node_proxy/idrac') - idrac_details_json = json.loads(idrac_details) - results['result'] = idrac_details_json[data["cephx"]["name"]] + host = data["cephx"]["name"] + results['result'] = self.mgr.node_proxy.idrac.get(host) else: results['result'] = self.validate_msg -- 2.39.5