MCPcopy Create free account
hub / github.com/ceph/ceph / fetch_oob_details

Method fetch_oob_details

src/ceph-node-proxy/ceph_node_proxy/main.py:74–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

init_systemMethod · 0.95

Calls 3

http_reqFunction · 0.90
errorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected