'Get all backup snapshots for the given rbd image.
NOTE: this call is made public since these snapshots must be deleted
before the base volume can be deleted.'

@classmethod
def get_backup_snaps(cls, rbd_image, sort=False):

    snaps = rbd_image.list_snaps()
    backup_snaps = []
    for snap in snaps:
        search_key = cls.backup_snapshot_name_pattern()
        result = re.search(search_key, snap['name'])
        if result:
            backup_snaps.append({'name': result.group(0), 'backup_id': result.group(1), 'timestamp': result.group(2)})
    if sort:
        backup_snaps.sort(key=(lambda x: x['timestamp']), reverse=True)
    return backup_snaps
