]>
Commit | Line | Data |
---|---|---|
801d1391 TL |
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']: | |
11 | return 'client.' + name | |
12 | elif daemon_type in ['mon', 'osd', 'mds', 'mgr', 'client']: | |
13 | return name | |
14 | else: | |
15 | return 'mon' |