Add docs for the workflow service

Initial docs for workflow. Doesn't include a user guide as I don't know
how to use it.

Change-Id: I7fa19fbb4cd6684782b8fc7a424d871a8b5d93ad
This commit is contained in:
Brian Curtin 2017-01-24 12:17:46 -05:00
parent 499bf2e3c2
commit 6854e05a5f
7 changed files with 71 additions and 0 deletions

View File

@ -80,6 +80,7 @@ but listed below are the ones provided by this SDK by default.
Object Store <proxies/object_store>
Orchestration <proxies/orchestration>
Telemetry <proxies/telemetry>
Workflow <proxies/workflow>
Resource Interface
******************
@ -108,6 +109,7 @@ The following services have exposed *Resource* classes.
Orchestration <resources/orchestration/index>
Object Store <resources/object_store/index>
Telemetry <resources/telemetry/index>
Workflow <resources/workflow/index>
Low-Level Classes
*****************

View File

@ -0,0 +1,16 @@
Workflow API
============
For details on how to use block_store, see :doc:`/users/guides/block_store`
.. automodule:: openstack.workflow.v2._proxy
The Workflow Class
------------------
The workflow high-level interface is available through the ``workflow``
member of a :class:`~openstack.connection.Connection` object.
The ``workflow`` member will only be added if the service is detected.
.. autoclass:: openstack.workflow.v2._proxy.Proxy
:members:

View File

@ -0,0 +1,8 @@
Object Store Resources
======================
.. toctree::
:maxdepth: 1
v2/execution
v2/workflow

View File

@ -0,0 +1,12 @@
openstack.workflow.v2.execution
===============================
.. automodule:: openstack.workflow.v2.execution
The Execution Class
-------------------
The ``Execution`` class inherits from :class:`~openstack.resource.Resource`.
.. autoclass:: openstack.workflow.v2.execution
:members:

View File

@ -0,0 +1,12 @@
openstack.workflow.v2.workflow
==============================
.. automodule:: openstack.workflow.v2.workflow
The Workflow Class
------------------
The ``Workflow`` class inherits from :class:`~openstack.resource.Resource`.
.. autoclass:: openstack.workflow.v2.workflow
:members:

View File

@ -30,15 +30,26 @@ class Execution(resource.Resource):
'marker', 'limit', 'sort_keys', 'sort_dirs', 'fields', 'params',
'include_output')
#: The name of the workflow
workflow_name = resource.Body("workflow_name")
#: The ID of the workflow
workflow_id = resource.Body("workflow_id")
#: A description of the workflow execution
description = resource.Body("description")
#: A reference to the parent task execution
task_execution_id = resource.Body("task_execution_id")
#: Status can be one of: IDLE, RUNNING, SUCCESS, ERROR, or PAUSED
status = resource.Body("state")
#: An optional information string about the status
status_info = resource.Body("state_info")
#: A JSON structure containing workflow input values
# TODO(briancurtin): type=dict
input = resource.Body("input")
#: The output of the workflow
output = resource.Body("output")
#: The time at which the Execution was created
created_at = resource.Body("created_at")
#: The time at which the Execution was updated
updated_at = resource.Body("updated_at")
def create(self, session, prepend_key=True):

View File

@ -29,13 +29,23 @@ class Workflow(resource.Resource):
_query_mapping = resource.QueryParameters(
'marker', 'limit', 'sort_keys', 'sort_dirs', 'fields')
#: The name of this Workflow
name = resource.Body("name")
#: The inputs for this Workflow
input = resource.Body("input")
#: A Workflow definition using the Mistral v2 DSL
definition = resource.Body("definition")
#: A list of values associated with a workflow that users can use
#: to group workflows by some criteria
# TODO(briancurtin): type=list
tags = resource.Body("tags")
#: Can be either "private" or "public"
scope = resource.Body("scope")
#: The ID of the associated project
project_id = resource.Body("project_id")
#: The time at which the workflow was created
created_at = resource.Body("created_at")
#: The time at which the workflow was created
updated_at = resource.Body("updated_at")
def create(self, session, prepend_key=True):