'Driver entry point to attach a volume to an instance.'

def initialize_connection(self, volume, connector):

    LOG.info('Entering    initialize_connection    volume=%(vol)s    connector=%(conn)s    location=%(loc)s', {'vol': volume, 'conn': connector, 'loc': volume['provider_location']})
    initiator_name = connector['initiator']
    initiator_group_name = self._get_igroupname_for_initiator(initiator_name)
    if (not initiator_group_name):
        initiator_group_name = self._create_igroup_for_initiator(initiator_name, None)
    LOG.info('Initiator    group    name    is    %(grp)s    for    initiator    %(iname)s', {'grp': initiator_group_name, 'iname': initiator_name})
    self.APIExecutor.add_acl(volume, initiator_group_name)
    (iscsi_portal, iqn) = volume['provider_location'].split()
    if (self._group_target_name is not None):
        lun_num = self.get_lun_number(volume, initiator_group_name)
    else:
        lun_num = LUN_ID
    properties = {}
    properties['target_portal'] = iscsi_portal
    properties['target_iqn'] = iqn
    properties['target_lun'] = int(lun_num)
    properties['volume_id'] = volume['id']
    return {'driver_volume_type': 'iscsi', 'data': properties}
