]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Save the resource if complete or failed
authorAngus Salkeld <asalkeld@redhat.com>
Wed, 18 Apr 2012 06:14:24 +0000 (16:14 +1000)
committerAngus Salkeld <asalkeld@redhat.com>
Wed, 18 Apr 2012 06:18:16 +0000 (16:18 +1000)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
heat/engine/resources.py

index 95cd554a1730e68bb4c5152960ec69aea9385cf5..6532445220077e77bc33159eb77b1fb9a1cb6155 100644 (file)
@@ -119,6 +119,8 @@ class Resource(object):
 
     def state_set(self, new_state, reason="state changed"):
         if new_state is self.CREATE_COMPLETE:
+        if new_state is self.CREATE_COMPLETE or \
+           new_state is self.CREATE_FAILED:
             try:
                 rs = {}
                 rs['state'] = new_state