'Wait for server to disappear from Nova.'

def check_delete_server_complete(self, server_id):

    try:
        server = self.fetch_server(server_id)
    except Exception as exc:
        self.ignore_not_found(exc)
        return True
    if (not server):
        return False
    task_state_in_nova = getattr(server, 'OS-EXT-STS:task_state', None)
    if (task_state_in_nova == 'deleting'):
        return False
    status = self.get_status(server)
    if (status in ('DELETED', 'SOFT_DELETED')):
        return True
    if (status == 'ERROR'):
        fault = getattr(server, 'fault', {})
        message = fault.get('message', 'Unknown')
        code = fault.get('code')
        errmsg = (_('Server    %(name)s    delete    failed:    (%(code)s)    %(message)s') % dict(name=server.name, code=code, message=message))
        raise exception.ResourceInError(resource_status=status, status_reason=errmsg)
    return False
