'Initialize connection between the server and the volume.'

@coordination.synchronized('vsp-host-{self.conf.vsp_storage_id}-{connector[host]}')
def initialize_connection(self, volume, connector):

    targets = {'info': {}, 'list': [], 'lun': {}, 'iqns': {}}
    ldev = utils.get_ldev(volume)
    if (ldev is None):
        msg = utils.output_log(MSG.INVALID_LDEV_FOR_CONNECTION, volume_id=volume['id'])
        raise exception.VSPError(msg)
    target_ports = self.get_target_ports(connector)
    if (self.find_targets_from_storage(targets, connector, target_ports) and self.conf.vsp_group_request):
        self.create_mapping_targets(targets, connector)
    utils.require_target_existed(targets)
    targets['list'].sort()
    for port in target_ports:
        targets['lun'][port] = False
    target_lun = int(self.map_ldev(targets, ldev))
    return {'driver_volume_type': self.driver_info['volume_type'], 'data': self.get_properties(targets, connector, target_lun)}
