Commit 4ce5c85d authored by Joanne Hugé's avatar Joanne Hugé Committed by Julien Muchembled

software/re6stnet: add community configuration

parent a86050ed
...@@ -18,7 +18,7 @@ md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5 ...@@ -18,7 +18,7 @@ md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5
[template-re6stnet] [template-re6stnet]
filename = instance-re6stnet.cfg.in filename = instance-re6stnet.cfg.in
md5sum = 98f86d2a10d909215ae88ba6a602da27 md5sum = cc441ef0d6a12a3697e9599e4bfa7c35
[template-apache-conf] [template-apache-conf]
filename = apache.conf.in filename = apache.conf.in
...@@ -26,4 +26,4 @@ md5sum = 3d55f7c9c4fc7279f06bfe6313a78a4b ...@@ -26,4 +26,4 @@ md5sum = 3d55f7c9c4fc7279f06bfe6313a78a4b
[template-re6st-registry-conf] [template-re6st-registry-conf]
filename = re6st-registry.conf.in filename = re6st-registry.conf.in
md5sum = feb4b3318f37414d1bf3d16a03aec93d md5sum = 28ffb7a742e293139814f1324ff003ff
...@@ -84,6 +84,11 @@ ...@@ -84,6 +84,11 @@
"title": "Git backup repository", "title": "Git backup repository",
"description": "URL of Git repository where backups are pushed. Nothing is pushed if empty.", "description": "URL of Git repository where backups are pushed. Nothing is pushed if empty.",
"type": "string" "type": "string"
},
"community-conf": {
"title": "Community configuration",
"textarea": true,
"type": "string"
} }
} }
} }
...@@ -83,6 +83,15 @@ hello = {{ slapparameter_dict.get('hello', 15) }} ...@@ -83,6 +83,15 @@ hello = {{ slapparameter_dict.get('hello', 15) }}
min-protocol = {{ slapparameter_dict.get('min-protocol', -1) }} min-protocol = {{ slapparameter_dict.get('min-protocol', -1) }}
encrypt = {{ slapparameter_dict.get('encrypt', 'False') }} encrypt = {{ slapparameter_dict.get('encrypt', 'False') }}
same-country = {{ slapparameter_dict.get('same-country', '') }} same-country = {{ slapparameter_dict.get('same-country', '') }}
{%- set community = slapparameter_dict.get('community-conf') %}
{%- if community %}
community-path = ${re6st-community-conf:output}
[re6st-community-conf]
recipe = slapos.recipe.template
inline = {{ dumps(community) }}
output = ${re6stnet-dirs:conf}/community.conf
{%- endif %}
[re6st-registry-conf] [re6st-registry-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -30,3 +30,6 @@ max-clients {{ parameter_dict['max-clients'] }} ...@@ -30,3 +30,6 @@ max-clients {{ parameter_dict['max-clients'] }}
{% if parameter_dict.get('same-country') -%} {% if parameter_dict.get('same-country') -%}
same-country {{ parameter_dict['same-country'] }} same-country {{ parameter_dict['same-country'] }}
{% endif -%} {% endif -%}
{% if parameter_dict.get('community-path') -%}
community {{ parameter_dict['community-path'] }}
{% endif -%}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"default": { "default": {
"title": "Default", "title": "Default",
"description": "Re6st registry", "description": "Re6st registry",
"serialisation": "json-in-xml",
"request": "instance-re6stnet-input-schema.json", "request": "instance-re6stnet-input-schema.json",
"response": "instance-re6stnet-output-schema.json", "response": "instance-re6stnet-output-schema.json",
"index": 0 "index": 0
......
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