def _delete_server(self, server_id):
        # Delete the server
        self.api.delete_server(server_id)

        # Wait (briefly) for deletion
        for _retries in range(5):
            try:
                found_server = self.api.get_server(server_id)
            except client.OpenStackApiNotFoundException:
                found_server = None
                LOG.debug("Got 404, proceeding")
                break

            LOG.debug("Found_server=%s" % found_server)

            # TODO(justinsb): Mock doesn't yet do accurate state changes
            #if found_server['status'] != 'deleting':
            #    break
            time.sleep(1)

        # Should be gone
        self.assertFalse(found_server)
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/integrated/test_servers.py/ServersTest._delete_server/original