Commit ca0389fd authored by Xavier Thompson's avatar Xavier Thompson

[wip] Add embedded request script

parent f76bac48
......@@ -609,7 +609,23 @@ recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}.json
template =
inline:{{ parameter_dict['embedded-instance-parameters'] | indent(2) }}
{%- endif %}
[request-embedded-software.sh]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:project}/$${:_buildout_section_name_}
mode = 0700
template =
inline:#!/bin/sh
slapos supply {{ parameter_dict['embedded-sr'] }} slaprunner
slapos request "Embedded Instance" {{ parameter_dict['embedded-sr'] }} \
{%- set embedded_parameters = json.loads(parameter_dict['embedded-instance-parameters'] %}
{%- if embedded_parameters %}
--parameters \
{%- for k, v in embedded_parameters }
{{ k }}={{ v }} \
{%- endfor %}
{%- endif %}
{%- endif %}
[request-script-template]
recipe = slapos.recipe.template:jinja2
......
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