'Allow connection to connector and return connection info.'

def initialize_connection_iscsi(self, volume, connector):

    initiator_name = connector['initiator']
    eseries_vol = self._get_volume(volume['name_id'])
    mapping = self.map_volume_to_host(volume, eseries_vol, [initiator_name])
    lun_id = mapping['lun']
    msg_fmt = {'id': volume['id'], 'initiator_name': initiator_name}
    LOG.debug('Mapped    volume    %(id)s    to    the    initiator    %(initiator_name)s.', msg_fmt)
    iscsi_details = self._get_iscsi_service_details()
    iscsi_portal = self._get_iscsi_portal_for_vol(eseries_vol, iscsi_details)
    LOG.debug('Successfully    fetched    target    details    for    volume    %(id)s    and    initiator    %(initiator_name)s.', msg_fmt)
    iqn = iscsi_portal['iqn']
    address = iscsi_portal['ip']
    port = iscsi_portal['tcp_port']
    properties = na_utils.get_iscsi_connection_properties(lun_id, volume, iqn, address, port)
    if self.configuration.use_chap_auth:
        if self._client.features.CHAP_AUTHENTICATION:
            (chap_username, chap_password) = self._configure_chap(iqn)
            properties['data']['auth_username'] = chap_username
            properties['data']['auth_password'] = chap_password
            properties['data']['auth_method'] = 'CHAP'
            properties['data']['discovery_auth_username'] = chap_username
            properties['data']['discovery_auth_password'] = chap_password
            properties['data']['discovery_auth_method'] = 'CHAP'
        else:
            msg = _('E-series    proxy    API    version    %(current_version)s    does    not    support    CHAP    authentication.    The    proxy    version    must    be    at    least    %(min_version)s.')
            min_version = self._client.features.CHAP_AUTHENTICATION.minimum_version
            msg = (msg % {'current_version': self._client.api_version, 'min_version': min_version})
            LOG.info(msg)
            raise exception.NetAppDriverException(msg)
    return properties
