Merge "orchestration: tolerate NotFound in wait_for_stack_status"

This commit is contained in:
Jenkins 2014-07-25 19:18:34 +00:00 committed by Gerrit Code Review
commit 9ed2b3ac94
2 changed files with 7 additions and 6 deletions

View File

@ -85,11 +85,8 @@ class BaseOrchestrationTest(tempest.test.BaseTestCase):
pass
for stack_identifier in cls.stacks:
try:
cls.client.wait_for_stack_status(
stack_identifier, 'DELETE_COMPLETE')
except exceptions.NotFound:
pass
cls.client.wait_for_stack_status(
stack_identifier, 'DELETE_COMPLETE')
@classmethod
def _create_keypair(cls, name_start='keypair-heat-'):

View File

@ -181,7 +181,11 @@ class OrchestrationClient(rest_client.RestClient):
fail_regexp = re.compile(failure_pattern)
while True:
resp, body = self.get_stack(stack_identifier)
try:
resp, body = self.get_stack(stack_identifier)
except exceptions.NotFound:
if status == 'DELETE_COMPLETE':
return
stack_name = body['stack_name']
stack_status = body['stack_status']
if stack_status == status: