mistralclient(1)
| MISTRAL_CLIENT(1) | Mistral Client | MISTRAL_CLIENT(1) |
NAME
mistral_client - Mistral Client Documentation
This is a client for OpenStack Mistral API. There's a Python API (the mistralclient module), and a command-line script (installed as mistral).
USING MISTRALCLIENT
Using Mistral with OpenStack
The mistral shell utility interacts with OpenStack Mistral API from the command-line. It supports the features in the OpenStack Mistral API.
Basic Usage
In order to use the CLI, you must provide your OpenStack credentials (for both user and project), and auth endpoint. Use the corresponding configuration options (--os-username, --os-password, --os-project-name, --os-user-domain-id, os-project-domain-id, and --os-auth-url), but it is easier to set them in environment 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
When authenticating against keystone over https:
$ export OS_CACERT=<path_to_ca_cert>
Once you've configured your authentication parameters, you can run mistral commands. All commands take the form of:
mistral <command> [arguments...]
Run mistral --help to get a full list of all possible commands, and run mistral help <command> to get detailed help for that command.
Using Mistral with KeyCloak Server
Using Mistral to execute Workflows on an arbitrary cloud
It is possible to execute a workflow on any arbitrary cloud without additional configuration on the Mistral server side. It is possible to have Mistral use an external OpenStack cloud even when it isn't deployed in an OpenStack environment (i.e. no Keystone integration).
This setup is particularly useful when Mistral is used in standalone mode, where the Mistral service is not part of the OpenStack cloud and runs separately.
To enable this operation, the user can use --os-target-username, --os-target-password, --os-target-tenant-id, --os-target-tenant-name, --os-target-auth-token, --os-target-auth-url, --os-target_cacert, and --os-target-region-name parameters.
For example, the user can return the heat stack list with this setup as shown below:
$ mistral \
--os-target-auth-url=http://keystone2.example.com:5000/v3 \
--os-target-username=testuser \
--os-target-tenant=testtenant \
--os-target-password="MistralRuleZ" \
--os-mistral-url=http://mistral.example.com:8989/v2 \
run-action heat.stacks_list
The OS-TARGET-* parameters can be set in environment variables as:
$ export OS_TARGET_AUTH_URL=http://keystone2.example.com:5000/v3 $ export OS_TARGET_USERNAME=admin $ export OS_TARGET_TENANT_NAME=tenant $ export OS_TARGET_PASSWORD=secret $ export OS_TARGET_REGION_NAME=region
Note on the --os-target_cacert parameter
The --os-target_cacert parameter can be used to set a CA certificate for SSL communication with the target cloud's Keystone service. The CA certificate file is NOT transferred to the Mistral server. It is the responsibility of the user to ensure that the SSL Certificate is accessible for the Mistral Executor and SSL communication is possible with the target cloud. For testing purposes it is suggested to use the --target_insecure parameter.
Replicating Workflows with Mistral
The new command line switch '-s' will allow the operator to replicate / clone an existing workflow execution based on its ID. Once id is given mistral will create a new workflow execution based on the parameters of the first, which will provide a simple approach to spawning a number of workflow executions without having to specify inputs or parameters. Otherwise you can override some of the parameters (e.g. some of the input variables)
Basic Usage
From the command line the operator will issue the following. The first step would be to list the current executions, which is done with "execution-list". The following step is to take the listed execution id and pass it to the source execution switch "-s".
mistral execution-list mistral execution-create -s <execution id>
Once the workflow execution is selected and the replicate command used you should see a newly created workflow execution based on an existing one with a new execution id.
mistral execution-create -s 123e4567-e89b-12d3-a456-426655440000
| Field | Value |
| ID Workflow ID Workflow name Workflow namespace Description Task Execution ID State State info Created at Updated at | 123e4567-e89b-12d3-a456-77046883182e 123e4567-e89b-12d3-a456-45411dfa33af some.workflow.name.goes.here <none> RUNNING None 2018-01-25 18:41:07 2018-01-25 18:41:07 |
Python Mistral bindings class refrence
mistralclient
mistralclient package
Subpackages
mistralclient.api package
Subpackages
mistralclient.api.v2 package
Submodules
mistralclient.api.v2.action_executions module
- class mistralclient.api.v2.action_executions.ActionExecution(manager, data)
- Bases: Resource
- resource_name = 'ActionExecution'
- class mistralclient.api.v2.action_executions.ActionExecutionManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(name, input=None, namespace='', **params)
- delete(id)
- get(id)
- list(task_execution_id=None, limit=None, marker='', fields=None, sort_keys='', sort_dirs='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of ActionExecution
- update(id, state=None, output=None)
mistralclient.api.v2.actions module
- class mistralclient.api.v2.actions.Action(manager, data)
- Bases: Resource
- resource_name = 'Action'
- class mistralclient.api.v2.actions.ActionManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(definition, scope='private', namespace='')
- delete(identifier, namespace='')
- get(identifier, namespace='')
- list(marker='', limit=None, sort_keys='', sort_dirs='', fields='', namespace='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of Action
- update(definition, scope='private', id=None, namespace='')
- validate(definition)
mistralclient.api.v2.client module
- class mistralclient.api.v2.client.Client(auth_type='keystone', **kwargs)
- Bases: object
- MANAGERS = {'action_executions': <class 'mistralclient.api.v2.action_executions.ActionExecutionManager'>, 'actions': <class 'mistralclient.api.v2.actions.ActionManager'>, 'code_sources': <class 'mistralclient.api.v2.code_sources.CodeSourceManager'>, 'cron_triggers': <class 'mistralclient.api.v2.cron_triggers.CronTriggerManager'>, 'dynamic_actions': <class 'mistralclient.api.v2.dynamic_actions.DynamicActionManager'>, 'environments': <class 'mistralclient.api.v2.environments.EnvironmentManager'>, 'event_triggers': <class 'mistralclient.api.v2.event_triggers.EventTriggerManager'>, 'executions': <class 'mistralclient.api.v2.executions.ExecutionManager'>, 'members': <class 'mistralclient.api.v2.members.MemberManager'>, 'tasks': <class 'mistralclient.api.v2.tasks.TaskManager'>, 'workbooks': <class 'mistralclient.api.v2.workbooks.WorkbookManager'>, 'workflows': <class 'mistralclient.api.v2.workflows.WorkflowManager'>}
mistralclient.api.v2.code_sources module
- class mistralclient.api.v2.code_sources.CodeSource(manager, data)
- Bases: Resource
- resource_name = 'CodeSource'
- class mistralclient.api.v2.code_sources.CodeSourceManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(name, content, namespace='', scope='private')
- delete(identifier, namespace=None)
- get(identifier, namespace='')
- list(namespace='', marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of CodeSource
- update(identifier, content, namespace='', scope='private')
mistralclient.api.v2.cron_triggers module
- class mistralclient.api.v2.cron_triggers.CronTrigger(manager, data)
- Bases: Resource
- resource_name = 'CronTrigger'
- class mistralclient.api.v2.cron_triggers.CronTriggerManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(name, workflow_identifier, workflow_input=None, workflow_params=None, pattern=None, first_time=None, count=None)
- delete(name)
- get(name)
- list(marker='', limit=None, sort_keys='', fields='', sort_dirs='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of CronTrigger
mistralclient.api.v2.dynamic_actions module
- class mistralclient.api.v2.dynamic_actions.DynamicAction(manager, data)
- Bases: Resource
- resource_name = 'DynamicAction'
- class mistralclient.api.v2.dynamic_actions.DynamicActionManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(name, class_name, code_source, scope='private', namespace='')
- delete(identifier, namespace='')
- get(identifier, namespace='')
- list(marker='', limit=None, sort_keys='', sort_dirs='', fields='', namespace='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of DynamicAction
- update(identifier, class_name=None, code_source=None, scope='private', namespace='')
mistralclient.api.v2.environments module
- class mistralclient.api.v2.environments.Environment(manager, data)
- Bases: Resource
- resource_name = 'Environment'
- class mistralclient.api.v2.environments.EnvironmentManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(**kwargs)
- delete(name)
- get(name)
- list(marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of Environment
- update(**kwargs)
mistralclient.api.v2.event_triggers module
- class mistralclient.api.v2.event_triggers.EventTrigger(manager, data)
- Bases: Resource
- resource_name = 'EventTrigger'
- class mistralclient.api.v2.event_triggers.EventTriggerManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(name, workflow_id, exchange, topic, event, workflow_input=None, workflow_params=None)
- delete(id)
- get(id)
- list(marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of EventTrigger
mistralclient.api.v2.executions module
- class mistralclient.api.v2.executions.Execution(manager, data)
- Bases: Resource
- resource_name = 'Execution'
- class mistralclient.api.v2.executions.ExecutionManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(wf_identifier='', namespace='', workflow_input=None, description='', source_execution_id=None, **params)
- delete(id, force=None)
- get(id)
- get_ex_sub_executions(id, errors_only='', max_depth=-1)
- get_report(id, errors_only=True, max_depth=None, statistics_only=False)
- list(task=None, marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of Execution
- update(id, state, description=None, env=None)
mistralclient.api.v2.members module
- class mistralclient.api.v2.members.Member(manager, data)
- Bases: Resource
- resource_name = 'Member'
- class mistralclient.api.v2.members.MemberManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(resource_id, resource_type, member_id)
- delete(resource_id, resource_type, member_id)
- get(resource_id, resource_type, member_id=None)
- list(resource_id, resource_type)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of Member
- update(resource_id, resource_type, member_id='', status='accepted')
mistralclient.api.v2.tasks module
- class mistralclient.api.v2.tasks.Task(manager, data)
- Bases: Resource
- resource_name = 'Task'
- class mistralclient.api.v2.tasks.TaskManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- get(id)
- get_task_sub_executions(id, errors_only='', max_depth=-1)
- list(workflow_execution_id=None, marker='', limit=None, sort_keys='', sort_dirs='', fields=None, **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- rerun(task_ex_id, reset=True, env=None)
- resource_class
- alias of Task
mistralclient.api.v2.workbooks module
- class mistralclient.api.v2.workbooks.Workbook(manager, data)
- Bases: Resource
- resource_name = 'Workbook'
- class mistralclient.api.v2.workbooks.WorkbookManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(definition, namespace='', scope='private')
- delete(name, namespace='')
- get(name, namespace='')
- list(namespace='', marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of Workbook
- update(definition, namespace='', scope='private')
- validate(definition)
mistralclient.api.v2.workflows module
- class mistralclient.api.v2.workflows.Workflow(manager, data)
- Bases: Resource
- resource_name = 'Workflow'
- class mistralclient.api.v2.workflows.WorkflowManager(http_client, enforce_raw_definitions=False)
- Bases: ResourceManager
- create(definition, namespace='', scope='private')
- delete(identifier, namespace=None)
- get(identifier, namespace='')
- list(namespace='', marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class
- alias of Workflow
- update(definition, namespace='', scope='private', id=None)
- validate(definition)
Module contents
Submodules
mistralclient.api.base module
- exception mistralclient.api.base.APIException(error_code=None, error_message=None)
- Bases: Exception
- class mistralclient.api.base.Resource(manager, data)
- Bases: object
- defaults = {}
- resource_name = 'Something'
- to_dict()
- class mistralclient.api.base.ResourceManager(http_client, enforce_raw_definitions=False)
- Bases: object
- find(**kwargs)
- get_contents_if_file(contents_or_file_name)
- list()
- This is an abstract method
This is added here so that the find method gains some clarity. It must be implemented by the child class in order to find to work
- resource_class = None
- mistralclient.api.base.extract_json(response, response_key)
- mistralclient.api.base.get_json(response)
- Gets JSON representation of response.
This method provided backward compatibility with old versions of requests library.
mistralclient.api.client module
- mistralclient.api.client.client(auth_type='keystone', **kwargs)
- mistralclient.api.client.determine_client_version(mistral_version)
mistralclient.api.httpclient module
- class mistralclient.api.httpclient.HTTPClient(base_url, **kwargs)
- Bases: object
- delete(*args, **kwargs)
- get(*args, **kwargs)
- post(*args, **kwargs)
- put(*args, **kwargs)
- mistralclient.api.httpclient.log_request(func)
Module contents
mistralclient.auth package
Submodules
mistralclient.auth.auth_types module
mistralclient.auth.keycloak module
- class mistralclient.auth.keycloak.KeycloakAuthHandler
- Bases: AuthHandler
- authenticate(req, session=None)
- Performs authentication using Keycloak OpenID Protocol.
- Parameters
- •
- req --
Request dict containing list of parameters required for Keycloak authentication.
- •
- auth_url: Base authentication url of KeyCloak server (e.g.
- "https://my.keycloak:8443/auth"
- client_id: Client ID (according to OpenID Connect protocol).
- client_secret: Client secret (according to OpenID Connect
- protocol).
- project_name: KeyCloak realm name.
- username: User name (Optional, if None then access_token must be
- provided).
- api_key: Password (Optional).
- access_token: Access token. If passed, username and password are
- not used and this method just validates the token and refreshes it if needed (Optional, if None then username must be provided).
- cacert: SSL certificate file (Optional).
- insecure: If True, SSL certificate is not verified (Optional).
- •
- session -- Keystone session object. Not used by this plugin.
- mistralclient.auth.keycloak.get_system_ca_file()
- Return path to system default CA file.
mistralclient.auth.keystone module
- class mistralclient.auth.keystone.KeystoneAuthHandler
- Bases: AuthHandler
- authenticate(req, session=None)
- Perform authentication via Keystone.
- Parameters
- req -- Request dict containing the parameters required for Keystone authentication.
Module contents
- class mistralclient.auth.AuthHandler
- Bases: object
Abstract base class for an authentication plugin.
- abstractmethod authenticate(req)
- mistralclient.auth.get_auth_handler(auth_type)
mistralclient.commands package
Subpackages
mistralclient.commands.v2 package
Submodules
mistralclient.commands.v2.action_executions module
- class mistralclient.commands.v2.action_executions.ActionExecutionFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('workflow_name', 'Workflow name'), ('workflow_namespace', 'Workflow namespace'), ('task_name', 'Task name'), ('task_execution_id', 'Task ID'), ('state', 'State'), ('state_info', 'State info'), ('accepted', 'Accepted'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- LIST_COLUMN_FIELD_NAMES = ['id', 'name', 'workflow_name', 'workflow_namespace', 'task_name', 'task_execution_id', 'state', 'accepted', 'created_at', 'updated_at']
- LIST_COLUMN_HEADING_NAMES = ['ID', 'Name', 'Workflow name', 'Workflow namespace', 'Task name', 'Task ID', 'State', 'Accepted', 'Created at', 'Updated at']
- static format(action_ex=None, lister=False)
- class mistralclient.commands.v2.action_executions.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new Action execution or just run specific action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.Create (WARNING)>
- produce_output(parsed_args, column_names, data)
- Use the formatter to generate the output.
- Parameters
- parsed_args -- argparse.Namespace instance with argument values
- column_names -- sequence of strings containing names of output columns
- data -- iterable with values matching the column names
- Returns
- a status code
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.action_executions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete action execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.action_executions.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific Action execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.action_executions.GetInput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show Action execution input data.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.GetInput (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.action_executions.GetOutput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show Action execution output data.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.GetOutput (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.action_executions.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralExecutionLister
List all Action executions.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.List (WARNING)>
- class mistralclient.commands.v2.action_executions.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update specific Action execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.action_executions.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.actions module
- class mistralclient.commands.v2.actions.ActionFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('is_system', 'Is system'), ('input', 'Input'), ('description', 'Description'), ('tags', 'Tags'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(action=None, lister=False)
- class mistralclient.commands.v2.actions.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
Create new action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.Create (WARNING)>
- class mistralclient.commands.v2.actions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.actions.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.actions.GetDefinition(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show action definition.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.GetDefinition (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.actions.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all actions.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.List (WARNING)>
- class mistralclient.commands.v2.actions.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
Update action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.Update (WARNING)>
- class mistralclient.commands.v2.actions.Validate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Validate action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.actions.Validate (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.base module
- class mistralclient.commands.v2.base.MistralExecutionLister(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
- get_parser(parsed_args)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.base.MistralExecutionLister (WARNING)>
- take_action(parsed_args)
- Run command.
Return a tuple containing the column names and an iterable containing the data to be listed.
- class mistralclient.commands.v2.base.MistralFormatter
- Bases: object
- COLUMNS = []
- classmethod fields()
- static format(instance=None, lister=False)
- classmethod format_list(instance=None)
- classmethod headings()
- class mistralclient.commands.v2.base.MistralLister(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Lister
- get_parser(parsed_args)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.base.MistralLister (WARNING)>
- take_action(parsed_args)
- Run command.
Return a tuple containing the column names and an iterable containing the data to be listed.
- mistralclient.commands.v2.base.cut(string, length=25)
- mistralclient.commands.v2.base.get_duration_str(start_dt_str, end_dt_str)
- Builds a human friendly duration string.
- Parameters
- start_dt_str -- Start date time as an ISO string.
- end_dt_str -- End date time as an ISO string. If empty, duration is calculated from the current time.
- Returns
- Duration(delta) string.
- mistralclient.commands.v2.base.get_filters(parsed_args)
- mistralclient.commands.v2.base.wrap(string, width=25)
mistralclient.commands.v2.code_sources module
- class mistralclient.commands.v2.code_sources.CodeSourceFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('namespace', 'Namespace'), ('project_id', 'Project ID'), ('scope', 'Scope'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(code_src=None, lister=False)
- class mistralclient.commands.v2.code_sources.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new code source.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.code_sources.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.code_sources.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.code_sources.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.code_sources.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific code source.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.code_sources.GetContent(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show workflow definition.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.code_sources.GetContent (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.code_sources.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all workflows.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.code_sources.List (WARNING)>
- class mistralclient.commands.v2.code_sources.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.code_sources.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.cron_triggers module
- class mistralclient.commands.v2.cron_triggers.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new trigger.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.cron_triggers.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.cron_triggers.CronTriggerFormatter
- Bases: MistralFormatter
- COLUMNS = [('name', 'Name'), ('workflow_name', 'Workflow'), ('workflow_params', 'Params'), ('pattern', 'Pattern'), ('next_execution_time', 'Next execution time'), ('remaining_executions', 'Remaining executions'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(trigger=None, lister=False)
- class mistralclient.commands.v2.cron_triggers.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete trigger.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.cron_triggers.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.cron_triggers.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific cron trigger.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.cron_triggers.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.cron_triggers.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all cron triggers.
- log = <Logger mistralclient.commands.v2.cron_triggers.List (WARNING)>
mistralclient.commands.v2.dynamic_actions module
- class mistralclient.commands.v2.dynamic_actions.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.dynamic_actions.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.dynamic_actions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.dynamic_actions.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.dynamic_actions.DynamicActionFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('class_name', 'Class'), ('code_source_id', 'Code source ID'), ('code_source_name', 'Code source name'), ('project_id', 'Project ID'), ('scope', 'Scope'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(action=None, lister=False)
- class mistralclient.commands.v2.dynamic_actions.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific dynamic action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.dynamic_actions.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.dynamic_actions.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all dynamic actions.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.dynamic_actions.List (WARNING)>
- class mistralclient.commands.v2.dynamic_actions.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update dynamic action.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.dynamic_actions.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.environments module
- class mistralclient.commands.v2.environments.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new environment.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.environments.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.environments.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete environment.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.environments.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.environments.EnvironmentFormatter
- Bases: MistralFormatter
- COLUMNS = [('name', 'Name'), ('description', 'Description'), ('variables', 'Variables'), ('scope', 'Scope'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- LIST_COLUMN_FIELD_NAMES = ['name', 'description', 'scope', 'created_at', 'updated_at']
- LIST_COLUMN_HEADING_NAMES = ['Name', 'Description', 'Scope', 'Created at', 'Updated at']
- static format(environment=None, lister=False)
- class mistralclient.commands.v2.environments.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific environment.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.environments.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.environments.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all environments.
- log = <Logger mistralclient.commands.v2.environments.List (WARNING)>
- class mistralclient.commands.v2.environments.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update environment.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.environments.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.event_triggers module
- class mistralclient.commands.v2.event_triggers.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new trigger.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.event_triggers.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.event_triggers.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete trigger.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.event_triggers.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.event_triggers.EventTriggerFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('workflow_id', 'Workflow ID'), ('workflow_params', 'Params'), ('exchange', 'Exchange'), ('topic', 'Topic'), ('event', 'Event'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(trigger=None, lister=False)
- class mistralclient.commands.v2.event_triggers.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific event trigger.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.event_triggers.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.event_triggers.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all event triggers.
- log = <Logger mistralclient.commands.v2.event_triggers.List (WARNING)>
mistralclient.commands.v2.executions module
- class mistralclient.commands.v2.executions.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.executions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.executions.ExecutionFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('workflow_id', 'Workflow ID'), ('workflow_name', 'Workflow name'), ('workflow_namespace', 'Workflow namespace'), ('description', 'Description'), ('task_execution_id', 'Task Execution ID'), ('root_execution_id', 'Root Execution ID'), ('state', 'State'), ('state_info', 'State info'), ('created_at', 'Created at'), ('updated_at', 'Updated at'), ('duration', 'Duration', True)]
- static format(wf_ex=None, lister=False)
- class mistralclient.commands.v2.executions.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.executions.GetInput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show execution input data.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.GetInput (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.executions.GetOutput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show execution output data.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.GetOutput (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.executions.GetPublished(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show workflow global published variables.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.GetPublished (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.executions.GetReport(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Print execution report.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.GetReport (WARNING)>
- print_action_execution_entry(a_ex, level)
- print_line(line, level=0)
- print_report(report_json)
- print_statistics(stat)
- print_task_execution_entry(t_ex, level)
- print_workflow_execution_entry(wf_ex, level)
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.executions.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralExecutionLister
List all executions.
- get_parser(parsed_args)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.List (WARNING)>
- class mistralclient.commands.v2.executions.SubExecutionsBaseLister(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Lister
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- take_action(parsed_args)
- Run command.
Return a tuple containing the column names and an iterable containing the data to be listed.
- class mistralclient.commands.v2.executions.SubExecutionsLister(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: SubExecutionsBaseLister
- class mistralclient.commands.v2.executions.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update execution.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.executions.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.members module
- class mistralclient.commands.v2.members.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Shares a resource to another tenant.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.members.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.members.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete a resource sharing relationship.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.members.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.members.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific member information.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.members.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.members.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all members.
- get_parser(parsed_args)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.members.List (WARNING)>
- class mistralclient.commands.v2.members.MemberFormatter
- Bases: MistralFormatter
- COLUMNS = [('resource_id', 'Resource ID'), ('resource_type', 'Resource Type'), ('project_id', 'Resource Owner'), ('member_id', 'Member ID'), ('status', 'Status'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(member=None, lister=False)
- class mistralclient.commands.v2.members.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update resource sharing status.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.members.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
mistralclient.commands.v2.tasks module
- class mistralclient.commands.v2.tasks.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific task.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.tasks.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.tasks.GetPublished(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show task published variables.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.tasks.GetPublished (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.tasks.GetResult(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show task output data.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.tasks.GetResult (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.tasks.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralExecutionLister
List all tasks.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.tasks.List (WARNING)>
- class mistralclient.commands.v2.tasks.Rerun(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Rerun an existing task.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.tasks.Rerun (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.tasks.SubExecutionsLister(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: SubExecutionsBaseLister
- class mistralclient.commands.v2.tasks.TaskFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('workflow_name', 'Workflow name'), ('workflow_namespace', 'Workflow namespace'), ('workflow_execution_id', 'Workflow Execution ID'), ('state', 'State'), ('state_info', 'State info'), ('created_at', 'Created at'), ('started_at', 'Started at'), ('finished_at', 'Finished at'), ('duration', 'Duration', True)]
- static format(task=None, lister=False)
mistralclient.commands.v2.workbooks module
- class mistralclient.commands.v2.workbooks.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Create new workbook.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workbooks.Create (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.workbooks.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete workbook.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workbooks.Delete (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.workbooks.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific workbook.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workbooks.Get (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.workbooks.GetDefinition(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show workbook definition.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workbooks.GetDefinition (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.workbooks.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all workbooks.
- log = <Logger mistralclient.commands.v2.workbooks.List (WARNING)>
- class mistralclient.commands.v2.workbooks.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Update workbook.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workbooks.Update (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.workbooks.Validate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Validate workbook.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workbooks.Validate (WARNING)>
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.workbooks.WorkbookFormatter
- Bases: MistralFormatter
- COLUMNS = [('name', 'Name'), ('namespace', 'Namespace'), ('tags', 'Tags'), ('scope', 'Scope'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(workbook=None, lister=False)
mistralclient.commands.v2.workflows module
- class mistralclient.commands.v2.workflows.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
Create new workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workflows.Create (WARNING)>
- class mistralclient.commands.v2.workflows.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Delete workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.workflows.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Show specific workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.workflows.GetDefinition(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Show workflow definition.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.commands.v2.workflows.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
List all workflows.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workflows.List (WARNING)>
- class mistralclient.commands.v2.workflows.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: MistralLister
Update workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- log = <Logger mistralclient.commands.v2.workflows.Update (WARNING)>
- class mistralclient.commands.v2.workflows.Validate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: ShowOne
Validate workflow.
- get_parser(prog_name)
- Return an argparse.ArgumentParser.
- take_action(parsed_args)
- Return a two-part tuple with a tuple of column names and a tuple of values.
- class mistralclient.commands.v2.workflows.WorkflowFormatter
- Bases: MistralFormatter
- COLUMNS = [('id', 'ID'), ('name', 'Name'), ('namespace', 'Namespace'), ('project_id', 'Project ID'), ('tags', 'Tags'), ('input', 'Input'), ('scope', 'Scope'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]
- static format(workflow=None, lister=False)
Module contents
Module contents
mistralclient.osc package
Submodules
mistralclient.osc.plugin module
OpenStackClient plugin for Workflow service.
- mistralclient.osc.plugin.build_option_parser(parser)
- Hook to add global options.
- mistralclient.osc.plugin.make_client(instance)
- Returns a workflow_engine service client.
Module contents
Submodules
mistralclient.exceptions module
- exception mistralclient.exceptions.IllegalArgumentException(message=None)
- Bases: MistralClientException
- code = 'ILLEGAL_ARGUMENT_EXCEPTION'
- message = 'IllegalArgumentException occurred'
- exception mistralclient.exceptions.MistralClientException(message='An unknown exception occurred')
- Bases: Exception
Base Exception for Mistral client
To correctly use this class, inherit from it and define a 'message' and 'code' properties.
- code = 'UNKNOWN_EXCEPTION'
- message = 'An unknown exception occurred'
mistralclient.i18n module
oslo.i18n integration module. See https://docs.openstack.org/oslo.i18n/latest/user/usage.html
mistralclient.shell module
Command-line interface to the Mistral APIs
- class mistralclient.shell.BashCompletionCommand(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
- Bases: Command
Prints all of the commands and options for bash-completion.
- log = <Logger mistralclient.shell.BashCompletionCommand (WARNING)>
- take_action(parsed_args)
- Override to do something useful.
The returned value will be returned by the program.
- class mistralclient.shell.HelpAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)
- Bases: Action
Custom help action.
Provide a custom action so the -h and --help options to the main app will print a list of the commands.
The commands are determined by checking the CommandManager instance, passed in as the "default" value for the action.
- class mistralclient.shell.MistralShell
- Bases: App
- build_option_parser(description, version, argparse_kwargs=None)
- Return an argparse option parser for this application.
Subclasses may override this method to extend the parser with more global options.
- Parameters
- description (str) -- full description of the application
- version (str) -- version number for the application
- argparse_kwargs -- extra keyword argument passed to the ArgumentParser constructor
- configure_logging()
- Create logging handlers for any log output.
- initialize_app(argv)
- Hook for subclasses to take global initialization action after the arguments are parsed but before a command is run. Invoked only once, even in interactive mode.
- Parameters
- argv -- List of arguments, including the subcommand to run. Empty for interactive mode.
- class mistralclient.shell.OpenStackHelpFormatter(prog, indent_increment=2, max_help_position=32, width=None)
- Bases: HelpFormatter
- start_section(heading)
- mistralclient.shell.env(*args, **kwargs)
- Returns the first environment variable set.
If all are empty, defaults to '' or keyword arg default.
- mistralclient.shell.main(argv=['-b', 'man', 'doc/source', 'man'])
mistralclient.utils module
- mistralclient.utils.do_action_on_many(action, resources, success_msg, error_msg)
- Helper to run an action on many resources.
- mistralclient.utils.get_contents_if_file(contents_or_file_name)
- Get the contents of a file.
If the value passed in is a file name or file URI, return the contents. If not, or there is an error reading the file contents, return the value passed in as the contents.
For example, a workflow definition will be returned if either the workflow definition file name, or file URI are passed in, or the actual workflow definition itself is passed in.
- mistralclient.utils.load_content(content)
- mistralclient.utils.load_file(path)
- mistralclient.utils.load_json(input_string)
Module contents
For information about using the mistral command-line client, see Workflow service command-line client.
PYTHON API REFERENCE
- •
- REST API Specification
FOR CONTRIBUTORS
- •
- If you are a new contributor to python-mistralclient please refer: So You Want to Contribute...
So You Want to Contribute...
For general information on contributing to OpenStack, please check out the contributor guide to get started. It covers all the basics that are common to all OpenStack projects: the accounts you need, the basics of interacting with our Gerrit review system, how we communicate as a community, etc. Below will cover the more project specific information you need to get started with python-mistralclient.
Communication
- IRC channel #openstack-mistralclient at OFTC
- Mailing list (prefix subjects with [mistral] for faster responses) http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss
Contacting the Core Team
Please refer the python-mistralclient Core Team contacts.
New Feature Planning
python-mistralclient features are tracked on Launchpad.
Task Tracking
We track our tasks in Launchpad. If you're looking for some smaller, easier work item to pick up and get started on, search for the 'low-hanging-fruit' tag.
Reporting a Bug
You found an issue and want to make sure we are aware of it? You can do so on Launchpad.
Getting Your Patch Merged
All changes proposed to the python-mistralclient project require one or two +2 votes from python-mistralclient core reviewers before one of the core reviewers can approve patch by giving Workflow +1 vote.
Project Team Lead Duties
All common PTL duties are enumerated in the PTL guide.
AUTHOR
Mistral Contributors
COPYRIGHT
2016, Mistral Contributors
| October 24, 2025 | 6.0.0 |
