'Return True if snapshot exists in base image.'

def _snap_exists(self, base_name, snap_name, client):

    base_rbd = self.rbd.Image(client.ioctx, base_name, read_only=True)
    try:
        snaps = base_rbd.list_snaps()
    finally:
        base_rbd.close()
    if (snaps is None):
        return False
    for snap in snaps:
        if (snap['name'] == snap_name):
            return True
    return False
