'Verify that a resizing server is properly resized.
If that\'s the case, confirm the resize, if not raise an error.'

def check_resize(self, server_id, flavor):

    server = self.fetch_server(server_id)
    if ((not server) or (server.status in ('RESIZE', 'ACTIVE'))):
        return False
    if (server.status == 'VERIFY_RESIZE'):
        return True
    else:
        raise exception.Error((_("Resizing    to    '%(flavor)s'    failed,    status    '%(status)s'") % dict(flavor=flavor, status=server.status)))
