]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Use the correct resource name
authorAngus Salkeld <asalkeld@redhat.com>
Thu, 21 Jun 2012 04:54:38 +0000 (14:54 +1000)
committerAngus Salkeld <asalkeld@redhat.com>
Thu, 21 Jun 2012 04:55:31 +0000 (14:55 +1000)
Change-Id: I25d6962dfcc75b703aae6489cd0e751317029bc6
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
heat/engine/wait_condition.py

index 16d64082bcf58a8876cd6b194c01775cfc578ccf..f43f5674d70830b9d2d335bffdfe37619d1bab5d 100644 (file)
@@ -69,6 +69,8 @@ class WaitCondition(Resource):
 
     def handle_create(self):
         self._get_handle_resource_id()
+        res_name = self.resource_id
+        cntx = self.stack.context
 
         # keep polling our Metadata to see if the cfn-signal has written
         # it yet. The execution here is limited by timeout.
@@ -79,7 +81,9 @@ class WaitCondition(Resource):
         try:
             while status == 'WAITING':
                 try:
-                    res = db_api.resource_get(self.stack.context, self.id)
+                    res = db_api.resource_get_by_name_and_stack(cntx,
+                                                                res_name,
+                                                                self.stack.id)
                 except Exception as ex:
                     if 'not found' in ex:
                         # it has been deleted