diff options
author | Zhang Yang <neil.zhangyang@huawei.com> | 2014-05-16 19:42:04 -0700 |
---|---|---|
committer | Zhang Yang <neil.zhangyang@gmail.com> | 2014-06-05 02:05:02 +0000 |
commit | 83d9485f3108e222f2f0ec5ba3b9ed7c93cb1471 (patch) | |
tree | d3db9dfc2981b1fff7f5bcf2fcac6aecd6d942ff /heatclient/v1 | |
parent | 5a78fdf4eca4d74ce32c6e31d1e01ee1d21ae06d (diff) | |
download | python-heatclient-83d9485f3108e222f2f0ec5ba3b9ed7c93cb1471.tar.gz |
Add shell arguments for stack update
add option timeout for do_update,which has been added
for do_stack_update already.
add option rollback for stack update, this is supported
already in heat[1].
[1]https://github.com/openstack/heat/commit/7c833ecc2ba27053b7e948667a39a261f68144b5
Change-Id: I4545aef556c4c3297c2993418df2ec2cd7c4e408
Partial-Bug: #1324366
Diffstat (limited to 'heatclient/v1')
-rw-r--r-- | heatclient/v1/shell.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py index 09794fc..7ad6c60 100644 --- a/heatclient/v1/shell.py +++ b/heatclient/v1/shell.py @@ -329,6 +329,11 @@ def do_stack_show(hc, args): help='URL of template.') @utils.arg('-o', '--template-object', metavar='<URL>', help='URL to retrieve template object (e.g. from swift).') +@utils.arg('-t', '--timeout', metavar='<TIMEOUT>', + type=int, + help='Stack update timeout in minutes.') +@utils.arg('-r', '--enable-rollback', default=False, action="store_true", + help='Enable rollback on create/update failure.') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values used to create the stack. ' 'This can be specified multiple times, or once with parameters ' @@ -353,6 +358,8 @@ def do_update(hc, args): @utils.arg('-t', '--timeout', metavar='<TIMEOUT>', type=int, help='Stack update timeout in minutes.') +@utils.arg('-r', '--enable-rollback', default=False, action="store_true", + help='Enable rollback on create/update failure.') @utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>', help='Parameter values used to create the stack. ' 'This can be specified multiple times, or once with parameters ' @@ -374,6 +381,7 @@ def do_stack_update(hc, args): fields = { 'stack_id': args.id, + 'disable_rollback': not(args.enable_rollback), 'parameters': utils.format_parameters(args.parameters), 'template': template, 'files': dict(list(tpl_files.items()) + list(env_files.items())), |