From e1e6c7a0cf58b6653469facf3cd8e529b9a8bf2c Mon Sep 17 00:00:00 2001 From: Dougal Matthews Date: Mon, 23 Jul 2018 14:14:40 +0100 Subject: [PATCH] Update the Custom Action documentation to use mistral-lib We should have updated this some time ago. Importing mistral itself hasn't been the best way to write actions for a while. Change-Id: I27df8865f8fef81fcfd1cb3de1a2bde6c6281cf6 --- doc/source/contributor/creating_custom_action.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/doc/source/contributor/creating_custom_action.rst b/doc/source/contributor/creating_custom_action.rst index 49d5eb1b2..23b50c74b 100644 --- a/doc/source/contributor/creating_custom_action.rst +++ b/doc/source/contributor/creating_custom_action.rst @@ -6,9 +6,9 @@ How to write a Custom Action .. code-block:: python - from mistral.actions import base + from mistral_lib import actions - class RunnerAction(base.Action): + class RunnerAction(actions.Action): def __init__(self, param): # store the incoming params self.param = param @@ -27,15 +27,10 @@ How to write a Custom Action mistral.actions = example.runner = my.mistral_plugins.somefile:RunnerAction -3. Reinstall Mistral if it was installed in system (not in virtualenv). +3. Install the Python package containing the action. If this was added to + Mistral itself it will need to be reinstalled. -4. Run db-sync tool via either - - .. code-block:: console - - $ tools/sync_db.sh --config-file - - or +4. Run the following command so Mistral discovers the new action .. code-block:: console