]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat clients : Make heat-boto rollback disabled by default
authorSteven Hardy <shardy@redhat.com>
Mon, 4 Mar 2013 15:29:36 +0000 (15:29 +0000)
committerSteven Hardy <shardy@redhat.com>
Mon, 4 Mar 2013 20:48:54 +0000 (20:48 +0000)
The boto library always sends the DisableRollback parameter,
defaulted to False, which is the opposite of the engine
default now, so we have to set DisableRollback to True in
the boto client wrapper

ref bug 1131303

Change-Id: I4acbba7b37f24cb1a874292ff2323ae24b630edf

heat/cfn_client/boto_client.py

index 1f35c10914cdaefed30e64927fdf6c2f0e24154d..d0c86f3c6079bb5aa25135f260067619ce3865ff 100644 (file)
@@ -39,10 +39,9 @@ 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
+        disable_rollback = True
+        if str(kwargs.get('DisableRollback', '')).lower() == 'false':
+            disable_rollback = False
 
         if 'TemplateUrl' in kwargs:
             return super(BotoClient, self).create_stack(