

def get_dst_image(self, src_image_id):
    'Returns active image for VM. If not found, tries to match image\n        based on image name, tenant, checksum and size'
    dst_glance = self.dst_cloud.resources[utils.IMAGE_RESOURCE]
    image = dst_glance.get_active_image_by_id(src_image_id)
    if (image is None):
        src_glance = self.src_cloud.resources[utils.IMAGE_RESOURCE]
        src_image = src_glance.get_image_by_id(src_image_id)
        if (src_image is None):
            return
        dst_tenant = keystone.get_dst_tenant_from_src_tenant_id(self.src_cloud.resources[utils.IDENTITY_RESOURCE], dst_glance.dst_cloud.resources[utils.IDENTITY_RESOURCE], src_image.owner)
        LOG.info("Image with ID '%s' was not found in destination cloud, looking for images in tenant '%s' with checksum '%s', name '%s' and size '%s'", src_image_id, dst_tenant.name, src_image.checksum, src_image.name, src_image.size)
        image = dst_glance.get_active_image_with(dst_tenant.id, src_image.checksum, src_image.name, src_image.size)
    return image

dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/os/actions/transport_instance.py TransportInstance.get_dst_image/VarMisuse@96/196 `self`->`dst_glance`