def rebuild_server(self, server, image, name=None, admin_password=None,
                       **attrs):
        if isinstance(image, _image.Image):
            image_ref = image.id
        else:
            image_obj = self.find_image(image)
            if image_obj:
                image_ref = image_obj.id
            else:
                # the 'image' could be a full url
                image_ref = image

        server = _server.Server.from_id(server)
        return server.rebuild(self.session, name, image_ref, admin_password,
                              **attrs)
Rebuild a server
dataset/ETHPy150Open openstack/python-openstacksdk/openstack/compute/v2/_proxy.py/Proxy.rebuild_server