'Delete the image.
:param image_repo: The instance of ImageRepo
:param image: The image that will be deleted'

def _delete(self, image_repo, image):

    try:
        if (image_repo and image):
            image.status = 'killed'
            image_repo.save(image)
    except Exception as e:
        msg = (_LE('Unable    to    delete    image    %(image_id)s:    %(e)s') % {'image_id': image.image_id, 'e': encodeutils.exception_to_unicode(e)})
        LOG.exception(msg)
