'Check the image can be clone or not.'

def _is_cloneable(self, image_location, image_meta):

    if (image_location is None):
        return False
    prefix = 'sheepdog://'
    if (not image_location.startswith(prefix)):
        LOG.debug('Image    is    not    stored    in    sheepdog.')
        return False
    if (image_meta['disk_format'] != 'raw'):
        LOG.debug("Image    clone    requires    image    format    to    be    'raw'    but    image    %s(%s)    is    '%s'.", image_location, image_meta['id'], image_meta['disk_format'])
        return False
    (ip, port, name) = image_location[len(prefix):].split(':', 2)
    stdout = self.client.get_vdi_info(name)
    if stdout:
        return True
    else:
        LOG.debug('Can    not    find    vdi    %(image)s,    is    not    cloneable', {'image': name})
        return False
