IOS implementation of get_lldp_neighbors_detail.

        Calls get_lldp_neighbors.
554010
def get_lldp_neighbors_detail(self, interface=''):
        
        lldp = {}
        lldp_neighbors = self.get_lldp_neighbors()

        # Filter to specific interface
        if interface:
            lldp_data = lldp_neighbors.get(interface)
            if lldp_data:
                lldp_neighbors = {interface: lldp_data}
            else:
                lldp_neighbors = {}

        for interface in lldp_neighbors:
            local_port = interface
            lldp_fields = self._lldp_detail_parser(interface)
            # Convert any 'not advertised' to 'N/A'
            for field in lldp_fields:
                for i, value in enumerate(field):
                    if 'not advertised' in value:
                        field[i] = 'N/A'
            number_entries = len(lldp_fields[0])

            # re.findall will return a list. Make sure same number of entries always returned.
            for test_list in lldp_fields:
                if len(test_list) != number_entries:
                    raise ValueError("Failure processing show lldp neighbors detail")

            # Standardize the fields
            port_id, port_description, chassis_id, system_name, system_description, \
                system_capabilities, enabled_capabilities, remote_address = lldp_fields
            standardized_fields = zip(port_id, port_description, chassis_id, system_name,
                                      system_description, system_capabilities,
                                      enabled_capabilities, remote_address)

            lldp.setdefault(local_port, [])
            for entry in standardized_fields:
                remote_port_id, remote_port_description, remote_chassis_id, remote_system_name, \
                    remote_system_description, remote_system_capab, remote_enabled_capab, \
                    remote_mgmt_address = entry

                lldp[local_port].append({
                    'parent_interface': u'N/A',
                    'remote_port': remote_port_id,
                    'remote_port_description': remote_port_description,
                    'remote_chassis_id': remote_chassis_id,
                    'remote_system_name': remote_system_name,
                    'remote_system_description': remote_system_description,
                    'remote_system_capab': remote_system_capab,
                    'remote_system_enable_capab': remote_enabled_capab})

        return lldp
777517
def getDetails(self, ip_address=None):
        """"""
        raw_details = self._requestDetails(ip_address)
        raw_details['country_name'] = self.countries.get(raw_details.get('country'))
        raw_details['ip_address'] = ipaddress.ip_address(raw_details.get('ip'))
        raw_details['latitude'], raw_details['longitude'] = self._read_coords(raw_details.get('loc'))
        return Details(raw_details)
1026345
def neighbors(self, obj):
        
        neighbors = set([])
        
        for e in self.node_links[obj]:
            neighbors.update(set(self.edge_links[e]))
        
        return list(neighbors - set([obj]))
483860
private List<ODocument> getNeighborsOfModel(String model) {
        String query = String.format("select from Models where in.out.%s in [?]", OGraphDatabase.LABEL);
        List<ODocument> neighbors = graph.query(new OSQLSynchQuery<ODocument>(query), model);
        return neighbors;
    }
679253
def inspect_node_neighborhood(nlinks, msinds, node_msindex):
    
    # seed_indexes = np.nonzero(node_seed)
    # selected_inds = msinds[seed_indexes]
    # node_msindex = selected_inds[0]

    node_neighbor_edges = get_neighborhood_edes(nlinks, node_msindex)

    node_neighbor_seeds = np.zeros_like(msinds, dtype=np.int8)
    for neighboor_ind in np.unique(node_neighbor_edges[:, :2].ravel()):
        node_neighbor_ind = np.where(msinds == neighboor_ind)
        node_neighbor_seeds[node_neighbor_ind] = 2

    node_neighbor_seeds[np.where(msinds == node_msindex)] = 1

    # node_coordinates = np.unravel_index(selected_voxel_ind, msinds.shape)
    # node_neighbor_coordinates = np.unravel_index(np.unique(node_neighbor_edges[:, :2].ravel()), msinds.shape)
    return node_neighbor_edges, node_neighbor_seeds
