Files
mistral/doc/source/guides/cli_guide.rst
Dougal Matthews 3ad596ce57 Rework the CLI Guide
The previous version contained badly formatted reStructuredText which
caused rendering issues. It also contained the help output for commands,
but it wasn't updated or complete.

This new document tells used how to view and use the CLI so they can get
the help output easily themselves. This removes the rendering issues and
the need to keep this page updated.

Change-Id: Ic97185035ef22a9d6d291b9f396488139e8a7e2d
2017-04-06 15:25:38 +01:00

88 lines
3.4 KiB
ReStructuredText

Mistral Client Commands Guide
=============================
The Mistral CLI can be used with ``mistral`` command or via `OpenStackClient
<https://docs.openstack.org/developer/python-openstackclient/>`_.
Mistral Client
--------------
The best way to learn about all the commands and arguements that are expected
is to use the ``mistral help`` comand.
.. code-block:: bash
$ 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:: bash
$ 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
sinceMitaka.
...
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 togehter, but we can specify only the Mistral command group.
.. code-block:: bash
$ openstack command list --group openstack.workflow_engine.v2
+------------------------------+-----------------------------------+
| Command Group | Commands |
+------------------------------+-----------------------------------+
| openstack.workflow_engine.v2 | action definition create |
| | action definition 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:: bash
$ 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
sinceMitaka.
workflow_input Workflow input
params Workflow additional parameters