(self)
| 72 | self.init_api() |
| 73 | |
| 74 | def fetch_oob_details(self) -> Dict[str, str]: |
| 75 | try: |
| 76 | headers, result, status = http_req( |
| 77 | hostname=self.mgr_host, |
| 78 | port=self.mgr_agent_port, |
| 79 | data=json.dumps(self.cephx), |
| 80 | endpoint="/node-proxy/oob", |
| 81 | ssl_ctx=self.ssl_ctx, |
| 82 | ) |
| 83 | except HTTPError as e: |
| 84 | msg = f"No out of band tool details could be loaded: {e.code}, {e.reason}" |
| 85 | self.log.error(msg) |
| 86 | raise |
| 87 | |
| 88 | result_json = json.loads(result) |
| 89 | oob_details: Dict[str, str] = { |
| 90 | "host": result_json["result"]["addr"], |
| 91 | "username": result_json["result"]["username"], |
| 92 | "password": result_json["result"]["password"], |
| 93 | "port": result_json["result"].get("port", "443"), |
| 94 | } |
| 95 | return oob_details |
| 96 | |
| 97 | def init_system(self) -> None: |
| 98 | try: |
no test coverage detected