1243449
def neighbors(self, **kwargs):

        
        urn = "{urn:brocade.com:mgmt:brocade-lldp-ext}"

        result = []
        has_more = ''
        last_ifindex = ''
        rbridge_id = None
        if 'rbridge_id' in kwargs:
            rbridge_id = kwargs.pop('rbridge_id')
        while (has_more == '') or (has_more == 'true'):
            request_lldp = self.get_lldp_neighbors_request(last_ifindex,
                                                           rbridge_id)
            lldp_result = self._callback(request_lldp, 'get')
            has_more = lldp_result.find('%shas-more' % urn).text

            for item in lldp_result.findall('%slldp-neighbor-detail' % urn):
                local_int_name = item.find('%slocal-interface-name' % urn).text
                local_int_mac = item.find('%slocal-interface-mac' % urn).text
                last_ifindex = item.find(
                    '%slocal-interface-ifindex' % urn).text
                remote_int_name = item.find(
                    '%sremote-interface-name' % urn).text
                remote_int_mac = item.find('%sremote-interface-mac' % urn).text
                remote_chas_id = item.find('%sremote-chassis-id' % urn).text
                try:
                    remote_sys_name = item.find(
                        '%sremote-system-name' % urn).text
                except AttributeError:
                    remote_sys_name = ''
                try:
                    remote_sys_desc = item.find('%sremote-system-description' %
                                                urn).text
                except AttributeError:
                    remote_sys_desc = ''
                try:
                    remote_mgmt_addr = item.find(
                        '%sremote-management-address' %
                        urn).text
                except AttributeError:
                    remote_mgmt_addr = ''
                if 'Fo ' in local_int_name:
                    local_int_name = local_int_name.replace(
                        'Fo ',
                        'FortyGigabitEthernet '
                    )
                if 'Te ' in local_int_name:
                    local_int_name = local_int_name.replace(
                        'Te ',
                        'TenGigabitEthernet '
                    )

                item_results = {'local-int-name': local_int_name,
                                'local-int-mac': local_int_mac,
                                'remote-int-name': remote_int_name,
                                'remote-int-mac': remote_int_mac,
                                'remote-chassis-id': remote_chas_id,
                                'remote-system-name': remote_sys_name,
                                'remote-system-description': remote_sys_desc,
                                'remote-management-address': remote_mgmt_addr}
                result.append(item_results)

        return result
346228
def find(self, i):
        '''
        
        '''
        current = i
        edge_list = []
        while len(self.get_neighbors(current)) != 0:
            successor = self.get_neighbors(current)[0]
            edge_list.append((current, successor))
            current = successor
        if self.optimize:
            for e in edge_list:
                if e[1] != current:
                    self.del_edge((e[0], e[1]))
                    self.add_edge(e[0], current)
        return current
239833
def get_next_neighbour(i, paragraphs, ignore_neargood):
    
    return _get_neighbour(i, paragraphs, ignore_neargood, 1, len(paragraphs))
698682
def _load_neighbors_from_external_source(self) -> None:
        
        graph: IGraphWrapper = self._graph
        ig_vertex: IGraphVertex = graph.wrapped_graph.vs[self._igraph_index]
        ig_neighbors: List[IGraphVertex] = ig_vertex.neighbors()
        for ig_neighbor in ig_neighbors:
            try:
                name: str = ig_neighbor["name"]
            except KeyError:
                name: str = str(ig_neighbor.index)

            try:
                external_id: Optional[str] = ig_neighbor["external_id"]
            except KeyError:
                external_id: Optional[str] = None

            neighbor: IGraphNode = graph.nodes.get_node_by_name(name,
                                                                can_validate_and_load=True,
                                                                external_id=external_id)
            graph.add_edge(self, neighbor)
