* Grouped documentation articles into several main parts: user docs, admin docs, developer docs. * Changed the index page so that it contains links to the index pages of the main documentation parts like user docs, admin docs etc. * Fixed all the broken links * Removed index generation since it's not informative at all in its current form and it exposes code internals (REST controller class names) * Removed obsolete properties that are no longer used by the "openstackdocstheme" project * Removed obsolete static html files * Moved part of the images to the folders where they are used Further work: * Refactor main chapters (user, admin, developer) one by one and make them look consistent. For example, there are several pages that provide similar kind of information: overview, quick start, main features etc. It is a mess that's been accumulated throughout the last 4-5 years. * Fill the gaps. Add all missing pages like: event notifications, workflow environment, etc. * Move cookbooks from Wiki to this doc. Partially implements: blueprint mistral-restructure-docs Change-Id: Ia722a6885ad2fb97d63a34285b0a5b1a23da79e8
1.1 KiB
1.1 KiB
How to write a Custom Action
- Write a class inherited from mistral.actions.base.Action
from mistral_lib import actions class RunnerAction(actions.Action): def __init__(self, param): # store the incoming params self.param = param def run(self): # return your results here return {'status': 0}
- Publish the class in a namespace (in your
setup.cfg)
[entry_points] mistral.actions = example.runner = my.mistral_plugins.somefile:RunnerAction
- Install the Python package containing the action. If this was added to Mistral itself it will need to be reinstalled.
- Run the following command so Mistral discovers the new action
$ mistral-db-manage --config-file <path-to-config> populate
- Now you can call the action
example.runner
my_workflow: tasks: my_action_task: action: example.runner input: param: avalue_to_pass_in