tempest/services/orchestration/json/orchestration_client.py
def wait_for_stack_status(self, stack_identifier, status,
                              failure_pattern='^.*_FAILED$'):
        """Waits for a Stack to reach a given status."""
        start = int(time.time())
        fail_regexp = re.compile(failure_pattern)

        while True:
            resp, body = self.get_stack(stack_identifier)
            stack_name = body['stack_name']
            stack_status = body['stack_status']
            if stack_status == status:
                return
            if fail_regexp.search(stack_status):
                raise exceptions.StackBuildErrorException(
                    stack_identifier=stack_identifier,
                    stack_status=stack_status,
                    stack_status_reason=body['stack_status_reason'])
            print "timeout"
            print self.build_timeout
            if int(time.time()) - start >= self.build_timeout:
                message = ('Stack %s failed to reach %s status within '
                           'the required time (%s s).' %
                           (stack_name, status, self.build_timeout))
                raise exceptions.TimeoutException(message)
            time.sleep(self.build_interval)
Waits for a Stack to reach a given status.
Waits for a Stack to reach a given status.
Waits for a Stack to reach a given status .
def wait_for_stack_status(self, stack_identifier, status,
                              failure_pattern='^.*_FAILED$'):
        start = int(time.time())
        fail_regexp = re.compile(failure_pattern)
        while True:
            resp, body = self.get_stack(stack_identifier)
            stack_name = body['stack_name']
            stack_status = body['stack_status']
            if stack_status == status:
                return
            if fail_regexp.search(stack_status):
                raise exceptions.StackBuildErrorException(
                    stack_identifier=stack_identifier,
                    stack_status=stack_status,
                    stack_status_reason=body['stack_status_reason'])
            print "timeout"
            print self.build_timeout
            if int(time.time()) - start >= self.build_timeout:
                message = ('Stack %s failed to reach %s status within '
                           'the required time (%s s).' %
                           (stack_name, status, self.build_timeout))
                raise exceptions.TimeoutException(message)
            time.sleep(self.build_interval)
def wait_for_stack_status ( self , stack_identifier , status , failure_pattern = '^.*_FAILED$' ) : start = int ( time . time ( ) ) fail_regexp = re . compile ( failure_pattern ) while True : resp , body = self . get_stack ( stack_identifier ) stack_name = body [ 'stack_name' ] stack_status = body [ 'stack_status' ] if stack_status == status : return if fail_regexp . search ( stack_status ) : raise exceptions . StackBuildErrorException ( stack_identifier = stack_identifier , stack_status = stack_status , stack_status_reason = body [ 'stack_status_reason' ] ) print "timeout" print self . build_timeout if int ( time . time ( ) ) - start >= self . build_timeout : message = ( 'Stack %s failed to reach %s status within ' 'the required time (%s s).' % ( stack_name , status , self . build_timeout ) ) raise exceptions . TimeoutException ( message ) time . sleep ( self . build_interval )
Waits for a Stack to reach a given status.
Waits for a Stack to reach a given status .
"""Waits for a Stack to reach a given status."""
self
stack_identifier
status
failure_pattern