From: Steven Hardy Date: Thu, 14 Feb 2013 16:16:09 +0000 (+0000) Subject: heat cli : Add --disable-rollback option to heat-cfn X-Git-Tag: 2014.1~890 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=df6bd799dad1a3f135aad7e1868d48ac215116e0;p=openstack-build%2Fheat-build.git heat cli : Add --disable-rollback option to heat-cfn When rollback is implemented it will default on, like aws so this option allows stack rollback on create to be disabled blueprint stack-rollback Change-Id: I02fcaaa656219b1c65729cecdd473e0a5bd86036 --- diff --git a/bin/heat-cfn b/bin/heat-cfn index 2ec7d336..c4ec11e4 100755 --- a/bin/heat-cfn +++ b/bin/heat-cfn @@ -201,6 +201,9 @@ def stack_create(options, arguments): parameters['TimeoutInMinutes'] = options.timeout + if options.disable_rollback: + parameters['DisableRollback'] = 'True' + templ_param = get_template_param(options) if templ_param: parameters.update(templ_param) @@ -495,6 +498,10 @@ def create_options(parser): parser.add_option('-P', '--parameters', metavar="parameters", default=None, help="Parameter values used to create the stack.") + parser.add_option('-D', '--disable-rollback', dest="disable_rollback", + default=False, action="store_true", + help="Disable rollback on failure") + def credentials_from_env(): return dict(username=os.getenv('OS_USERNAME'), diff --git a/heat/cfn_client/client.py b/heat/cfn_client/client.py index 49dc3e59..df196b47 100644 --- a/heat/cfn_client/client.py +++ b/heat/cfn_client/client.py @@ -29,7 +29,7 @@ logger = logging.getLogger(__name__) SUPPORTED_PARAMS = ('StackName', 'TemplateBody', 'TemplateUrl', 'NotificationARNs', 'Parameters', 'Version', 'SignatureVersion', 'Timestamp', 'AWSAccessKeyId', - 'Signature', 'TimeoutInMinutes', + 'Signature', 'TimeoutInMinutes', 'DisableRollback', 'LogicalResourceId', 'PhysicalResourceId', 'NextToken', )