diff --git a/packs/tests/actions/render_config_context.py b/packs/tests/actions/render_config_context.py new file mode 100644 index 0000000..97ab48f --- /dev/null +++ b/packs/tests/actions/render_config_context.py @@ -0,0 +1,7 @@ +from st2common.runners.base_action import Action + + +class PrintPythonVersionAction(Action): + + def run(self, value1): + return {"context_value": value1} diff --git a/packs/tests/actions/render_config_context.yaml b/packs/tests/actions/render_config_context.yaml new file mode 100644 index 0000000..e67d323 --- /dev/null +++ b/packs/tests/actions/render_config_context.yaml @@ -0,0 +1,12 @@ +--- +name: render_config_context +runner_type: python-script +description: Action that uses config context +enabled: true +entry_point: render_config_context.py +parameters: + value1: + description: Input for render_config_context. Defaults to config_context value. + required: false + type: "string" + default: "{{ config_context.config_item_one }}" diff --git a/packs/tests/config.schema.yaml b/packs/tests/config.schema.yaml new file mode 100644 index 0000000..2e98ce6 --- /dev/null +++ b/packs/tests/config.schema.yaml @@ -0,0 +1,6 @@ +--- +config_item_one: + description: "Item use to test config context." + type: "string" + required: true + default: "Testing"