From: Guillaume Abrioux Date: Tue, 24 Oct 2023 08:43:53 +0000 (+0000) Subject: node-proxy: fetch idrac details from NodeProxyCache() X-Git-Tag: v18.2.4~314^2~38 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=94d3b679c36c2a258f01645ccae86ba2449de7cb;p=ceph.git 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) --- diff --git a/src/pybind/mgr/cephadm/agent.py b/src/pybind/mgr/cephadm/agent.py index f2ae92a603f..86726728bcc 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