'return mapping information.'

def _get_mapdata(self, vol_instance, connector, target_portlist):

    mapdata = None
    multipath = connector.get('multipath', False)
    LOG.debug('_get_mapdata,    volume    name:    %(vname)s,    protocol:    %(prtcl)s,    multipath:    %(mpath)s.', {'vname': vol_instance['ElementName'], 'prtcl': self.protocol, 'mpath': multipath})
    aglist = self._find_affinity_group(connector, vol_instance)
    if (not aglist):
        LOG.debug('_get_mapdata,    ag_list:%s.', aglist)
    elif (self.protocol == 'fc'):
        mapdata = self._get_mapdata_fc(aglist, vol_instance, target_portlist)
    elif (self.protocol == 'iSCSI'):
        mapdata = self._get_mapdata_iscsi(aglist, vol_instance, multipath)
    LOG.debug('_get_mapdata,    mapdata:    %s.', mapdata)
    return mapdata
