'Build the target_wwns and the initiator target map.'

def _build_initiator_target_map(self, common, connector):

    fc_ports = common.get_active_fc_target_ports()
    all_target_wwns = []
    target_wwns = []
    init_targ_map = {}
    numPaths = 0
    for port in fc_ports:
        all_target_wwns.append(port['portWWN'])
    if (self.lookup_service is not None):
        dev_map = self.lookup_service.get_device_mapping_from_network(connector['wwpns'], all_target_wwns)
        for fabric_name in dev_map:
            fabric = dev_map[fabric_name]
            target_wwns += fabric['target_port_wwn_list']
            for initiator in fabric['initiator_port_wwn_list']:
                if (initiator not in init_targ_map):
                    init_targ_map[initiator] = []
                init_targ_map[initiator] += fabric['target_port_wwn_list']
                init_targ_map[initiator] = list(set(init_targ_map[initiator]))
                for _target in init_targ_map[initiator]:
                    numPaths += 1
        target_wwns = list(set(target_wwns))
    else:
        initiator_wwns = connector['wwpns']
        target_wwns = all_target_wwns
        for initiator in initiator_wwns:
            init_targ_map[initiator] = target_wwns
    return (target_wwns, init_targ_map, numPaths)
