MISTRAL_CLIENT(1)
๐ MISTRAL_CLIENT(1) โ Mistral Client, but make it a vibe
okay so bestie, this is the manual page for MISTRAL_CLIENT(1), and the manual name is literally Mistral Client ๐ we're folding that in right at the top because we're polite like that. This page is long, so buckle up โ more parts are coming, so don't go anywhere. ๐ฆ
โจ NAME โจ
mistral_client โ Mistral Client Documentation ๐
This is a client for the OpenStack Mistral API. There's a Python API (the mistralclient module), and a command-line script (installed as mistral). No cap, that's the whole name situation.
๐ธ USING MISTRALCLIENT ๐ธ
๐ Using Mistral with OpenStack
The mistral shell utility interacts with the OpenStack Mistral API from the command-line. It supports the features in the OpenStack Mistral API. Fr fr, that's the whole point.
๐ฆ 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. Highkey the env var route is the move.
$ 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. Iconic honestly โ help is right there, use it. ๐
๐ Using Mistral with KeyCloak Server
that's the whole heading, bestie โ there's literally no body text under this one in the original. We're just vibing with the section title. ๐
โญ 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). Big slay energy.
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. ๐ like, read that twice, it matters.
๐ฅ 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). Clutch, honestly.
๐ 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 โ 123e4567-e89b-12d3-a456-77046883182e โ
โ โ โ
โ Workflow ID โ 123e4567-e89b-12d3-a456-45411dfa33af โ
โ โ โ
โ Workflow name โ some.workflow.name.goes.here โ
โ โ โ
โ Workflow namespace โ <none> โ
โ โ โ
โ Description โ RUNNING โ
โ โ โ
โ Task Execution ID โ None โ
โ โ โ
โ State โ 2018-01-25 18:41:07 โ
โ โ โ
โ State info โ 2018-01-25 18:41:07 โ
โ โ โ
โ Created at โ โ
โ โ โ
โ Updated at โ โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Python Mistral bindings class refrence
(yes, that's spelled refrence in the original โ we don't fix, we preserve ๐
)
๐ซถ 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:Resourceresource_name = 'ActionExecution'
class mistralclient.api.v2.action_executions.ActionExecutionManager(http_client, enforce_raw_definitions=False)โ Bases:ResourceManagercreate(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 ofActionExecutionupdate(id, state=None, output=None)
๐บ mistralclient.api.v2.actions module
class mistralclient.api.v2.actions.Action(manager, data)โ Bases:Resourceresource_name = 'Action'
class mistralclient.api.v2.actions.ActionManager(http_client, enforce_raw_definitions=False)โ Bases:ResourceManagercreate(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 ofActionupdate(definition, scope='private', id=None, namespace='')validate(definition)
๐ mistralclient.api.v2.client module
class mistralclient.api.v2.client.Client(auth_type='keystone', **kwargs)โ Bases:objectMANAGERS = {'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:Resourceresource_name = 'CodeSource'
class mistralclient.api.v2.code_sources.CodeSourceManager(http_client, enforce_raw_definitions=False)โ Bases:ResourceManagercreate(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 ofCodeSourceupdate(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)โ spin up a brand new cron trigger, no cap โจdelete(name)โ yeet the one with this name ๐get(name)โ grab one by namelist(marker='', limit=None, sort_keys='', fields='', sort_dirs='', **filters)โ okay so this one's an abstract method. It's only chillin' here sofindreads a little clearer, and the child class has to implement it orfindliterally will not work. periodt.
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='')โ new dynamic action, let's gooo ๐ฅ (defaults:scope='private',namespace='')delete(identifier, namespace='')โ gone, bye ๐get(identifier, namespace='')โ fetch a single onelist(marker='', limit=None, sort_keys='', sort_dirs='', fields='', namespace='', **filters)โ abstract method energy ๐ซถ it exists here purely sofindhas some clarity, and the child class must implement it forfindto work at all.update(identifier, class_name=None, code_source=None, scope='private', namespace='')โ glow-up time ๐
resource_class โ alias of DynamicAction
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)โ make a new environment, pass whatever you need ๐delete(name)โ delete by nameget(name)โ get by namelist(marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)โ abstract method bestie ๐ญ it's here sofindgains clarity, and the child class has to implement it so thatfindworks.update(**kwargs)โ update it with whatever kwargs you've got
resource_class โ alias of Environment
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)โ new event trigger, iconic ๐delete(id)โ remove byidget(id)โ look one up byidlist(marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)โ yep, abstract method again ๐ dropped in here forfindclarity, and the child class must implement it orfinddoesn't 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)โ start an execution โจ note the defaults, bestie:wf_identifier='',namespace='',workflow_input=None,description='',source_execution_id=None, plus**paramsdelete(id, force=None)โ delete byid, withforcethere if you're feeling aggressive ๐get(id)โ get one byidget_ex_sub_executions(id, errors_only='', max_depth=-1)โ peep the sub-executions of an execution (defaultserrors_only='',max_depth=-1)get_report(id, errors_only=True, max_depth=None, statistics_only=False)โ pull the report ๐ defaults areerrors_only=True,max_depth=None,statistics_only=Falselist(task=None, marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)โ abstract method, as always ๐ซถ here forfindclarity; child class must implement it forfindto work.update(id, state, description=None, env=None)โ update thestate, and optionallydescription/env
resource_class โ alias of Execution
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)โ add a member ๐delete(resource_id, resource_type, member_id)โ remove a memberget(resource_id, resource_type, member_id=None)โ get a member (or don't passmember_id, no pressure)list(resource_id, resource_type)โ abstract method bestie ๐ญ added here sofindgains clarity, and the child class must implement it forfindto work.update(resource_id, resource_type, member_id='', status='accepted')โ flip the status, defaultstatus='accepted'๐
resource_class โ alias of Member
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)โ grab a task byidget_task_sub_executions(id, errors_only='', max_depth=-1)โ the sub-executions belonging to that task (defaultserrors_only='',max_depth=-1)list(workflow_execution_id=None, marker='', limit=None, sort_keys='', sort_dirs='', fields=None, **filters)โ abstract method ๐ซถ here sofindgains clarity; the child class must implement it sofindworks. also lowkey notefields=Nonehere, notfields=''๐rerun(task_ex_id, reset=True, env=None)โ run it back ๐ defaultsreset=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')โ new workbook from adefinitionโจdelete(name, namespace='')โ delete bynameget(name, namespace='')โ get bynamelist(namespace='', marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)โ abstract method, you know the drill ๐ญ added sofindhas clarity, and the child class must implement it forfindto work.update(definition, namespace='', scope='private')โ update from adefinitionvalidate(definition)โ vibe check thatdefinitionfor us ๐ธ
resource_class โ alias of Workbook
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')โ new workflow, go off ๐ฅdelete(identifier, namespace=None)โ delete it (heads up:namespace=Nonehere, not''๐)get(identifier, namespace='')โ get one byidentifierlist(namespace='', marker='', limit=None, sort_keys='', sort_dirs='', fields='', **filters)โ abstract method bestie ๐ซถ here sofindgains clarity; child class has to implement it forfindto work.update(definition, namespace='', scope='private', id=None)โ update from adefinition, optionally pass anidvalidate(definition)โ validate thatdefinition๐
resource_class โ alias of Workflow
Module contents
Submodules
mistralclient.api.base module
exception mistralclient.api.base.APIException(error_code=None, error_message=None)โ Bases:Exceptionclass mistralclient.api.base.Resource(manager, data)โ Bases:objectdefaults = {}resource_name = 'Something'to_dict()
class mistralclient.api.base.ResourceManager(http_client, enforce_raw_definitions=False)โ Bases:objectfind(**kwargs)get_contents_if_file(contents_or_file_name)list()โ abstract method ๐ญ added here sofindgains some clarity, and the child class must implement it in order forfindto 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:objectdelete(*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
(nothing listed under this one โ it's just vibes in there ๐)
mistralclient.auth.keycloak module
class mistralclient.auth.keycloak.KeycloakAuthHandlerโ Bases:AuthHandlerauthenticate(req, session=None)โ Performs authentication using Keycloak OpenID Protocol. ๐- Parameters:
reqโ โฆ
- Parameters:
auth_url: the base authentication url of the KeyCloak server โ like, e.g."https://my.keycloak:8443/auth"client_id: the Client ID (according to the OpenID Connect protocol). ๐client_secret: the Client secret (according to the OpenID Connect protocol).project_name: the KeyCloak realm name.username: the user name (Optional โ if it'sNonethenaccess_tokenmust be provided).api_key: the password (Optional).access_token: the access token. If it's passed,usernameand password are not used and this method just validates the token and refreshes it if needed (Optional โ if it'sNonethenusernamemust be provided).cacert: the SSL certificate file (Optional).insecure: ifTrue, the SSL certificate is not verified (Optional). ๐ซฃsessionโ a Keystone session object. Not used by this plugin, bestie, it's just vibing there.
๐ฆ mistralclient.auth.keycloak.get_system_ca_file()
Return the path to the system default CA file. that's it, that's the whole function โจ
๐ mistralclient.auth.keystone module
class mistralclient.auth.keystone.KeystoneAuthHandler
Bases: AuthHandler โ yep, that one, the <#mistralclient.auth.AuthHandler> one.
authenticate(req, session=None) โ perform authentication via Keystone, no cap.
Parameters:
reqโ the Request dict containing the parameters required for Keystone authentication.
๐ฆ Module contents
class mistralclient.auth.AuthHandler
Bases: object
The abstract base class for an authentication plugin. icon behavior tbh ๐
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 (the <#mistralclient.commands.v2.base.MistralFormatter> one)
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 a new Action execution, or literally just run a specific action. both?? yes. โจ
get_parser(prog_name)โ Return anargparse.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โ anargparse.Namespaceinstance with argument valuescolumn_namesโ sequence of strings containing names of output columnsdataโ iterable with values matching the column names
Returns: a status code
take_action(parsed_args)โ run command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class mistralclient.commands.v2.action_executions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete action execution. bye bestie ๐
get_parser(prog_name)โ Return anargparse.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 a specific Action execution. ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.
log = <Logger mistralclient.commands.v2.action_executions.Get (WARNING)>
take_action(parsed_args)โ run command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class mistralclient.commands.v2.action_executions.GetInput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Show the Action execution input data.
get_parser(prog_name)โ Return anargparse.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 the Action execution output data.
get_parser(prog_name)โ Return anargparse.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 (you know the one, <#mistralclient.commands.v2.base.MistralExecutionLister>)
List all the Action executions. every single one, fr fr ๐
get_parser(prog_name)โ Return anargparse.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 a specific Action execution. glow-up time ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.
log = <Logger mistralclient.commands.v2.action_executions.Update (WARNING)>
take_action(parsed_args)โ run command. Returns a tuple containing the column names and an iterable containing the data to be listed.
๐ฆ mistralclient.commands.v2.actions module
class mistralclient.commands.v2.actions.ActionFormatter
Bases: MistralFormatter (<#mistralclient.commands.v2.base.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 (<#mistralclient.commands.v2.base.MistralLister>)
Create a new action. โจ
get_parser(prog_name)โ Return anargparse.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 an action. gone, reduced to atoms ๐ซ
get_parser(prog_name)โ Return anargparse.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 a specific action.
get_parser(prog_name)โ Return anargparse.ArgumentParser.
log = <Logger mistralclient.commands.v2.actions.Get (WARNING)>
take_action(parsed_args)โ run command. Returns a tuple containing the column names and an iterable containing the data to be listed.
class mistralclient.commands.v2.actions.GetDefinition(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Show the action definition.
get_parser(prog_name)โ Return anargparse.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 (<#mistralclient.commands.v2.base.MistralLister>)
List all actions. every last one ๐๏ธ
get_parser(prog_name)โ Return anargparse.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 (<#mistralclient.commands.v2.base.MistralLister>)
Update an action.
get_parser(prog_name)โ hands you back anargparse.ArgumentParser. that's it, that's the whole vibe ๐log = <Logger mistralclient.commands.v2.actions.Update (WARNING)>โ the logger living its best life at WARNING level.
class mistralclient.commands.v2.actions.Validate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne โ yeah, the same ShowOne base class, it's giving main character energy โจ
Validate action. that's the job, bestie โ validation, no cap ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.actions.Validate (WARNING)>โ WARNING level, iconic as always.take_action(parsed_args)โ Run command.
Return a tuple containing the column names and an iterable containing the data to be listed. yes, that exact tuple shape, don't @ me ๐ญ
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 anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.base.MistralExecutionLister (WARNING)>โ WARNING, periodt.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 = []โ empty list, a blank canvas, we love a fresh start ๐ธ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 anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.base.MistralLister (WARNING)>โ yes bestie, 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)
exactly that signature, length defaults to 25 ๐
mistralclient.commands.v2.base.get_duration_str(start_dt_str, end_dt_str)
Builds a human friendly duration string. literally doing the math so you don't have to ๐งฎโจ
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)
that's it, that's the function ๐ฆ
mistralclient.commands.v2.base.wrap(string, width=25)
again with the width=25 default, consistent queen ๐
mistralclient.commands.v2.code_sources module ๐
class mistralclient.commands.v2.code_sources.CodeSourceFormatter
Bases: MistralFormatter (the one from mistralclient.commands.v2.base)
COLUMNS = [('id', 'ID'), ('name', 'Name'), ('namespace', 'Namespace'), ('project_id', 'Project ID'), ('scope', 'Scope'), ('created_at', 'Created at'), ('updated_at', 'Updated at')]โ the whole column lineup, look at her go ๐ฅ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. new code source just dropped โจ
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.code_sources.Create (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.code_sources.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete workflow. (yes the docstring says workflow, we don't ask questions, we copy exactly ๐)
get_parser(prog_name)โ Return anargparse.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. the specific one, not the other ones ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.take_action(parsed_args)โ Run command.
Return a tuple containing the column names and an iterable containing the data to be listed.
heads up bestie: this one has no log line in the listing, and I'm not out here inventing one ๐
class mistralclient.commands.v2.code_sources.GetContent(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Show workflow definition. the whole definition, we're getting into the lore ๐
get_parser(prog_name)โ Return anargparse.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 (from mistralclient.commands.v2.base)
List all workflows. all of them. every last one ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.code_sources.List (WARNING)>
and yep, notake_actionlisted here either โ justget_parserandlog, keeping it mysterious ๐
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 anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.code_sources.Update (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.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. new trigger, new era ๐ฆ
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.cron_triggers.Create (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.cron_triggers.CronTriggerFormatter
Bases: MistralFormatter (from mistralclient.commands.v2.base)
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')]โ the full column roster, ate and left no crumbs ๐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. gone, reduced to atoms ๐
get_parser(prog_name)โ Return anargparse.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. this specific one, bestie โจ
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.cron_triggers.Get (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.cron_triggers.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: MistralLister (from mistralclient.commands.v2.base)
List all cron triggers.
log = <Logger mistralclient.commands.v2.cron_triggers.List (WARNING)>
only thelogline here โ noget_parser, notake_action. sometimes less is more ๐
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. dynamic action incoming, watch this space ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.dynamic_actions.Create (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.dynamic_actions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete action. bye bestie ๐
get_parser(prog_name)โ Return anargparse.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 (from mistralclient.commands.v2.base)
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')]โ every single column, immortalized ๐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. the specific one, respectfully ๐
get_parser(prog_name)โ Return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.dynamic_actions.Get (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.dynamic_actions.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: MistralLister
okay so this one is literally just "list all the dynamic actions" โ every single one, no gatekeeping ๐
get_parser(prog_name)โ hands you back anargparse.ArgumentParser, that's the whole vibe โจ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
the glow-up command fr fr โ this is the update dynamic action one ๐ฆ
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.dynamic_actions.Update (WARNING)>take_action(parsed_args)โ runs the command, and returns a tuple with the column names plus an iterable holding the data to be listed (iykyk, standard lister behavior)
mistralclient.commands.v2.environments module
okay bestie, whole new module, whole new vibe check ๐ธ
class mistralclient.commands.v2.environments.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Create new environment โ yes, brand new, fresh out the box ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.environments.Create (WARNING)>take_action(parsed_args)โ runs the command, returns a tuple of column names + an iterable of the data to be listed
class mistralclient.commands.v2.environments.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete environment โ it's giving cleanup era ๐ง (note the app type is _app.App here, not just App, okay? details matter โจ)
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.environments.Delete (WARNING)>take_action(parsed_args)โ override this to do something useful; whatever it returns is what the program returns, periodt
class mistralclient.commands.v2.environments.EnvironmentFormatter
Bases: MistralFormatter
the actual format queen ๐ here's all her constants, no cap:
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)โ yup, it's static and it takes those two optional args ๐
class mistralclient.commands.v2.environments.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Show specific environment โ main character energy for one env only ๐ฅ
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.environments.Get (WARNING)>take_action(parsed_args)โ runs the command, returns the column names + an iterable of data to be listed
class mistralclient.commands.v2.environments.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: MistralLister
List all environments โ every last one, collected ๐
log = <Logger mistralclient.commands.v2.environments.List (WARNING)>
(no get_parser or take_action shown here, so don't come for me โ this is literally all she wrote ๐)
class mistralclient.commands.v2.environments.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Update environment โ giving that environment a little refresh โจ
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.environments.Update (WARNING)>take_action(parsed_args)โ runs the command, returns a tuple of column names and an iterable of the data to be listed
mistralclient.commands.v2.event_triggers module
triggers, triggers, triggers โ okay let's go ๐
class mistralclient.commands.v2.event_triggers.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Create new trigger โ new trigger just dropped ๐ฅ
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.event_triggers.Create (WARNING)>take_action(parsed_args)โ runs the command, returns the column names plus an iterable of the data to be listed
class mistralclient.commands.v2.event_triggers.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete trigger โ bye bye trigger ๐ (again with the _app.App type, keep up bestie)
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.event_triggers.Delete (WARNING)>take_action(parsed_args)โ override to do something useful; the returned value is what the program returns
class mistralclient.commands.v2.event_triggers.EventTriggerFormatter
Bases: MistralFormatter
the trigger formatter herself ๐ serving constants:
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)โ static, two optional args, iconic
class mistralclient.commands.v2.event_triggers.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Show specific event trigger โ one trigger, all the attention ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.event_triggers.Get (WARNING)>take_action(parsed_args)โ runs the command, returns column names + an iterable of the data to be listed
class mistralclient.commands.v2.event_triggers.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: MistralLister
List all event triggers โ the whole collection, laid out ๐ธ
log = <Logger mistralclient.commands.v2.event_triggers.List (WARNING)>
mistralclient.commands.v2.executions module
the big one โ executions, the moment everyone's been waiting for ๐
class mistralclient.commands.v2.executions.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Create new execution โ let's make it happen โจ
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.Create (WARNING)>take_action(parsed_args)โ runs the command, returns the column names + an iterable of the data to be listed
class mistralclient.commands.v2.executions.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Delete execution โ okay execution, your time is up ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.Delete (WARNING)>take_action(parsed_args)โ override to do something useful; whatever it returns gets returned by the program
class mistralclient.commands.v2.executions.ExecutionFormatter
Bases: MistralFormatter
this formatter ate and left no crumbs ๐ฅ look at this COLUMNS situation:
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)โ static, takes those two optional args
notice that lastdurationentry has a littleTrueas a third element โ yes, bestie, it's really there, don't touch it ๐
class mistralclient.commands.v2.executions.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
Show specific execution โ one execution, front and center ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.Get (WARNING)>take_action(parsed_args)โ runs the command, returns column names + an iterable of the data to be listed
class mistralclient.commands.v2.executions.GetInput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Show execution input data โ peep the input, bestie ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.GetInput (WARNING)>take_action(parsed_args)โ override to do something useful; the returned value is what the program returns
class mistralclient.commands.v2.executions.GetOutput(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
Show execution output data โ and now the output, the payoff ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.GetOutput (WARNING)>take_action(parsed_args)โ override to do something useful; returned value goes right back to 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 โ the published ones, globally ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.GetPublished (WARNING)>take_action(parsed_args)โ override to do something useful; whatever it returns is 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 โ the receipts, printed ๐
get_parser(prog_name)โ returns anargparse.ArgumentParserlog = <Logger mistralclient.commands.v2.executions.GetReport (WARNING)>print_action_execution_entry(a_ex, level)โ yup, that's the method, witha_exandlevel, exactly as written, no inventing extra args ๐
okay so we're still cruising through the mistralclient.commands.v2.executions API docs, and the class that's already in progress has these method signatures on deck โ exact, no cap:
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)โ this is the โoverride to do something usefulโ hook, bestie. 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 <#mistralclient.commands.v2.base.MistralExecutionLister>. This one is here to list all executions, periodt.get_parser(parsed_args)โ returns anargparse.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. The base-lister energy is real.get_parser(prog_name)โ returns anargparse.ArgumentParser.take_action(parsed_args)โ runs the command and hands back a tuple with the column names plus 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. That's the whole entry, and we're not adding extra lore.class mistralclient.commands.v2.executions.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:ShowOne. Update execution, slay.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.executions.Update (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
๐ฆ mistralclient.commands.v2.members module
next up: members. sharing is caring, bestie.
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. iconic behavior.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.members.Create (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
class mistralclient.commands.v2.members.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:Command. Deletes a resource sharing relationship. yes, the_app.Appis literally there โ do not โfixโ it.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.members.Delete (WARNING)>take_action(parsed_args)โ the โoverride to do something usefulโ hook. 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. Shows specific member information.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.members.Get (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
class mistralclient.commands.v2.members.List(app: App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:MistralLister <#mistralclient.commands.v2.base.MistralLister>. Lists all members.get_parser(parsed_args)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.members.List (WARNING)>
class mistralclient.commands.v2.members.MemberFormatterโ Bases:MistralFormatter <#mistralclient.commands.v2.base.MistralFormatter>. The sacred column config isCOLUMNS = [('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)โ exact hook signature, bestie.
class mistralclient.commands.v2.members.Update(app: App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:ShowOne. Updates resource sharing status.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.members.Update (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
๐ธ mistralclient.commands.v2.tasks module
tasks module time. we love a task moment.
class mistralclient.commands.v2.tasks.Get(app: App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:ShowOne. Shows a specific task.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.tasks.Get (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
class mistralclient.commands.v2.tasks.GetPublished(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:Command. Shows task published variables. note the_app.App, exactly as written.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.tasks.GetPublished (WARNING)>take_action(parsed_args)โ the โoverride to do something usefulโ hook. 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. Shows task output data.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.tasks.GetResult (WARNING)>take_action(parsed_args)โ the โoverride to do something usefulโ hook. 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 <#mistralclient.commands.v2.base.MistralExecutionLister>. Lists all tasks.get_parser(prog_name)โ returns anargparse.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. Reruns an existing task. main character energy fr fr.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.tasks.Rerun (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
class mistralclient.commands.v2.tasks.SubExecutionsLister(app: App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:SubExecutionsBaseLister <#mistralclient.commands.v2.executions.SubExecutionsBaseLister>. That's the entry, no extra bits in the source.class mistralclient.commands.v2.tasks.TaskFormatterโ Bases:MistralFormatter <#mistralclient.commands.v2.base.MistralFormatter>. The column config isCOLUMNS = [('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)โ exact hook signature.
๐ mistralclient.commands.v2.workbooks module
workbooks module, let's go. ๐โจ
class mistralclient.commands.v2.workbooks.Create(app: App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:ShowOne. Creates a new workbook.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.workbooks.Create (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
class mistralclient.commands.v2.workbooks.Delete(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:Command. Deletes a workbook. again,_app.Appis not a typo, bestie.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.workbooks.Delete (WARNING)>take_action(parsed_args)โ the โoverride to do something usefulโ hook. 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. Shows a specific workbook.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.workbooks.Get (WARNING)>take_action(parsed_args)โ runs the command and returns a tuple containing the column names plus an iterable containing the data to be listed.
class mistralclient.commands.v2.workbooks.GetDefinition(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)โ Bases:Command. Shows the workbook definition.get_parser(prog_name)โ returns anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.workbooks.GetDefinition (WARNING)>take_action(parsed_args)โ the โoverride to do something usefulโ hook. 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 <#mistralclient.commands.v2.base.MistralLister>. Lists 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โ updating a workbook, obvs ๐get_parser(prog_name)โ hands you back anargparse.ArgumentParser. that's it, that's the whole job ๐log = <Logger mistralclient.commands.v2.workbooks.Update (WARNING)>take_action(parsed_args)โ actually runs the command. returns a tuple with the column names + an iterable holding the data that gets listed โจ
๐ฆ class mistralclient.commands.v2.workbooks.Validate(app: App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: ShowOne
bestie this one validates a workbook, no cap โ
get_parser(prog_name)โ return anargparse.ArgumentParser.log = <Logger mistralclient.commands.v2.workbooks.Validate (WARNING)>take_action(parsed_args)โ run command. returns a tuple containing the column names and an iterable containing the data to be listed.
๐ธ class mistralclient.commands.v2.workbooks.WorkbookFormatter
Bases: MistralFormatter (ref: #mistralclient.commands.v2.base.MistralFormatter)
the formatter that makes workbooks look cute in a table ๐
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 (ref: #mistralclient.commands.v2.base.MistralLister)
creates a brand-new workflow, main character energy only โจ
get_parser(prog_name)โ return anargparse.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
deletes a workflow. gone, reduced to atoms ๐
get_parser(prog_name)โ return anargparse.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
shows you one specific workflow, iykyk ๐
get_parser(prog_name)โ return anargparse.ArgumentParser.take_action(parsed_args)โ run command. returns a tuple containing the column names and an iterable containing the data to be listed.
๐ class mistralclient.commands.v2.workflows.GetDefinition(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)
Bases: Command
shows the workflow definition itself ๐
get_parser(prog_name)โ return anargparse.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 (ref: #mistralclient.commands.v2.base.MistralLister)
lists all the workflows. all of them. every single one ๐ซถ
get_parser(prog_name)โ return anargparse.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 (ref: #mistralclient.commands.v2.base.MistralLister)
updates a workflow, glow-up edition ๐
get_parser(prog_name)โ return anargparse.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
validates a workflow. vibe check for your YAML โ
get_parser(prog_name)โ return anargparse.ArgumentParser.take_action(parsed_args)โ run command. returns a tuple containing the column names and an iterable containing the data to be listed.
๐ class mistralclient.commands.v2.workflows.WorkflowFormatter
Bases: MistralFormatter (ref: #mistralclient.commands.v2.base.MistralFormatter)
the table-maker for workflows, and it has so many columns, look at her go ๐
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. yes bestie, it plugs in ๐
mistralclient.osc.plugin.build_option_parser(parser)โ hook to add global options.mistralclient.osc.plugin.make_client(instance)โ returns aworkflow_engineservice 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. tab tab tab, slay โจ๏ธ
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 ๐
Providing a custom action means the -h and --help options to the main app will print you a list of the commands. iconic behaviour tbh.
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. go off, customize โจ
Parameters
- description (
str) โ full description of the application - version (
str) โ version number for the application - argparse_kwargs โ extra keyword argument passed to the
ArgumentParserconstructor
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=['-M', 'man', 'doc/source', '.sphinx/man', '-v'])
๐ mistralclient.utils module
๐ mistralclient.utils.do_action_on_many(action, resources, success_msg, error_msg)
Helper to run an action on many resources. batch it, bestie ๐งบ
๐ 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. so flexible, we love her ๐
๐ธ 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 at https://docs.openstack.org/mistral/latest/cli/index.html โจ
๐ฅ PYTHON API REFERENCE
- REST API Specification at
https://docs.openstack.org/mistral/latest/api/v2.html๐
๐ FOR CONTRIBUTORS ๐
python-mistralclientnewbie? bestie, start here โ refer to So You Want to Contribute...<>โจ
๐ฆ So You Want to Contribute... ๐ฆ
okay so for the general OpenStack tea, go check out the contributor guide <https://docs.openstack.org/contributors/> and honestly it's giving "everything you need to know" energy. it covers literally all the basics that are common to all OpenStack projects, no cap:
- the accounts you need (yes, plural, sorry ๐ญ)
- the basics of interacting with our Gerrit review system
- how we communicate as a community
- etc.
and below? that's the more project-specific stuff you need to get started with python-mistralclient. you got this ๐ซถ
๐ Communication ๐
- IRC channel
#openstack-mistralclientat OFTC โ come vibe with us ๐ฌ - Mailing list (prefix subjects with
[mistral]for faster responses) <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss> โ the prefix is the whole trick, iykyk ๐ฌ
๐ Contacting the Core Team ๐
please refer the python-mistralclient Core Team <https://review.opendev.org/admin/groups/19588f2c593d37749e32bc5400365f654c683d19,members> contacts. these are the main characters, respect them ๐
๐ธ New Feature Planning ๐ธ
python-mistralclient features are tracked on Launchpad <https://bugs.launchpad.net/python-mistralclient> โ that's where the ideas live, bestie โจ
โญ Task Tracking โญ
we track our tasks in Launchpad <https://bugs.launchpad.net/python-mistralclient>. fr fr.
if you're looking for some smaller, easier work item to pick up and get started on, search for the 'low-hanging-fruit' tag ๐ โ it's literally the "easiest on-ramp" tag and it's iconic for first-timers.
๐ Reporting a Bug ๐
you found an issue and want to make sure we are aware of it? you can do so on Launchpad <https://bugs.launchpad.net/python-mistralclient> ๐ no gatekeeping, tell us everything.
๐ฅ 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. that's the ritual, that's the process, periodt ๐
ngl it's not complicated, it's just sequential.+2s first, thenWorkflow +1. don't skip steps ๐
๐ Project Team Lead Duties ๐
all common PTL duties are enumerated in the PTL guide <https://docs.openstack.org/project-team-guide/ptl.html> โ if you're stepping into the PTL era of your life, that's your required reading ๐ง
๐ Author ๐
Mistral Contributors โ absolute legends, every single one ๐ซถ
๐ Copyright ๐
2016, Mistral Contributors
okay bestie that's the whole page, you made it to the end!! ๐ this was 6.3.0, dated Jan 02, 1980 (yes really, that date is so unserious ๐ญ), and it's the MISTRAL_CLIENT(1) manual page. now go forth and contri๐ฆbute โ slay ๐
โจ
๐ฆ where this page comes from
- nixpkgs unstable: python3.13-python-mistralclient 6.3.0
- nixpkgs unstable: python3.14-python-mistralclient 6.3.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms