diff --git a/heat/engine/parser.py b/heat/engine/parser.py index b2e15fd4e..357a5f961 100644 --- a/heat/engine/parser.py +++ b/heat/engine/parser.py @@ -260,6 +260,8 @@ class Stack(object): if r.state in ( (r.CREATE, r.IN_PROGRESS), (r.CREATE, r.COMPLETE), + (r.RESUME, r.IN_PROGRESS), + (r.RESUME, r.COMPLETE), (r.UPDATE, r.IN_PROGRESS), (r.UPDATE, r.COMPLETE)) and r.FnGetRefId() == refid: return r diff --git a/heat/tests/test_parser.py b/heat/tests/test_parser.py index e65543644..b056278dd 100644 --- a/heat/tests/test_parser.py +++ b/heat/tests/test_parser.py @@ -967,7 +967,16 @@ class StackTest(HeatTestCase): rsrc = self.stack['AResource'] rsrc.resource_id_set('aaaa') self.assertNotEqual(None, resource) - self.assertEqual(rsrc, self.stack.resource_by_refid('aaaa')) + + for action, status in ( + (rsrc.CREATE, rsrc.IN_PROGRESS), + (rsrc.CREATE, rsrc.COMPLETE), + (rsrc.RESUME, rsrc.IN_PROGRESS), + (rsrc.RESUME, rsrc.COMPLETE), + (rsrc.UPDATE, rsrc.IN_PROGRESS), + (rsrc.UPDATE, rsrc.COMPLETE)): + rsrc.state_set(action, status) + self.assertEqual(rsrc, self.stack.resource_by_refid('aaaa')) rsrc.state_set(rsrc.DELETE, rsrc.IN_PROGRESS) try: