Commit 0e66f643 authored by Xavier Thompson's avatar Xavier Thompson

software/theia: Simplify embedded SR options

Remove existing "embedded instance" options:
- `embedded-sr`
- `embedded-sr-type`
- `embedded-instance-parameters`

Instead introduce `one-time-embedded-sr`:
- Supply the given SR, but only the first time.
- Create a supply/request script for the user.

This parameter is only taken into account the first time it's used.
It __doesn't__ automatically request an instance. It doesn't call
the request script created for the user.
parent 611c6f65
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance-theia] [instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in _update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 898ada9e42d8aafae571eba230708cc3 md5sum = cb1ffe2ca26092db227e960ec58bb85e
[instance] [instance]
_update_hash_filename_ = instance.cfg.in _update_hash_filename_ = instance.cfg.in
md5sum = 313eb380fdd2d0882f329af4a1157259 md5sum = 450c89616e1f8c445f6f09029c2b9c6e
[instance-import] [instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in _update_hash_filename_ = instance-import.cfg.jinja.in
......
...@@ -15,19 +15,9 @@ ...@@ -15,19 +15,9 @@
], ],
"default": "running" "default": "running"
}, },
"embedded-sr": { "one-time-embedded-sr": {
"title": "Embedded Software URL", "title": "One-Time-Only Embedded Software URL",
"description": "Optional URL of a software to be embedded", "description": "Optional software URL of an instance to be supplied and requested in embedded slapos. Only applies the first this option is used.",
"type": "string"
},
"embedded-sr-type": {
"title": "Embedded Software Type",
"description": "Type of the optional embedded software",
"type": "string"
},
"embedded-instance-parameters": {
"title": "Embedded Instance Parameters",
"description": "Parameters for the embedded instance, as a JSON dict",
"type": "string" "type": "string"
}, },
"frontend-guid": { "frontend-guid": {
......
This diff is collapsed.
...@@ -31,6 +31,7 @@ pull-backup = template-pull-backup:rendered ...@@ -31,6 +31,7 @@ pull-backup = template-pull-backup:rendered
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
url = ${instance-theia:output} url = ${instance-theia:output}
output = $${buildout:directory}/instance-theia.cfg output = $${buildout:directory}/instance-theia.cfg
extensions = jinja2.ext.do
context = context =
jsonkey default_parameter_dict :default-parameters jsonkey default_parameter_dict :default-parameters
key parameter_dict slap-configuration:configuration key parameter_dict slap-configuration:configuration
...@@ -38,14 +39,12 @@ context = ...@@ -38,14 +39,12 @@ context =
key partition_root_path buildout:directory key partition_root_path buildout:directory
key ipv6_random slap-configuration:ipv6-random key ipv6_random slap-configuration:ipv6-random
key ipv4_random slap-configuration:ipv4-random key ipv4_random slap-configuration:ipv4-random
import os_module os import os os
import hashlib_module hashlib import json json
default-parameters = default-parameters =
{ {
"autorun": "running", "autorun": "running",
"embedded-sr": null, "one-time-embedded-sr": null,
"embedded-sr-type": null,
"embedded-instance-parameters": null,
"frontend-name": "Theia Frontend", "frontend-name": "Theia Frontend",
"frontend-sr": "$${:frontend-sr}", "frontend-sr": "$${:frontend-sr}",
"frontend-sr-type": "RootSoftwareInstance", "frontend-sr-type": "RootSoftwareInstance",
......
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