aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
authorLoys Ollivier <lollivier@baylibre.com>2017-09-08 09:57:39 +0200
committerKevin Hilman <khilman@baylibre.com>2017-09-08 09:04:47 -0700
commit0535413a98ace7cbf301bba18dd95254302d584f (patch)
treefd991f9e6a6e3055f92de665a63c6f03cde057bf /templates/base
parentb516553ebf08c2aec03b840d618fafd548656706 (diff)
Add callback option to command line
The callback option takes one argument. It is the name of the file located in ./templates/callback/ that contains all the "secret" information such as the callback FQDN, lab name and token. A readme is provided: ./templates/callback/callback_readme.txt Change-Id: Id457d90eba0d1312e43246ca607289ad829fd55f Signed-off-by: Loys Ollivier <lollivier@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/agl-base.jinja23
-rw-r--r--templates/base/agl-callback.jinja211
2 files changed, 14 insertions, 0 deletions
diff --git a/templates/base/agl-base.jinja2 b/templates/base/agl-base.jinja2
index 1119aaa..f717ef6 100644
--- a/templates/base/agl-base.jinja2
+++ b/templates/base/agl-base.jinja2
@@ -4,6 +4,9 @@
metadata:
image.type: 'AGL'
{% endblock %}
+{% if callback_name %}
+{% include 'base/agl-callback.jinja2' %}
+{% endif %}
{%- block main %}
device_type: {{ device_type }}
job_name: {{ name }}
diff --git a/templates/base/agl-callback.jinja2 b/templates/base/agl-callback.jinja2
new file mode 100644
index 0000000..6798b17
--- /dev/null
+++ b/templates/base/agl-callback.jinja2
@@ -0,0 +1,11 @@
+{%- block notify -%}
+notify:
+ criteria:
+ status: finished
+ callback:
+ url: {{ backend_fqdn }}/callback/{{ callback_name }}?lab_name={{ lab_name }}&status={STATUS}&status_string={STATUS_STRING}
+ method: POST
+ dataset: all
+ token: {{ lab_token }}
+ content-type: json
+{%- endblock %}