From: Guillaume Abrioux Date: Thu, 15 Jun 2023 14:20:31 +0000 (+0200) Subject: node-proxy: (Redfish_System) reuse the existing client when possible X-Git-Tag: v19.3.0~102^2~89 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee1d4e49d1431365ceed4043a59d9f91123c4506;p=ceph.git node-proxy: (Redfish_System) reuse the existing client when possible Otherwise, the method start_client() recreates a new client. Signed-off-by: Guillaume Abrioux --- diff --git a/src/cephadm/node-proxy/redfish_system.py b/src/cephadm/node-proxy/redfish_system.py index 7254236938a1..ffa530cefbf0 100644 --- a/src/cephadm/node-proxy/redfish_system.py +++ b/src/cephadm/node-proxy/redfish_system.py @@ -35,7 +35,8 @@ class RedfishSystem(System): return result def start_client(self) -> None: - self.client = RedFishClient(self.host, self.username, self.password) + if not self.client: + self.client = RedFishClient(self.host, self.username, self.password) self.client.login() def get_system(self) -> Dict[str, Dict[str, Dict]]: