'If volume is a clone, return its parent info.
Returns a tuple of (pool, parent, snap). A snapshot may optionally be
provided for the case where a cloned volume has been flattened but it\'s
snapshot still depends on the parent.'

def _get_clone_info(self, volume, volume_name, snap=None):

    try:
        if snap:
            volume.set_snap(snap)
        (pool, parent, parent_snap) = tuple(volume.parent_info())
        if snap:
            volume.set_snap(None)
        if volume_name.endswith('.deleted'):
            volume_name = volume_name[:(- len('.deleted'))]
        if (parent_snap == ('%s.clone_snap' % volume_name)):
            return (pool, parent, parent_snap)
    except self.rbd.ImageNotFound:
        LOG.debug('Volume    %s    is    not    a    clone.', volume_name)
        volume.set_snap(None)
    return (None, None, None)
