'Delete cg snapshot images that are marked for removal
The snapshot index tracks all snapshots that have been removed from
Cinder, and are therefore available for deletion when this operation
is possible.
CG snapshots are tracked by unique sequence numbers that are
associated with 1 or more snapshot images. The sequence numbers are
tracked (relative to the 32 images allowed per group), within the
snapshot index.
This method will purge CG snapshots that have been marked as
available for deletion within the backend persistent store.
:param cg_ref: reference to an E-Series consistent group
:param seq_nums: set of unique sequence numbers associated with the
consistency group
:param bitset: the bitset representing which sequence numbers are
marked for deletion
:return: update for the snapshot index'

def _cleanup_cg_snapshots(self, cg_ref, seq_nums, bitset):

    deleted = 0
    for (i, seq_num) in enumerate(sorted(seq_nums)):
        if bitset.is_set(i):
            self._client.delete_consistency_group_snapshot(cg_ref, seq_num)
            deleted += 1
        else:
            break
    if deleted:
        bitset >>= deleted
        LOG.debug('Deleted    %(count)s    snapshot    images    from    consistency    group:    %(grp)s.', {'count': deleted, 'grp': cg_ref})
    return {cg_ref: repr(bitset)}
