Browse Source

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
Dougal Matthews 9 months ago
parent
commit
e1e6c7a0cf
1 changed files with 5 additions and 10 deletions
  1. 5
    10
      doc/source/contributor/creating_custom_action.rst

+ 5
- 10
doc/source/contributor/creating_custom_action.rst View File

@@ -6,9 +6,9 @@ How to write a Custom Action
6 6
 
7 7
  .. code-block:: python
8 8
 
9
-    from mistral.actions import base
9
+    from mistral_lib import actions
10 10
 
11
-    class RunnerAction(base.Action):
11
+    class RunnerAction(actions.Action):
12 12
         def __init__(self, param):
13 13
             # store the incoming params
14 14
             self.param = param
@@ -27,15 +27,10 @@ How to write a Custom Action
27 27
    mistral.actions =
28 28
        example.runner = my.mistral_plugins.somefile:RunnerAction
29 29
 
30
-3. Reinstall Mistral if it was installed in system (not in virtualenv).
30
+3. Install the Python package containing the action. If this was added to
31
+   Mistral itself it will need to be reinstalled.
31 32
 
32
-4. Run db-sync tool via either
33
-
34
- .. code-block:: console
35
-
36
-    $ tools/sync_db.sh --config-file <path-to-config>
37
-
38
- or
33
+4. Run the following command so Mistral discovers the new action
39 34
 
40 35
  .. code-block:: console
41 36
 

Loading…
Cancel
Save