'Allow connection to connector and return connection info.'

def initialize_connection(self, volume, connector):

    LOG.debug('initialize_connection,    volume    id:    %(vid)s,    protocol:    %(prtcl)s.', {'vid': volume['id'], 'prtcl': self.protocol})
    self.conn = self._get_eternus_connection()
    vol_instance = self._find_lun(volume)
    if (vol_instance is None):
        msg = (_('initialize_connection,    volume:    %(volume)s,    Volume    not    found.') % {'volume': volume['name']})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    target_portlist = self._get_target_port()
    mapdata = self._get_mapdata(vol_instance, connector, target_portlist)
    if mapdata:
        target_lun = mapdata.get('target_lun', None)
        target_luns = mapdata.get('target_luns', None)
        LOG.info('initialize_connection,    volume:    %(volume)s,    target_lun:    %(target_lun)s,    target_luns:    %(target_luns)s,    Volume    is    already    mapped.', {'volume': volume['name'], 'target_lun': target_lun, 'target_luns': target_luns})
    else:
        self._map_lun(vol_instance, connector, target_portlist)
        mapdata = self._get_mapdata(vol_instance, connector, target_portlist)
    mapdata['target_discovered'] = True
    mapdata['volume_id'] = volume['id']
    if (self.protocol == 'fc'):
        device_info = {'driver_volume_type': 'fibre_channel', 'data': mapdata}
    elif (self.protocol == 'iSCSI'):
        device_info = {'driver_volume_type': 'iscsi', 'data': mapdata}
    LOG.debug('initialize_connection,    device_info:%(info)s.', {'info': device_info})
    return device_info
