From 412f5ced97dd45294d3fff0cba92299a7d5fe92d Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Mon, 6 Oct 2014 11:47:40 +0400 Subject: [PATCH] Provide action-input via API Change-Id: I87a39fde113c98008c03183a9d3402b4b1173d07 --- mistral/api/controllers/v2/action.py | 1 + mistral/services/actions.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mistral/api/controllers/v2/action.py b/mistral/api/controllers/v2/action.py index 5cafae27..b1ce78e3 100644 --- a/mistral/api/controllers/v2/action.py +++ b/mistral/api/controllers/v2/action.py @@ -35,6 +35,7 @@ class Action(resource.Resource): id = wtypes.text name = wtypes.text is_system = bool + input = wtypes.text description = wtypes.text tags = [wtypes.text] diff --git a/mistral/services/actions.py b/mistral/services/actions.py index caeb47e2..9cd3dd5f 100644 --- a/mistral/services/actions.py +++ b/mistral/services/actions.py @@ -53,7 +53,8 @@ def create_action(action_spec, definition): 'tags': action_spec.get_tags(), 'definition': definition, 'spec': action_spec.to_dict(), - 'is_system': False + 'is_system': False, + 'input': ", ".join(action_spec.get_input()) } _add_security_info(values) @@ -76,7 +77,8 @@ def create_or_update_action(action_spec, definition): 'tags': action_spec.get_tags(), 'definition': definition, 'spec': action_spec.to_dict(), - 'is_system': False + 'is_system': False, + 'input': ", ".join(action_spec.get_input()) } _add_security_info(values)