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

Function create_node_proxy_manager

src/ceph-node-proxy/ceph_node_proxy/bootstrap.py:10–39  ·  view source on GitHub ↗

Build NodeProxyManager from cephadm bootstrap config. Creates temporary CA file and loads node-proxy YAML config.

(cephadm_config: CephadmConfig)

Source from the content-addressed store, hash-verified

8
9
10def create_node_proxy_manager(cephadm_config: CephadmConfig) -> "NodeProxyManager":
11 """
12 Build NodeProxyManager from cephadm bootstrap config.
13 Creates temporary CA file and loads node-proxy YAML config.
14 """
15 from ceph_node_proxy.main import NodeProxyManager
16
17 ca_file = write_tmp_file(
18 cephadm_config.root_cert_pem,
19 prefix_name="cephadm-endpoint-root-cert-",
20 )
21 config = get_node_proxy_config(
22 path=cephadm_config.node_proxy_config_path,
23 defaults=DEFAULTS,
24 )
25
26 manager = NodeProxyManager(
27 mgr_host=cephadm_config.target_ip,
28 cephx_name=cephadm_config.name,
29 cephx_secret=cephadm_config.keyring,
30 mgr_agent_port=cephadm_config.target_port,
31 ca_path=ca_file.name,
32 api_ssl_crt=cephadm_config.listener_crt,
33 api_ssl_key=cephadm_config.listener_key,
34 config_path=cephadm_config.node_proxy_config_path,
35 config=config,
36 )
37 # Keep temp file alive for the lifetime of the manager
38 manager._ca_temp_file = ca_file
39 return manager

Callers 1

mainFunction · 0.90

Calls 3

write_tmp_fileFunction · 0.90
get_node_proxy_configFunction · 0.90
NodeProxyManagerClass · 0.90

Tested by

no test coverage detected