]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
node-proxy: add method start_client() redfish_system class
authorGuillaume Abrioux <gabrioux@ibm.com>
Mon, 22 May 2023 12:15:05 +0000 (14:15 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 14:43:29 +0000 (14:43 +0000)
This is going to be useful for a new endpoint '/start'

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/cephadm/node-proxy/redfish_system.py

index f10a30ece4c8b23580ddca7132fd15d9da1e2b3d..8b8e96f7a34a3c210a521c5f7774df343fbedeae 100644 (file)
@@ -16,10 +16,15 @@ class RedfishSystem(System):
         self.system_endpoint = kw.get('system_endpoint', '/Systems/1')
         log.info(f"redfish system initialization, host: {self.host}, user: {self.username}")
         self.client = RedFishClient(self.host, self.username, self.password)
-        self.client.login()
         self._system = {}
         self.run = False
         self.thread = None
+        self.start_client()
+
+    def start_client(self):
+        log.info(f"redfish system initialization, host: {self.host}, user: {self.username}")
+        self.client = RedFishClient(self.host, self.username, self.password)
+        self.client.login()
 
     def get_system(self):
         return self._system