File: index.rst

package info (click to toggle)
mistral 21.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,140 kB
  • sloc: python: 54,052; sh: 701; makefile: 58
file content (99 lines) | stat: -rw-r--r-- 3,764 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
=============================
Mistral Client Commands Guide
=============================

The Mistral CLI can be used with ``mistral`` command or via ``openstack``.

Installation
------------

To install ``mistral`` and ``openstack`` via ``pip``:

.. code-block:: console

    $ pip install python-mistralclient python-openstackclient

See here for more info about `OpenStackClient
<https://docs.openstack.org/python-openstackclient/latest/>`_.

Mistral Client
--------------

The best way to learn about all the commands and arguments that are expected
is to use the ``mistral help`` command.

.. code-block:: console

    $ mistral help
    usage: mistral [--version] [-v] [--log-file LOG_FILE] [-q] [-h] [--debug]
                   [--os-mistral-url MISTRAL_URL]
                   [--os-mistral-version MISTRAL_VERSION]
                   [--os-mistral-service-type SERVICE_TYPE]
    ...

It can also be used with the name of a sub-command.

.. code-block:: console

    $ mistral help execution-create
    usage: mistral execution-create [-h] [-f {json,shell,table,value,yaml}]
                                    [-c COLUMN] [--max-width <integer>]
                                    [--print-empty] [--noindent] [--prefix PREFIX]
                                    [-d DESCRIPTION]
                                    workflow_identifier [workflow_input] [params]

    Create new execution.

    positional arguments:
      workflow_identifier   Workflow ID or name. Workflow name will be deprecated
                            since Mitaka.
    ...


OpenStack Client
----------------

OpenStack client works in a similar way, the command ``openstack help`` shows
all the available commands and then ``openstack help <sub-command>`` will show
the detailed usage.

The full list of Mistral commands that are registered with OpenStack client
can be listed with ``openstack command list``. By default it will list all
commands grouped together, but we can specify only the Mistral command group.

.. code-block:: console

    $ openstack command list --group openstack.workflow_engine.v2
    +------------------------------+-----------------------------------+
    | Command Group                | Commands                          |
    +------------------------------+-----------------------------------+
    | openstack.workflow_engine.v2 | action definition create          |
    |                              | action definition show |
    |                              | action definition delete          |
    |                              | action definition list            |
    |                              | action definition show            |
    |                              | action definition update          |
    |                              | action execution delete           |
    ...

Then detailed help output can be requested for an individual command.

.. code-block:: console

    $ openstack help workflow execution create
    usage: openstack workflow execution create [-h]
                                               [-f {json,shell,table,value,yaml}]
                                               [-c COLUMN] [--max-width <integer>]
                                               [--print-empty] [--noindent]
                                               [--prefix PREFIX] [-d DESCRIPTION]
                                               workflow_identifier
                                               [workflow_input] [params]

    Create new execution.

    positional arguments:
      workflow_identifier   Workflow ID or name. Workflow name will be deprecated
                            since Mitaka.
      workflow_input        Workflow input
      params                Workflow additional parameters