]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
node-proxy: fetch idrac details from NodeProxyCache()
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 24 Oct 2023 08:43:53 +0000 (08:43 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 15:10:25 +0000 (15:10 +0000)
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 <gabrioux@ibm.com>
(cherry picked from commit a0f96aa5f1a27ec84e09f0bd030f62e39203e4f7)

src/pybind/mgr/cephadm/agent.py

index f2ae92a603fc8199476ccfca4fd017ece815f00b..86726728bccbb14bf2f20a5c0ed054b5f4a539cf 100644 (file)
@@ -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