def _wait_for_server_deletion(self, server):
        def is_deletion_complete():
                # Deletion testing is only required for objects whose
                # existence cannot be checked via retrieval.
                if isinstance(server, dict):
                    return True
                try:
                    server.get()
                except Exception as e:
                    # Clients are expected to return an exception
                    # called 'NotFound' if retrieval fails.
                    if e.__class__.__name__ == 'NotFound':
                        return True
                    self.error_msg.append(e)
                    LOG.debug(traceback.format_exc())
                return False

        # Block until resource deletion has completed or timed-out
        test.call_until_true(is_deletion_complete, 10, 1)
Exemple #2
0
    def _wait_for_server_deletion(self, server):
        def is_deletion_complete():
            # Deletion testing is only required for objects whose
            # existence cannot be checked via retrieval.
            if isinstance(server, dict):
                return True
            try:
                server.get()
            except Exception as e:
                # Clients are expected to return an exception
                # called 'NotFound' if retrieval fails.
                if e.__class__.__name__ == 'NotFound':
                    return True
                self.error_msg.append(e)
                LOG.exception(e)
            return False

        # Block until resource deletion has completed or timed-out
        test.call_until_true(is_deletion_complete, 10, 1)