Workflow API¶
The Workflow Class¶
The workflow high-level interface is available through the workflow
member of a Connection object.
The workflow member will only be added if the service is detected.
Workflow Operations¶
- class openstack.workflow.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
 - create_workflow(**attrs)
 Create a new workflow from attributes
- update_workflow(workflow, **attrs)
 Update workflow from attributes
- get_workflow(*attrs)
 Get a workflow
- Parameters:
 workflow – The value can be the name of a workflow or
Workflowinstance.- Returns:
 One
Workflow- Raises:
 NotFoundExceptionwhen no workflow matching the name could be found.
- workflows(**query)
 Retrieve a generator of workflows
- Parameters:
 query (kwargs) –
Optional query parameters to be sent to restrict the workflows to be returned. Available parameters include:
limit: Requests at most the specified number of items be returned from the query.
marker: Specifies the ID of the last-seen workflow. Use the limit parameter to make an initial limited request and use the ID of the last-seen workflow from the response as the marker parameter value in a subsequent limited request.
- Returns:
 A generator of workflow instances.
- delete_workflow(value, ignore_missing=True)
 Delete a workflow
- Parameters:
 value – The value can be either the name of a workflow or a
Workflowinstance.ignore_missing (bool) – When set to
FalseNotFoundExceptionwill be raised when the workflow does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent workflow.
- Returns:
 None
- find_workflow(name_or_id, ignore_missing=True)
 Find a single workflow
- Parameters:
 name_or_id – The name or ID of an workflow.
ignore_missing (bool) – When set to
FalseNotFoundExceptionwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
- Returns:
 One
Extensionor None
Execution Operations¶
- class openstack.workflow.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
 - create_execution(**attrs)
 Create a new execution from attributes
- get_execution(*attrs)
 Get a execution
- Parameters:
 workflow_name – The name of target workflow to execute.
execution – The value can be either the ID of a execution or a
Executioninstance.
- Returns:
 One
Execution- Raises:
 NotFoundExceptionwhen no execution matching the criteria could be found.
- executions(**query)
 Retrieve a generator of executions
- Parameters:
 query (kwargs) –
Optional query parameters to be sent to restrict the executions to be returned. Available parameters include:
limit: Requests at most the specified number of items be returned from the query.
marker: Specifies the ID of the last-seen execution. Use the limit parameter to make an initial limited request and use the ID of the last-seen execution from the response as the marker parameter value in a subsequent limited request.
- Returns:
 A generator of execution instances.
- delete_execution(value, ignore_missing=True)
 Delete an execution
- Parameters:
 value – The value can be either the name of a execution or a
Executioninstance.ignore_missing (bool) – When set to
FalseNotFoundExceptionwill be raised when the execution does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent execution.
- Returns:
 None
- find_execution(name_or_id, ignore_missing=True)
 Find a single execution
- Parameters:
 name_or_id – The name or ID of an execution.
ignore_missing (bool) – When set to
FalseNotFoundExceptionwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
- Returns:
 One
Executionor None
Cron Trigger Operations¶
- class openstack.workflow.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
 - create_cron_trigger(**attrs)
 Create a new cron trigger from attributes
- Parameters:
 attrs (dict) – Keyword arguments which will be used to create a
CronTrigger, comprised of the properties on the CronTrigger class.- Returns:
 The results of cron trigger creation
- Return type:
 
- get_cron_trigger(cron_trigger)
 Get a cron trigger
- Parameters:
 cron_trigger – The value can be the name of a cron_trigger or
CronTriggerinstance.- Returns:
 One
CronTrigger- Raises:
 NotFoundExceptionwhen no cron triggers matching the criteria could be found.
- cron_triggers(*, all_projects=False, **query)
 Retrieve a generator of cron triggers
- Parameters:
 all_projects (bool) – When set to
True, list cron triggers from all projects. Admin-only by default.query (kwargs) –
Optional query parameters to be sent to restrict the cron triggers to be returned. Available parameters include:
limit: Requests at most the specified number of items be returned from the query.
marker: Specifies the ID of the last-seen cron trigger. Use the limit parameter to make an initial limited request and use the ID of the last-seen cron trigger from the response as the marker parameter value in a subsequent limited request.
- Returns:
 A generator of CronTrigger instances.
- delete_cron_trigger(value, ignore_missing=True)
 Delete a cron trigger
- Parameters:
 value – The value can be either the name of a cron trigger or a
CronTriggerinstance.ignore_missing (bool) – When set to
FalseNotFoundExceptionwill be raised when the cron trigger does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent cron trigger.
- Returns:
 None
- find_cron_trigger(name_or_id, ignore_missing=True, *, all_projects=False, **query)
 Find a single cron trigger
- Parameters:
 name_or_id – The name or ID of a cron trigger.
ignore_missing (bool) – When set to
FalseNotFoundExceptionwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.all_projects (bool) – When set to
True, search for cron triggers by name across all projects. Note that this will likely result in a higher chance of duplicates.query (kwargs) – Optional query parameters to be sent to limit the cron triggers being returned.
- Returns:
 One
CronTriggeror None- Raises:
 NotFoundExceptionwhen no resource can be found.- Raises:
 DuplicateResourcewhen multiple resources are found.