'Perform necessary work to make a FC connection.
To be able to create an FC connection from a given host to a
volume, we must:
1. Translate the given WWNN to a host name
2. Create new host on the storage system if it does not yet exist
3. Map the volume to the host if it is not already done
4. Return the connection information for relevant nodes (in the
proper I/O group)'

def _do_initialize_connection(self, volume, connector):

    LOG.debug('enter:    initialize_connection:    volume    %(vol)s    with    connector    %(conn)s', {'vol': volume['id'], 'conn': connector})
    volume_name = self._get_target_vol(volume)
    host_name = self._helpers.get_host_from_connector(connector)
    if (host_name is None):
        host_name = self._helpers.create_host(connector)
    volume_attributes = self._helpers.get_vdisk_attributes(volume_name)
    if (volume_attributes is None):
        msg = (_('initialize_connection:    Failed    to    get    attributes    for    volume    %s.') % volume_name)
        LOG.error(msg)
        raise exception.VolumeDriverException(message=msg)
    multihostmap = self.configuration.storwize_svc_multihostmap_enabled
    lun_id = self._helpers.map_vol_to_host(volume_name, host_name, multihostmap)
    try:
        preferred_node = volume_attributes['preferred_node_id']
        IO_group = volume_attributes['IO_group_id']
    except KeyError as e:
        LOG.error('Did    not    find    expected    column    name    in    lsvdisk:    %s.', e)
        raise exception.VolumeBackendAPIException(data=(_('initialize_connection:    Missing    volume    attribute    for    volume    %s.') % volume_name))
    try:
        preferred_node_entry = None
        io_group_nodes = []
        for node in self._state['storage_nodes'].values():
            if (node['id'] == preferred_node):
                preferred_node_entry = node
            if (node['IO_group'] == IO_group):
                io_group_nodes.append(node)
        if (not len(io_group_nodes)):
            msg = (_('initialize_connection:    No    node    found    in    I/O    group    %(gid)s    for    volume    %(vol)s.') % {'gid': IO_group, 'vol': volume_name})
            LOG.error(msg)
            raise exception.VolumeBackendAPIException(data=msg)
        if (not preferred_node_entry):
            preferred_node_entry = io_group_nodes[0]
            LOG.warning('initialize_connection:    Did    not    find    a    preferred    node    for    volume    %s.', volume_name)
        properties = {}
        properties['target_discovered'] = False
        properties['target_lun'] = lun_id
        properties['volume_id'] = volume['id']
        conn_wwpns = self._helpers.get_conn_fc_wwpns(host_name)
        if (len(conn_wwpns) == 0):
            for node in self._state['storage_nodes'].values():
                conn_wwpns.extend(node['WWPN'])
        properties['target_wwn'] = conn_wwpns
        i_t_map = self._make_initiator_target_map(connector['wwpns'], conn_wwpns)
        properties['initiator_target_map'] = i_t_map
        if ('zvm_fcp' in connector):
            properties['zvm_fcp'] = connector['zvm_fcp']
    except Exception:
        with excutils.save_and_reraise_exception():
            self._do_terminate_connection(volume, connector)
            LOG.error('initialize_connection:    Failed    to    collect    return    properties    for    volume    %(vol)s    and    connector    %(conn)s.\n', {'vol': volume, 'conn': connector})
    LOG.debug('leave:    initialize_connection:\n    volume:    %(vol)s\n    connector    %(conn)s\n    properties:    %(prop)s', {'vol': volume['id'], 'conn': connector, 'prop': properties})
    return {'driver_volume_type': 'fibre_channel', 'data': properties}
