To install python-mistralclient, it is required to have pip (in most cases). Make sure that pip is installed. Then type:
pip install python-mistralclient
Or, if it is needed to install python-mistralclient from master branch, type:
pip install git+https://github.com/openstack/python-mistralclient.git
After python-mistralclient is installed you will see command mistral in your environment.
If Keystone is used for authentication in Mistral, then the environment should have auth variables:
export OS_AUTH_URL=http://<Keystone_host>:5000/v2.0
export OS_USERNAME=admin
export OS_TENANT_NAME=tenant
export OS_PASSWORD=secret
export OS_MISTRAL_URL=http://<Mistral host>:8989/v2 (optional, by default URL=http://localhost:8989/v2)
and in the case when you are authenticating against keystone over https:
export OS_CACERT=<path_to_ca_cert>
Note
In client, we can use both Keystone auth versions - v2.0 and v3. But server supports only v3.
You can see the list of available commands by typing:
mistral --help
To make sure Mistral client works, type:
mistral workbook-list
workbook-create:
usage: mistral workbook-create <definition>
Create new workbook.
workbook-delete:
usage: mistral workbook-delete <name> [<name> ...]
Delete workbook.
workbook-get:
usage: mistral workbook-get <name>
Show specific workbook.
workbook-get-definition:
usage: mistral workbook-get-definition <name>
Show workbook definition.
workbook-list:
usage: mistral workbook-list
List all workbooks.
workbook-update:
usage: mistral workbook-update <definition>
Update workbook.
workbook-validate:
usage: mistral workbook-validate <definition>
Validate workbook.
workflow-create:
usage: mistral workflow-create <definition> [--public]
Create new workflow.
workflow-delete:
usage: mistral workflow-delete <name> [<name> ...]
Delete workflow.
workflow-get:
usage: mistral workflow-get <name>
Show specific workflow.
workflow-get-definition:
usage: mistral workflow-get-definition <name>
Show workflow definition.
workflow-list:
usage: mistral workflow-list
List all workflows.
workflow-update:
usage: mistral workflow-update <definition>
Update workflow.
workflow-validate:
usage: mistral workflow-validate <definition>
Validate workflow.
action-create:
usage: mistral action-create <definition> [--public]
Create new action.
action-delete:
usage: mistral action-delete <name> [<name> ...]
Delete action.
action-get:
usage: mistral action-get <name>
Show specific action.
action-get-definition:
usage: mistral action-get-definition <name>
Show action definition.
action-list:
usage: mistral action-list
List all actions.
action-update:
usage: mistral action-update <definition>
Update action.
execution-create:
usage: mistral execution-create <workflow_name> [<workflow_input>] [<params>]
Create new execution.
-d DESCRIPTION, --description DESCRIPTION | |
Execution description |
execution-delete:
usage: mistral execution-delete <id> [<id> ...]
Delete execution.
execution-get:
usage: mistral execution-get <id>
Show specific execution.
execution-get-input:
usage: mistral execution-get-input <id>
Show execution input data.
execution-get-output:
usage: mistral execution-get-output <id>
Show execution output data.
execution-list:
usage: mistral execution-list
List all executions.
execution-update:
usage: mistral execution-update (-s {RUNNING,PAUSED,SUCCESS,ERROR} | -d <DESCRIPTION>) <id>
Update execution.
-d DESCRIPTION, --description DESCRIPTION | |
Execution description |
task-get:
usage: mistral task-get <id>
Show specific task.
task-get-published:
usage: mistral task-get-published <id>
Show task published variables.
task-get-result:
usage: mistral task-get-result <id>
Show task output data.
task-list:
usage: mistral task-list [<workflow_execution-id>]
List all tasks.
action-execution-get:
usage: mistral action-execution-get <id>
Show specific Action execution.
action-execution-get-input:
usage: mistral action-execution-get-input <id>
Show Action execution input data.
action-execution-get-output:
usage: mistral action-execution-get-output <id>
Show Action execution output data.
action-execution-list:
usage: mistral action-execution-list [<task-execution-id>]
List all Action executions.
action-execution-update:
usage: mistral action-execution-update [--state {IDLE,RUNNING,SUCCESS,ERROR}] [--output <OUTPUT>] <id>
Update specific Action execution.
–output OUTPUT - Action execution output
run-action:
usage: mistral run-action <name> [<input>] [-t <TARGET>]
Create new Action execution or just run specific action.
-s, –save-result - Save the result into DB. -t TARGET, –target TARGET
Action will be executed on <target> executor.
cron-trigger-create:
usage: mistral cron-trigger-create [--params <PARAMS>] [--pattern <* * * * *>]
[--first-time <YYYY-MM-DD HH:MM>]
[--count <integer>]
<name> <workflow_name> [<workflow_input>]
Create new trigger.
–params PARAMS - Workflow params. –pattern <* * * * *>
Cron trigger pattern.
--first-time <YYYY-MM-DD HH:MM> | |
Date and time of the first execution. | |
--count <integer> | |
Number of wanted executions. |
cron-trigger-delete:
usage: mistral cron-trigger-delete <name> [<name> ...]
Delete trigger.
cron-trigger-get:
usage: mistral cron-trigger-get <name>
Show specific cron trigger.
cron-trigger-list:
usage: mistral cron-trigger-list
List all cron triggers.
environment-create:
usage: mistral environment-create <file>
Create new environment.
environment-delete:
usage: mistral environment-delete <name> [<name> ...]
Delete environment.
environment-get:
usage: mistral environment-get <name>
Show specific environment.
environment-list:
usage: mistral environment-list
List all environments.
environment-update:
usage: mistral environment-update <file>
Update environment.