Skip to content

Commit ccb3ad9

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add docs for the workflow service"
2 parents 3a21854 + 6854e05 commit ccb3ad9

File tree

7 files changed

+71
-0
lines changed

7 files changed

+71
-0
lines changed

doc/source/users/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ but listed below are the ones provided by this SDK by default.
8282
Object Store <proxies/object_store>
8383
Orchestration <proxies/orchestration>
8484
Telemetry <proxies/telemetry>
85+
Workflow <proxies/workflow>
8586

8687
Resource Interface
8788
******************
@@ -111,6 +112,7 @@ The following services have exposed *Resource* classes.
111112
Orchestration <resources/orchestration/index>
112113
Object Store <resources/object_store/index>
113114
Telemetry <resources/telemetry/index>
115+
Workflow <resources/workflow/index>
114116

115117
Low-Level Classes
116118
*****************
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Workflow API
2+
============
3+
4+
For details on how to use block_store, see :doc:`/users/guides/block_store`
5+
6+
.. automodule:: openstack.workflow.v2._proxy
7+
8+
The Workflow Class
9+
------------------
10+
11+
The workflow high-level interface is available through the ``workflow``
12+
member of a :class:`~openstack.connection.Connection` object.
13+
The ``workflow`` member will only be added if the service is detected.
14+
15+
.. autoclass:: openstack.workflow.v2._proxy.Proxy
16+
:members:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Object Store Resources
2+
======================
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
v2/execution
8+
v2/workflow
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
openstack.workflow.v2.execution
2+
===============================
3+
4+
.. automodule:: openstack.workflow.v2.execution
5+
6+
The Execution Class
7+
-------------------
8+
9+
The ``Execution`` class inherits from :class:`~openstack.resource.Resource`.
10+
11+
.. autoclass:: openstack.workflow.v2.execution
12+
:members:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
openstack.workflow.v2.workflow
2+
==============================
3+
4+
.. automodule:: openstack.workflow.v2.workflow
5+
6+
The Workflow Class
7+
------------------
8+
9+
The ``Workflow`` class inherits from :class:`~openstack.resource.Resource`.
10+
11+
.. autoclass:: openstack.workflow.v2.workflow
12+
:members:

openstack/workflow/v2/execution.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,26 @@ class Execution(resource.Resource):
3030
'marker', 'limit', 'sort_keys', 'sort_dirs', 'fields', 'params',
3131
'include_output')
3232

33+
#: The name of the workflow
3334
workflow_name = resource.Body("workflow_name")
35+
#: The ID of the workflow
3436
workflow_id = resource.Body("workflow_id")
37+
#: A description of the workflow execution
3538
description = resource.Body("description")
39+
#: A reference to the parent task execution
3640
task_execution_id = resource.Body("task_execution_id")
41+
#: Status can be one of: IDLE, RUNNING, SUCCESS, ERROR, or PAUSED
3742
status = resource.Body("state")
43+
#: An optional information string about the status
3844
status_info = resource.Body("state_info")
45+
#: A JSON structure containing workflow input values
46+
# TODO(briancurtin): type=dict
3947
input = resource.Body("input")
48+
#: The output of the workflow
4049
output = resource.Body("output")
50+
#: The time at which the Execution was created
4151
created_at = resource.Body("created_at")
52+
#: The time at which the Execution was updated
4253
updated_at = resource.Body("updated_at")
4354

4455
def create(self, session, prepend_key=True):

openstack/workflow/v2/workflow.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,23 @@ class Workflow(resource.Resource):
2929
_query_mapping = resource.QueryParameters(
3030
'marker', 'limit', 'sort_keys', 'sort_dirs', 'fields')
3131

32+
#: The name of this Workflow
3233
name = resource.Body("name")
34+
#: The inputs for this Workflow
3335
input = resource.Body("input")
36+
#: A Workflow definition using the Mistral v2 DSL
3437
definition = resource.Body("definition")
38+
#: A list of values associated with a workflow that users can use
39+
#: to group workflows by some criteria
40+
# TODO(briancurtin): type=list
3541
tags = resource.Body("tags")
42+
#: Can be either "private" or "public"
3643
scope = resource.Body("scope")
44+
#: The ID of the associated project
3745
project_id = resource.Body("project_id")
46+
#: The time at which the workflow was created
3847
created_at = resource.Body("created_at")
48+
#: The time at which the workflow was created
3949
updated_at = resource.Body("updated_at")
4050

4151
def create(self, session, prepend_key=True):

0 commit comments

Comments
 (0)