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 @@
[instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 898ada9e42d8aafae571eba230708cc3
md5sum = cb1ffe2ca26092db227e960ec58bb85e
[instance]
_update_hash_filename_ = instance.cfg.in
md5sum = 313eb380fdd2d0882f329af4a1157259
md5sum = 450c89616e1f8c445f6f09029c2b9c6e
[instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in
......
......@@ -15,19 +15,9 @@
],
"default": "running"
},
"embedded-sr": {
"title": "Embedded Software URL",
"description": "Optional URL of a software to be embedded",
"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",
"one-time-embedded-sr": {
"title": "One-Time-Only Embedded Software URL",
"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"
},
"frontend-guid": {
......
This diff is collapsed.
......@@ -31,6 +31,7 @@ pull-backup = template-pull-backup:rendered
recipe = slapos.recipe.template:jinja2
url = ${instance-theia:output}
output = $${buildout:directory}/instance-theia.cfg
extensions = jinja2.ext.do
context =
jsonkey default_parameter_dict :default-parameters
key parameter_dict slap-configuration:configuration
......@@ -38,14 +39,12 @@ context =
key partition_root_path buildout:directory
key ipv6_random slap-configuration:ipv6-random
key ipv4_random slap-configuration:ipv4-random
import os_module os
import hashlib_module hashlib
import os os
import json json
default-parameters =
{
"autorun": "running",
"embedded-sr": null,
"embedded-sr-type": null,
"embedded-instance-parameters": null,
"one-time-embedded-sr": null,
"frontend-name": "Theia Frontend",
"frontend-sr": "$${:frontend-sr}",
"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