542391
def parents(self, p_todo, p_only_direct=False):
        
        parents = self._depgraph.incoming_neighbors(
            hash(p_todo), not p_only_direct)
        return [self._tododict[parent] for parent in parents]
296042
def get_neighbor_in_filter(neigh_ip_address):
    """"""
    core = CORE_MANAGER.get_core_service()
    peer = core.peer_manager.get_by_addr(neigh_ip_address)
    return peer.in_filters
750652
def get_neighbor_attribute_map(neigh_ip_address, route_dist=None,
                               route_family=VRF_RF_IPV4):
    """"""
    core = CORE_MANAGER.get_core_service()
    peer = core.peer_manager.get_by_addr(neigh_ip_address)
    at_maps_key = const.ATTR_MAPS_LABEL_DEFAULT

    if route_dist is not None:
        at_maps_key = ':'.join([route_dist, route_family])
    at_maps = peer.attribute_maps.get(at_maps_key)
    if at_maps:
        return at_maps.get(const.ATTR_MAPS_ORG_KEY)
    else:
        return []
1073938
def _neighbors(self,v):
        
        assert self.layout.dag
        dirv = self.layout.dirv
        grxv = self.layout.grx[v]
        try: #(cache)
            return grxv.nvs[dirv]
        except AttributeError:
            grxv.nvs={-1:v.N(-1),+1:v.N(+1)}
            if grxv.dummy: return grxv.nvs[dirv]
            # v is real, v.N are graph neigbors but we need layers neighbors
            for d in (-1,+1):
                tr=grxv.rank+d
                for i,x in enumerate(v.N(d)):
                    if self.layout.grx[x].rank==tr:continue
                    e=v.e_with(x)
                    dum = self.layout.ctrls[e][tr]
                    grxv.nvs[d][i]=dum
            return grxv.nvs[dirv]
537856
def get_neighbor_names(self, node_name: str, order: int = 1) -> list:
        
        logger.info("In get_neighbor_names()")
        node = self.graph.vs.find(name=node_name)
        neighbors = self.graph.neighborhood(node, order=order)
        names = self.graph.vs[neighbors]["name"]
        names.append(node_name)
        return list(names)
792221
function _findMatchingMac(nodeLldpData, lldpMacList) {
        var relationsList = {};
        return Promise.all(
        _.forEach(_.keys(nodeLldpData.data), function (ethPort) {
            //validate mac first
            var lldpMac = catalogSearch.getPath(nodeLldpData.data[ethPort], 'chassis.mac');
            if (!lldpMac) {
                throw new Error('cant find mac address in lldp data for node ' +
                    nodeLldpData.node + ' port ' + ethPort);
            }
            if (_validateMacStrFormat(lldpMac)) {
                lldpMac = _adjustMacStrFormat(lldpMac);
                if (lldpMacList.indexOf(lldpMac) >= 0) {
                    var singleEntry = {
                        destMac: nodeLldpData.data[ethPort].chassis.mac,
                        destPort: nodeLldpData.data[ethPort].port.ifname
                    };
                    relationsList[ethPort] = singleEntry;
                }
            } else {
                throw new Error('mac: ' + lldpMac + ' bad format',
                    +nodeLldpData.node + ' port ' + ethPort);
            }
        }))
        .then(function () {
            return Promise.resolve(relationsList);
        });
    }
48294
Neighbour getRecoveredNeighbour(SIBUuid8 neighbourUuid)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "getRecoveredNeighbour", neighbourUuid);

      Neighbour neighbour = null;
      synchronized(_recoveredNeighbours)
      {
        neighbour = (Neighbour) _recoveredNeighbours.get(neighbourUuid);
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "getRecoveredNeighbour", neighbour);

      return neighbour;
    }
488495
public DelaunayTriangle neighborAcross( TriangulationPoint opoint )
    {
        if( opoint == points[0] )
        {
            return neighbors[0];
        }
        else if( opoint == points[1] )
        {
            return neighbors[1];
        }
        return neighbors[2];
    }