]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/cephadm/utils.py
import 15.2.1 Octopus source
[ceph.git] / ceph / src / pybind / mgr / cephadm / utils.py
CommitLineData
801d1391
TL
1import re
2
3from orchestrator import OrchestratorError
4
5def 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']:
11 return 'client.' + name
12 elif daemon_type in ['mon', 'osd', 'mds', 'mgr', 'client']:
13 return name
14 else:
15 return 'mon'