From 356a1cf2746a9f8e87559bd91bc06894a25e65a3 Mon Sep 17 00:00:00 2001 From: Michal Gershenzon Date: Mon, 31 Jul 2017 15:11:45 +0000 Subject: [PATCH] Create and run a workflow within a namespace Add release note and improve docs. Change-Id: I6edc4e22f90c029d7f3b6e149396cd741266c6a9 --- mistral/api/controllers/v2/resources.py | 20 +++++++++---------- ...ws-within-namespaces-e4fba869a889f55f.yaml | 17 ++++++++++++++++ 2 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/create-and-run-workflows-within-namespaces-e4fba869a889f55f.yaml diff --git a/mistral/api/controllers/v2/resources.py b/mistral/api/controllers/v2/resources.py index c1224e424..78c2dadd9 100644 --- a/mistral/api/controllers/v2/resources.py +++ b/mistral/api/controllers/v2/resources.py @@ -217,12 +217,12 @@ class Execution(resource.Resource): "reference to workflow definition" workflow_namespace = wtypes.text - ("reference to workflow namespace. The workflow namespace is also saved " - "under params and passed to all sub-workflow executions. When looking for" - " the next sub-workflow to run, The correct workflow will be found by " - "name and namespace, where the namespace can be the workflow namespace or" - " the default namespace. Workflows in the same namespace will be given " - "a higher priority.") + """reference to workflow namespace. The workflow namespace is also saved + under params and passed to all sub-workflow executions. When looking for + the next sub-workflow to run, The correct workflow will be found by + name and namespace, where the namespace can be the workflow namespace or + the default namespace. Workflows in the same namespace as the top workflow + will be given a higher priority.""" workflow_id = wtypes.text "reference to workflow ID" @@ -231,8 +231,8 @@ class Execution(resource.Resource): "description of workflow execution." params = types.jsontype - ("params define workflow type specific parameters. For example, reverse " - "workflow takes one parameter 'task_name' that defines a target task.") + """params define workflow type specific parameters. For example, reverse + workflow takes one parameter 'task_name' that defines a target task.""" task_execution_id = wtypes.text "reference to the parent task execution" @@ -303,8 +303,8 @@ class Task(resource.Resource): workflow_execution_id = wtypes.text state = wtypes.text - ("state can take one of the following values: " - "IDLE, RUNNING, SUCCESS, ERROR, DELAYED") + """state can take one of the following values: + IDLE, RUNNING, SUCCESS, ERROR, DELAYED""" state_info = wtypes.text "an optional state information string" diff --git a/releasenotes/notes/create-and-run-workflows-within-namespaces-e4fba869a889f55f.yaml b/releasenotes/notes/create-and-run-workflows-within-namespaces-e4fba869a889f55f.yaml new file mode 100644 index 000000000..864589052 --- /dev/null +++ b/releasenotes/notes/create-and-run-workflows-within-namespaces-e4fba869a889f55f.yaml @@ -0,0 +1,17 @@ +--- +features: + - | + Creating and running workflows within a namespace. Workflows with the same + name can be added to the same project as long as they are within a + different namespace. This feature is backwards compatible. + + All existing workflows are assumed to be in the default namespace, + represented by an empty string. Also if a workflow is created without a + namespace spcified, it is assumed to be in the defualt namespace. + + When a workflow is being executed, the namespace is saved under params and + passed to all its sub workflow executions. When looking for the next + sub-workflow to run, the correct workflow will be found by name and + namespace, where the namespace can be the workflow namespace or the default + namespace. Workflows in the same namespace as the top workflow will be + given a higher priority. \ No newline at end of file