Commit b5c45134 authored by Paul Graydon's avatar Paul Graydon

software/fluentd: Finalize instance parameter form

See merge request nexedi/slapos!1572
parent eb1b1a41
Pipeline #34366 failed with stage
in 0 seconds
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance-profile] [instance-profile]
filename = instance.cfg filename = instance.cfg
md5sum = 82c476f22e6b55b674640abef959c3c2 md5sum = 1fe38a024766347454ad7a3d9fb52d01
[template-fluentd] [template-fluentd]
filename = instance-fluentd.cfg filename = instance-fluentd.cfg
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
"description": "Parameters to instantiate Fluentd", "description": "Parameters to instantiate Fluentd",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"conf_text": { "conf-text": {
"description": "Fluentd configuration. You can write it entirely by yourself. See fluentd-agent.conf.jinja2.in", "title": "Configuration",
"default": "", "description": "Fluentd configuration. See: https://docs.fluentd.org/configuration",
"type": "string" "type": "string",
"textarea": true
} }
} }
} }
...@@ -42,7 +42,7 @@ recipe = slapos.recipe.build ...@@ -42,7 +42,7 @@ recipe = slapos.recipe.build
slapparameter-dict = $${slap-configuration:configuration} slapparameter-dict = $${slap-configuration:configuration}
init = init =
import re import re
options['text'] = options['slapparameter-dict'].get('conf_text') or ' ' options['text'] = options['slapparameter-dict'].get('conf-text') or ' '
options['port-list'] = re.findall(r'<source>.*port (\d+).*<\/source>', options['text'], re.DOTALL) options['port-list'] = re.findall(r'<source>.*port (\d+).*<\/source>', options['text'], re.DOTALL)
[fluentd-agent-conf] [fluentd-agent-conf]
......
{
"name": "Fluentd",
"description": "Fluentd",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"description": "Fluentd",
"request": "instance-input-schema.json",
"index": 0
}
}
}
...@@ -88,7 +88,7 @@ class WendelinTutorialTestCase(FluentdTestCase): ...@@ -88,7 +88,7 @@ class WendelinTutorialTestCase(FluentdTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'conf_text': cls._conf,} return {'conf-text': cls._conf,}
@classmethod @classmethod
def measureDict(cls): def measureDict(cls):
......
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