]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
node-proxy: parametrize idrac port
authorGuillaume Abrioux <gabrioux@ibm.com>
Mon, 23 Oct 2023 15:28:35 +0000 (15:28 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 25 Jan 2024 15:07:20 +0000 (15:07 +0000)
This adds the missing piece to make the idrac port
a parameter that one can customize.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/cephadm/cephadm.py
src/cephadm/cephadmlib/node_proxy/baseredfishsystem.py
src/cephadm/cephadmlib/node_proxy/main.py

index e65e837d9f3d6cca29cafb2de3e89b7cc86208b7..8ee75cb65203e5e5a6805e1e163530121169af6f 100755 (executable)
@@ -1495,6 +1495,8 @@ class CephadmAgent(DaemonForm):
             'ssl_crt_path': self.listener_cert_path,
             'ssl_key_path': self.listener_key_path
         }
+        if result_json['result'].get('port'):
+            kwargs['port'] = result_json['result']['port']
 
         self.t_node_proxy = NodeProxy(**kwargs)
         self.t_node_proxy.start()
index 76edee0b2514c3a5b6e5d246c5a81350382b65db..ccf61e9cf87951a6681c07d1de15829783c299cf 100644 (file)
@@ -15,10 +15,11 @@ class BaseRedfishSystem(BaseSystem):
         self.chassis_endpoint: str = kw.get('chassis_endpoint', '/Chassis/System.Embedded.1')
         self.log = Logger(__name__)
         self.host: str = kw['host']
+        self.port: int = kw['port']
         self.username: str = kw['username']
         self.password: str = kw['password']
         # move the following line (class attribute?)
-        self.client = RedFishClient(host=self.host, username=self.username, password=self.password)
+        self.client = RedFishClient(host=self.host, port=self.port, username=self.username, password=self.password)
         self.log.logger.info(f"redfish system initialization, host: {self.host}, user: {self.username}")
 
         self.run: bool = False
index 8d3da58369cef72799abfaad46c2e0530ee2e9e9..cd36639bd1fe3daa907b2bd5c3a51abb37ca374f 100644 (file)
@@ -211,6 +211,7 @@ class NodeProxy(Thread):
         self.log.logger.info(f"Server initialization...")
         try:
             self.system = RedfishDellSystem(host=self.__dict__['host'],
+                                            port=self.__dict__.get('port', 443),
                                             username=self.__dict__['username'],
                                             password=self.__dict__['password'],
                                             config=self.config)