]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/cephadm/utils.py
3cc6d6e1a74ab17fe5e422f7fec6a61dc3c52514
[ceph.git] / ceph / src / pybind / mgr / cephadm / utils.py
1 import re
2
3 from orchestrator import OrchestratorError
4
5 def name_to_config_section(name):
6 """
7 Map from daemon names to ceph entity names (as seen in config)
8 """
9 daemon_type = name.split('.', 1)[0]
10 if daemon_type in ['rgw', 'rbd-mirror', 'nfs', 'crash', 'iscsi']:
11 return 'client.' + name
12 elif daemon_type in ['mon', 'osd', 'mds', 'mgr', 'client']:
13 return name
14 else:
15 return 'mon'