Commit f49bb9fb authored by Łukasz Nowak's avatar Łukasz Nowak

slapgrid: Support [manager:x] sections

In slapos:manager_list it is possible to enable list of managers, but as they
have to be configurable support sections for each manager by [manager:x]

So having configuration file like:

[slapos]
manager_list = mgr

[manager:mgr]
key = value

Will allow for the mgr manager to read values from manager:mgr
parent 89863d6c
...@@ -208,6 +208,12 @@ def merged_options(args, configp): ...@@ -208,6 +208,12 @@ def merged_options(args, configp):
"reload_config_cmd", "reload_config_cmd",
"slapos node restart firewall") "slapos node restart firewall")
key = 'manager:'
options[key] = {}
for section in configp.sections():
if section.startswith(key):
manager = section[len(key):]
options[key][manager] = dict(configp.items(section))
return options return options
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment