def block_pull(request, uuid):
    domain = libvirtUtils.get_domain_by_uuid(uuid)
    domain_name = domain.name()
    image_path = libvirtUtils.get_image_for_domain(domain.UUIDString())
    if osUtils.is_image_thin_provisioned(image_path):
        logger.debug('Found thinly provisioned image, promoting...')
        rv = libvirtUtils.promote_instance_to_image(domain_name)
        if (rv is None):
            messages.info(request, 'Image already promoted. Shut down the instance to perform a clone.')
        elif rv:
            messages.info(request, 'Promoting thinly provisioned image')
        else:
            messages.info(request, 'Error Promoting image!')
    else:
        messages.info(request, 'Image is already promoted. You may now shutdown the image and perform a Clone')
        logger.debug('Image is already promoted')
    return HttpResponseRedirect('/ajax/manageHypervisor/')
def block_pull(request, uuid):
    domain = libvirtUtils.get_domain_by_uuid(uuid)
    domain_name = domain.name()
    image_path = libvirtUtils.get_image_for_domain(domain.UUIDString())
    if osUtils.is_image_thin_provisioned(image_path):
        logger.debug('Found thinly provisioned image, promoting...')
        rv = libvirtUtils.promote_instance_to_image(domain_name)
        if (rv is None):
            messages.info(request, 'Image already promoted. Shut down the instance to perform a clone.')
        elif rv:
            messages.info(request, 'Promoting thinly provisioned image')
        else:
            messages.info(request, 'Error Promoting image!')
    else:
        messages.info(request, 'Image is already promoted. You may now shutdown the image and perform a Clone')
        logger.debug('Image is already promoted')
    return HttpResponseRedirect('/ajax/manageHypervisor/')