From 7494eefa82753b8b01feb049cf421520e05c4b5d Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Fri, 4 Sep 2015 17:04:49 +0300 Subject: [PATCH] Mistral documentation: CLI operations Note: Created a script for getting useful help info for each mistral command. Implements blueprint: mistral-docs-cli Change-Id: Ie04b4df523bad165f3a19e1879c856b07031e526 --- doc/source/guides/mistralclient_guide.rst | 484 +++++++++++++++++++++- 1 file changed, 476 insertions(+), 8 deletions(-) diff --git a/doc/source/guides/mistralclient_guide.rst b/doc/source/guides/mistralclient_guide.rst index 447f766d6..b9fd9f50f 100644 --- a/doc/source/guides/mistralclient_guide.rst +++ b/doc/source/guides/mistralclient_guide.rst @@ -45,39 +45,507 @@ Mistralclient commands Workbooks ^^^^^^^^^ -TBD +**workbook-create**: +:: + + usage: mistral workbook-create + +Create new workbook. + +positional arguments: + definition - Workbook definition file + +**workbook-delete**: +:: + + usage: mistral workbook-delete [ ...] + +Delete workbook. + +positional arguments: + name - Name of workbook(s). + +**workbook-get**: +:: + + usage: mistral workbook-get + +Show specific workbook. + +positional arguments: + name - Workbook name + +**workbook-get-definition**: +:: + + usage: mistral workbook-get-definition + +Show workbook definition. + +positional arguments: + name - Workbook name + +**workbook-list**: +:: + + usage: mistral workbook-list + +List all workbooks. + +**workbook-update**: +:: + + usage: mistral workbook-update + +Update workbook. + +positional arguments: + definition - Workbook definition file + +**workbook-validate**: +:: + + usage: mistral workbook-validate + +Validate workbook. + +positional arguments: + definition - Workbook definition file Workflows ^^^^^^^^^ -TBD +**workflow-create**: +:: + + usage: mistral workflow-create [--public] + +Create new workflow. + +positional arguments: + definition - Workflow definition file + +optional arguments: + --public - With this flag workflow will be marked as "public". + +**workflow-delete**: +:: + + usage: mistral workflow-delete [ ...] + +Delete workflow. + +positional arguments: + name - Name of workflow(s). + +**workflow-get**: +:: + + usage: mistral workflow-get + +Show specific workflow. + +positional arguments: + name - Workflow name + +**workflow-get-definition**: +:: + + usage: mistral workflow-get-definition + +Show workflow definition. + +positional arguments: + name - Workflow name + +**workflow-list**: +:: + + usage: mistral workflow-list + +List all workflows. + +**workflow-update**: +:: + + usage: mistral workflow-update + +Update workflow. + +positional arguments: + definition - Workflow definition. + +**workflow-validate**: +:: + + usage: mistral workflow-validate + +Validate workflow. + +positional arguments: + definition - Workflow definition file. Actions ^^^^^^^ -TBD +**action-create**: +:: + + usage: mistral action-create [--public] + +Create new action. + +positional arguments: + definition - Action definition file + +optional arguments: + --public - With this flag action will be marked as "public". + +**action-delete**: +:: + + usage: mistral action-delete [ ...] + +Delete action. + +positional arguments: + name - Name of action(s). + +**action-get**: +:: + + usage: mistral action-get + +Show specific action. + +positional arguments: + name - Action name. + +**action-get-definition**: +:: + + usage: mistral action-get-definition + +Show action definition. + +positional arguments: + name - Action name. + +**action-list**: +:: + + usage: mistral action-list + +List all actions. + +**action-update**: +:: + + usage: mistral action-update + +Update action. + +positional arguments: + definition - Action definition file. Workflow executions ^^^^^^^^^^^^^^^^^^^ -TBD +**execution-create**: +:: + + usage: mistral execution-create [] [] + +Create new execution. + +positional arguments: + workflow_name - Workflow name. + workflow_input - Workflow input. + params - Workflow additional parameters. + +optional arguments: + -d DESCRIPTION, --description DESCRIPTION + Execution description + +**execution-delete**: +:: + + usage: mistral execution-delete [ ...] + +Delete execution. + +positional arguments: + id - Id of execution identifier(s). + +**execution-get**: +:: + + usage: mistral execution-get + +Show specific execution. + +positional arguments: + id - Execution identifier + +**execution-get-input**: +:: + + usage: mistral execution-get-input + +Show execution input data. + +positional arguments: + id - Execution ID + +**execution-get-output**: +:: + + usage: mistral execution-get-output + +Show execution output data. + +positional arguments: + id - Execution ID + +**execution-list**: +:: + + usage: mistral execution-list + +List all executions. + +**execution-update**: +:: + + usage: mistral execution-update (-s {RUNNING,PAUSED,SUCCESS,ERROR} | -d ) + +Update execution. + +positional arguments: + id - Execution identifier + +optional arguments: + -s {RUNNING,PAUSED,SUCCESS,ERROR}, --state {RUNNING,PAUSED,SUCCESS,ERROR} + Execution state + -d DESCRIPTION, --description DESCRIPTION + Execution description Task executions ^^^^^^^^^^^^^^^ -TBD +**task-get**: +:: + + usage: mistral task-get + +Show specific task. + +positional arguments: + id - Task identifier + +**task-get-published**: +:: + + usage: mistral task-get-published + +Show task published variables. + +positional arguments: + id - Task ID + +**task-get-result**: +:: + + usage: mistral task-get-result + +Show task output data. + +positional arguments: + id - Task ID + +**task-list**: +:: + + usage: mistral task-list [] + +List all tasks. + +positional arguments: + workflow_execution-id - Workflow execution ID associated with list of Tasks. Action executions ^^^^^^^^^^^^^^^^^ -TBD +**action-execution-get**: +:: + + usage: mistral action-execution-get + +Show specific Action execution. + +positional arguments: + id - Action execution ID. + +**action-execution-get-input**: +:: + + usage: mistral action-execution-get-input + +Show Action execution input data. + +positional arguments: + id - Action execution ID. + +**action-execution-get-output**: +:: + + usage: mistral action-execution-get-output + +Show Action execution output data. + +positional arguments: + id - Action execution ID. + +**action-execution-list**: +:: + + usage: mistral action-execution-list [] + +List all Action executions. + +positional arguments: + task-execution-id - Task execution ID. + +**action-execution-update**: +:: + + usage: mistral action-execution-update [--state {IDLE,RUNNING,SUCCESS,ERROR}] [--output ] + +Update specific Action execution. + +positional arguments: + id - Action execution ID. + +optional arguments: + --state {IDLE,RUNNING,SUCCESS,ERROR} + Action execution state + --output OUTPUT - Action execution output + +**run-action**: +:: + + usage: mistral run-action [] [-t ] + +Create new Action execution or just run specific action. + +positional arguments: + name - Action name to execute. + input - Action input. + +optional arguments: + -s, --save-result - Save the result into DB. + -t TARGET, --target TARGET + Action will be executed on executor. Cron-triggers ^^^^^^^^^^^^^ -TBD +**cron-trigger-create**: +:: + + usage: mistral cron-trigger-create [--params ] [--pattern <* * * * *>] + [--first-time ] + [--count ] + [] + +Create new trigger. + +positional arguments: + name - Cron trigger name. + workflow_name - Workflow name. + workflow_input - Workflow input. + +optional arguments: + --params PARAMS - Workflow params. + --pattern <* * * * *> + Cron trigger pattern. + --first-time + Date and time of the first execution. + --count Number of wanted executions. + +**cron-trigger-delete**: +:: + + usage: mistral cron-trigger-delete [ ...] + +Delete trigger. + +positional arguments: + name - Name of cron trigger(s). + +**cron-trigger-get**: +:: + + usage: mistral cron-trigger-get + +Show specific cron trigger. + +positional arguments: + name - Cron trigger name. + +**cron-trigger-list**: +:: + + usage: mistral cron-trigger-list + +List all cron triggers. Environments ^^^^^^^^^^^^ -TBD +**environment-create**: +:: + + usage: mistral environment-create + +Create new environment. + +positional arguments: + file - Environment configuration file in JSON or YAML + +**environment-delete**: +:: + + usage: mistral environment-delete [ ...] + +Delete environment. + +positional arguments: + name - Name of environment(s). + +**environment-get**: +:: + + usage: mistral environment-get + +Show specific environment. + +positional arguments: + name - Environment name + +**environment-list**: +:: + + usage: mistral environment-list + +List all environments. + +**environment-update**: +:: + + usage: mistral environment-update + +Update environment. + +positional arguments: + file - Environment configuration file in JSON or YAML