'Check if a volume is in a replication session.
:param array: the array serial number
:param device_id: the device id
:returns: snapvx_tgt -- bool, snapvx_src -- bool,
rdf_grp -- list or None'

def is_vol_in_rep_session(self, array, device_id):

    snapvx_src = False
    snapvx_tgt = False
    rdf_grp = None
    volume_details = self.get_volume(array, device_id)
    if volume_details:
        LOG.debug('Vol    details:    %(vol)s', {'vol': volume_details})
        if volume_details.get('snapvx_target'):
            snapvx_tgt = volume_details['snapvx_target']
        if volume_details.get('snapvx_source'):
            snapvx_src = volume_details['snapvx_source']
        if volume_details.get('rdfGroupId'):
            rdf_grp = volume_details['rdfGroupId']
    return (snapvx_tgt, snapvx_src, rdf_grp)
