'Delete the given backup from Ceph object store.'

def delete_backup(self, backup):

    LOG.debug('Delete    started    for    backup=%s', backup.id)
    delete_failed = False
    has_pool = True
    try:
        self._try_delete_base_image(backup)
    except self.rbd.ImageNotFound:
        LOG.warning('RBD    image    for    backup    %(backup)s    of    volume    %(volume)s    not    found.    Deleting    backup    metadata.', {'backup': backup.id, 'volume': backup.volume_id})
        delete_failed = True
    except self.rados.ObjectNotFound:
        LOG.warning("The    pool    %(pool)s    doesn't    exist.", {'pool': backup.container})
        delete_failed = True
        has_pool = False
    if has_pool:
        with rbd_driver.RADOSClient(self, backup.container) as client:
            VolumeMetadataBackup(client, backup.id).remove_if_exists()
    if delete_failed:
        LOG.info("Delete    of    backup    '%(backup)s'    for    volume    '%(volume)s'    finished    with    warning.", {'backup': backup.id, 'volume': backup.volume_id})
    else:
        LOG.debug("Delete    of    backup    '%(backup)s'    for    volume    '%(volume)s'    finished.", {'backup': backup.id, 'volume': backup.volume_id})
