slaprunner: partial rewrite of import/export scrips in Python
Further rewrite should be done but at least there's no awk code anymore.
Showing
... | @@ -62,11 +62,6 @@ ip = ${slaprunner:ipv4} | ... | @@ -62,11 +62,6 @@ ip = ${slaprunner:ipv4} |
[supervisord] | [supervisord] | ||
port = ${supervisord-free-port:port} | port = ${supervisord-free-port:port} | ||
[exporter-configuration] | |||
coreutils-location = {{ dumps(parameter_dict['coreutils-location']) }} | |||
gawk-location = {{ dumps(parameter_dict['gawk-location']) }} | |||
backup_wait_time = {{ dumps(parameter_dict['backup_wait_time']) }} | |||
[exporter] | [exporter] | ||
recipe = slapos.recipe.template:jinja2 | recipe = slapos.recipe.template:jinja2 | ||
template = {{ exporter_script_path }} | template = {{ exporter_script_path }} | ||
... | @@ -75,8 +70,10 @@ rendered = ${directory:bin}/${slap-parameter:namebase}-exporter | ... | @@ -75,8 +70,10 @@ rendered = ${directory:bin}/${slap-parameter:namebase}-exporter |
wrapper = ${:rendered} | wrapper = ${:rendered} | ||
mode = 700 | mode = 700 | ||
context = | context = | ||
import sys sys | |||
import easy_install zc.buildout.easy_install | |||
section directory directory | section directory directory | ||
section parameter_dict exporter-configuration | raw backup_wait_time {{ backup_wait_time }} | ||
|
|||
raw output_log_file ${directory:log}/resilient.log | raw output_log_file ${directory:log}/resilient.log | ||
raw shell_binary {{ bash_executable_location }} | raw shell_binary {{ bash_executable_location }} | ||
raw rsync_binary {{ rsync_executable_location }} | raw rsync_binary {{ rsync_executable_location }} | ||
... | ... |