Merge tag '2.1.2' into debian/newton
python-mistralclient 2.1.2 release Change-Id: Ib842cf0c395177f76ec10218909a328673d6c8c3 meta:version: 2.1.2 meta:diff-start: - meta:series: newton meta:release-type: release meta:pypi: yes meta:first: no meta:release:Author: Dougal Matthews <dougal@redhat.com> meta:release:Commit: Dougal Matthews <dougal@redhat.com> meta:release:Change-Id: I55458a1b91c44d296d3a20180070297bf491a5c6 meta:release:Code-Review+1: Ryan Brady <rbrady@redhat.com> meta:release:Code-Review+2: Doug Hellmann <doug@doughellmann.com> meta:release:Code-Review+1: Emilien Macchi <emilien@redhat.com> meta:release:Code-Review+1: Renat Akhmerov <renat.akhmerov@gmail.com> meta:release:Code-Review+2: Thierry Carrez <thierry@openstack.org> meta:release:Workflow+1: Thierry Carrez <thierry@openstack.org>
This commit is contained in:
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,8 +1,10 @@
|
||||
python-mistralclient (1:2.1.1-3) UNRELEASED; urgency=medium
|
||||
python-mistralclient (1:2.1.2-1) unstable; urgency=medium
|
||||
|
||||
* Team upload.
|
||||
* New upstream release
|
||||
* Bumped debhelper compat version to 10
|
||||
|
||||
-- Ondřej Nový <onovy@debian.org> Thu, 24 Nov 2016 00:07:38 +0100
|
||||
-- Ondřej Nový <onovy@debian.org> Wed, 28 Dec 2016 23:24:09 +0100
|
||||
|
||||
python-mistralclient (1:2.1.1-2) unstable; urgency=medium
|
||||
|
||||
|
@@ -128,7 +128,8 @@ class HTTPClient(object):
|
||||
if target_auth_uri:
|
||||
headers['X-Target-Auth-Uri'] = target_auth_uri
|
||||
|
||||
# Add headers for osprofiler.
|
||||
headers.update(osprofiler_web.get_trace_id_headers())
|
||||
if osprofiler_web:
|
||||
# Add headers for osprofiler.
|
||||
headers.update(osprofiler_web.get_trace_id_headers())
|
||||
|
||||
return headers
|
||||
|
@@ -113,6 +113,12 @@ class Create(command.ShowOne):
|
||||
action='store_true',
|
||||
help='Save the result into DB.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--run-sync',
|
||||
dest='run_sync',
|
||||
action='store_true',
|
||||
help='Run the action synchronously.'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-t',
|
||||
'--target',
|
||||
@@ -128,6 +134,9 @@ class Create(command.ShowOne):
|
||||
if parsed_args.save_result:
|
||||
params['save_result'] = parsed_args.save_result
|
||||
|
||||
if parsed_args.run_sync:
|
||||
params['run_sync'] = parsed_args.run_sync
|
||||
|
||||
if parsed_args.target:
|
||||
params['target'] = parsed_args.target
|
||||
|
||||
@@ -146,7 +155,7 @@ class Create(command.ShowOne):
|
||||
**params
|
||||
)
|
||||
|
||||
if parsed_args.save_result:
|
||||
if not parsed_args.run_sync and parsed_args.save_result:
|
||||
return format(action_ex)
|
||||
else:
|
||||
self.app.stdout.write("%s\n" % action_ex.output)
|
||||
|
@@ -85,6 +85,38 @@ class TestCLIActionExecutions(base.BaseCommandTest):
|
||||
result[1]
|
||||
)
|
||||
|
||||
def test_create_run_sync(self):
|
||||
(self.client.action_executions.create.
|
||||
return_value) = ACTION_EX_WITH_OUTPUT
|
||||
|
||||
self.call(
|
||||
action_ex_cmd.Create,
|
||||
app_args=[
|
||||
'some', '{"output": "Hello!"}', '--run-sync'
|
||||
]
|
||||
)
|
||||
|
||||
self.assertDictEqual(
|
||||
ACTION_EX_RESULT,
|
||||
json.loads(self.app.stdout.write.call_args[0][0])
|
||||
)
|
||||
|
||||
def test_create_run_sync_and_save_result(self):
|
||||
(self.client.action_executions.create.
|
||||
return_value) = ACTION_EX_WITH_OUTPUT
|
||||
|
||||
self.call(
|
||||
action_ex_cmd.Create,
|
||||
app_args=[
|
||||
'some', '{"output": "Hello!"}', '--save-result', '--run-sync'
|
||||
]
|
||||
)
|
||||
|
||||
self.assertDictEqual(
|
||||
ACTION_EX_RESULT,
|
||||
json.loads(self.app.stdout.write.call_args[0][0])
|
||||
)
|
||||
|
||||
def test_update(self):
|
||||
self.client.action_executions.update.return_value = ACTION_EX
|
||||
|
||||
|
26
setup.cfg
26
setup.cfg
@@ -22,6 +22,14 @@ home-page = http://docs.openstack.org/developer/mistral/guides/mistralclient_gui
|
||||
packages =
|
||||
mistralclient
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
all_files = 1
|
||||
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
mistral = mistralclient.shell:main
|
||||
@@ -35,7 +43,7 @@ openstack.workflow_engine.v2 =
|
||||
workbook_create = mistralclient.commands.v2.workbooks:Create
|
||||
workbook_delete = mistralclient.commands.v2.workbooks:Delete
|
||||
workbook_update = mistralclient.commands.v2.workbooks:Update
|
||||
workbook_show_definition = mistralclient.commands.v2.workbooks:GetDefinition
|
||||
workbook_definition_show = mistralclient.commands.v2.workbooks:GetDefinition
|
||||
workbook_validate = mistralclient.commands.v2.workbooks:Validate
|
||||
|
||||
workflow_list = mistralclient.commands.v2.workflows:List
|
||||
@@ -43,7 +51,7 @@ openstack.workflow_engine.v2 =
|
||||
workflow_create = mistralclient.commands.v2.workflows:Create
|
||||
workflow_delete = mistralclient.commands.v2.workflows:Delete
|
||||
workflow_update = mistralclient.commands.v2.workflows:Update
|
||||
workflow_show_definition = mistralclient.commands.v2.workflows:GetDefinition
|
||||
workflow_definition_show = mistralclient.commands.v2.workflows:GetDefinition
|
||||
workflow_validate = mistralclient.commands.v2.workflows:Validate
|
||||
|
||||
workflow_env_create = mistralclient.commands.v2.environments:Create
|
||||
@@ -55,8 +63,8 @@ openstack.workflow_engine.v2 =
|
||||
action_execution_run = mistralclient.commands.v2.action_executions:Create
|
||||
action_execution_list = mistralclient.commands.v2.action_executions:List
|
||||
action_execution_show = mistralclient.commands.v2.action_executions:Get
|
||||
action_execution_show_input = mistralclient.commands.v2.action_executions:GetInput
|
||||
action_execution_show_output = mistralclient.commands.v2.action_executions:GetOutput
|
||||
action_execution_input_show = mistralclient.commands.v2.action_executions:GetInput
|
||||
action_execution_output_show = mistralclient.commands.v2.action_executions:GetOutput
|
||||
action_execution_update = mistralclient.commands.v2.action_executions:Update
|
||||
action_execution_delete = mistralclient.commands.v2.action_executions:Delete
|
||||
|
||||
@@ -65,13 +73,13 @@ openstack.workflow_engine.v2 =
|
||||
workflow_execution_update = mistralclient.commands.v2.executions:Update
|
||||
workflow_execution_list = mistralclient.commands.v2.executions:List
|
||||
workflow_execution_show = mistralclient.commands.v2.executions:Get
|
||||
workflow_execution_show_input = mistralclient.commands.v2.executions:GetInput
|
||||
workflow_execution_show_output = mistralclient.commands.v2.executions:GetOutput
|
||||
workflow_execution_input_show = mistralclient.commands.v2.executions:GetInput
|
||||
workflow_execution_output_show = mistralclient.commands.v2.executions:GetOutput
|
||||
|
||||
task_execution_list = mistralclient.commands.v2.tasks:List
|
||||
task_execution_show = mistralclient.commands.v2.tasks:Get
|
||||
task_execution_show_published = mistralclient.commands.v2.tasks:GetPublished
|
||||
task_execution_show_result = mistralclient.commands.v2.tasks:GetResult
|
||||
task_execution_published_show = mistralclient.commands.v2.tasks:GetPublished
|
||||
task_execution_result_show = mistralclient.commands.v2.tasks:GetResult
|
||||
task_execution_rerun = mistralclient.commands.v2.tasks:Rerun
|
||||
|
||||
action_definition_list = mistralclient.commands.v2.actions:List
|
||||
@@ -79,7 +87,7 @@ openstack.workflow_engine.v2 =
|
||||
action_definition_create = mistralclient.commands.v2.actions:Create
|
||||
action_definition_delete = mistralclient.commands.v2.actions:Delete
|
||||
action_definition_update = mistralclient.commands.v2.actions:Update
|
||||
action_definition_show_definition = mistralclient.commands.v2.actions:GetDefinition
|
||||
action_definition_definition_show = mistralclient.commands.v2.actions:GetDefinition
|
||||
|
||||
cron_trigger_list = mistralclient.commands.v2.cron_triggers:List
|
||||
cron_trigger_show = mistralclient.commands.v2.cron_triggers:Get
|
||||
|
Reference in New Issue
Block a user