From 6bdebc59ba92f2c5af545630819e7cc504e8f94b Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 28 Feb 2013 16:04:33 +0000 Subject: [PATCH] heat clients : make boto client library pass disable_rollback Make the boto_client.py wrapper correctly interpret the DisableRollback argument, so the --disable-rollback option of heat-boto will work fixes bug 1131283 Change-Id: If31daa1583ff836fbb3f67799b89602b16f904e3 --- heat/cfn_client/boto_client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/heat/cfn_client/boto_client.py b/heat/cfn_client/boto_client.py index 03b0a5bf54..1f35c10914 100644 --- a/heat/cfn_client/boto_client.py +++ b/heat/cfn_client/boto_client.py @@ -39,16 +39,23 @@ class BotoClient(CloudFormationConnection): return super(BotoClient, self).describe_stacks(stack_name) def create_stack(self, **kwargs): + disable_rollback = False + if 'DisableRollback' in kwargs: + if str(kwargs['DisableRollback']).lower() == 'true': + disable_rollback = True + if 'TemplateUrl' in kwargs: return super(BotoClient, self).create_stack( kwargs['StackName'], template_url=kwargs['TemplateUrl'], - parameters=kwargs['Parameters']) + parameters=kwargs['Parameters'], + disable_rollback=disable_rollback) elif 'TemplateBody' in kwargs: return super(BotoClient, self).create_stack( kwargs['StackName'], template_body=kwargs['TemplateBody'], - parameters=kwargs['Parameters']) + parameters=kwargs['Parameters'], + disable_rollback=disable_rollback) else: logger.error("Must specify TemplateUrl or TemplateBody!")