Add BGP neighbors from the given settings.

        All valid neighbors are loaded.
        Miss-configured neighbors are ignored and errors are logged.
175908
def _add_neighbors(self, settings):
        
        for neighbor_settings in settings:
            LOG.debug('Adding neighbor settings: %s', neighbor_settings)
            try:
                self.speaker.neighbor_add(**neighbor_settings)
            except RuntimeConfigError as e:
                LOG.exception(e)
739218
protected void registerForPostCommit(Neighbour neighbour,
                                       Neighbours neighbours)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "registerForPostCommit",
        new Object[] { neighbour, neighbours });

    _proxyHandler = null;
    _destination = null;
    _handler = null;
    _neighbour = neighbour;
    _neighbours = neighbours;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "registerForPostCommit");
  }
556014
private void processNeighbors(DoubleDBIDListIter neighbor, ModifiableDBIDs currentCluster, ArrayModifiableDBIDs seeds) {
    final boolean ismetric = getDistanceFunction().isMetric();
    for(; neighbor.valid(); neighbor.advance()) {
      if(processedIDs.add(neighbor)) {
        if(!ismetric || neighbor.doubleValue() > 0.) {
          seeds.add(neighbor);
        }
      }
      else if(!noise.remove(neighbor)) {
        continue;
      }
      currentCluster.add(neighbor);
    }
  }
315595
def add(self, extension):
        
        index = len(self.extensions)
        self.extensions[index] = extension
        for protocol in extension.protocols:
            self.registry[protocol] = index
983973
public void addSNIObserver(Consumer<SNIServerName> observer)
    {
        if (sniObservers == null)
        {
            sniObservers = new ArrayList<>();
        }
        sniObservers.add(observer);
    }
748662
public void setNeighbors(java.util.Collection<NeighborConnectionDetail> neighbors) {
        if (neighbors == null) {
            this.neighbors = null;
            return;
        }

        this.neighbors = new java.util.ArrayList<NeighborConnectionDetail>(neighbors);
    }
459900
def get_bgp_neighbors(self):
        results = {}
        bgp_state_dict = {
            "Idle": {"is_up": False, "is_enabled": True},
            "Active": {"is_up": False, "is_enabled": True},
            "Open": {"is_up": False, "is_enabled": True},
            "Established": {"is_up": True, "is_enabled": True},
            "Closing": {"is_up": True, "is_enabled": True},
            "Shutdown": {"is_up": False, "is_enabled": False},
        }
        
        af_name_dict = {
            1: {1: "ipv4", 128: "vpnv4"},
            2: {1: "ipv6", 128: "vpnv6"},
            25: {70: "l2vpn"},
        }

        try:
            cmd = "show bgp all summary vrf all"
            vrf_list = self._get_command_table(cmd, "TABLE_vrf", "ROW_vrf")
        except NXAPICommandError:
            vrf_list = []

        for vrf_dict in vrf_list:
            result_vrf_dict = {
                "router_id": py23_compat.text_type(vrf_dict["vrf-router-id"]),
                "peers": {},
            }

            af_list = vrf_dict.get("TABLE_af", {}).get("ROW_af", [])
            if isinstance(af_list, dict):
                af_list = [af_list]

            for af_dict in af_list:
                saf_dict = af_dict.get("TABLE_saf", {}).get("ROW_saf", {})
                neighbors_list = saf_dict.get("TABLE_neighbor", {}).get(
                    "ROW_neighbor", []
                )

                if isinstance(neighbors_list, dict):
                    neighbors_list = [neighbors_list]

                for neighbor_dict in neighbors_list:
                    neighborid = napalm.base.helpers.ip(neighbor_dict["neighborid"])
                    remoteas = napalm.base.helpers.as_number(
                        neighbor_dict["neighboras"]
                    )
                    state = py23_compat.text_type(neighbor_dict["state"])

                    bgp_state = bgp_state_dict[state]
                    afid_dict = af_name_dict[int(af_dict["af-id"])]
                    safi_name = afid_dict[int(saf_dict["safi"])]

                    result_peer_dict = {
                        "local_as": int(vrf_dict["vrf-local-as"]),
                        "remote_as": remoteas,
                        "remote_id": neighborid,
                        "is_enabled": bgp_state["is_enabled"],
                        "uptime": -1,
                        "description": "",
                        "is_up": bgp_state["is_up"],
                        "address_family": {
                            safi_name: {
                                "sent_prefixes": -1,
                                "accepted_prefixes": -1,
                                "received_prefixes": int(
                                    neighbor_dict["prefixreceived"]
                                ),
                            }
                        },
                    }
                    result_vrf_dict["peers"][neighborid] = result_peer_dict

            vrf_name = vrf_dict["vrf-name-out"]
            if vrf_name == "default":
                vrf_name = "global"
            results[vrf_name] = result_vrf_dict
        return results
1141660
def add_providers(self, *providers: Type[BaseProvider]) -> None:
        
        for provider in providers:
            self.add_provider(provider)
1284350
private void setUrlParserFromEndpoints(List<String> endpoints, int port) {
    List<HostAddress> addresses = new ArrayList<>();
    for (String endpoint : endpoints) {
      HostAddress newHostAddress = new HostAddress(endpoint, port, null);
      addresses.add(newHostAddress);
    }

    synchronized (urlParser) {
      urlParser.setHostAddresses(addresses);
    }
  }
695404
def add_edges(self, edges, *args, **kwargs):
        
        for edge in edges:
            self.add_edge(edge, *args, **kwargs)
363034
def set_all_neighbors_data(self, data, done,  key):
        
        # The order of this for loop is important because the topleft gets
        # it's data from the left neighbor, which should have already been
        # updated...
        for side in ['left', 'right', 'top', 'bottom', 'topleft',
                     'topright', 'bottomleft', 'bottomright']:
            self.set_neighbor_data(side, data, key, 'data')
#            self.set_neighbor_data(side, todo, key, 'todo')
            self.set_neighbor_data(side, done, key, 'done')
1080803
def append_seeding_neighbors(self, nodes: Union[BaseEntity, List[BaseEntity], List[Dict]]) -> Seeding:
        
        return self.seeding.append_neighbors(nodes)
994581
void addNeighbour(Neighbour neighbour)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addNeighbour", neighbour);

    final Neighbour[] tmp = new Neighbour[iNeighbours.length + 1];
    System.arraycopy(iNeighbours, 0, tmp, 0, iNeighbours.length);
    tmp[iNeighbours.length] = neighbour;

    iNeighbours = tmp;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addNeighbour");
  }
773061
def add_backend(self, backend):
        ""
        if backend in self.get_backends():
            return
        backend_link, created = BackendLink.all_tenants.get_or_create(backend=backend)
        self.backendlink_set.add(backend_link)
528936
private void configureNeighbours() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "configureNeighbours");

        try {
            JsAdminService service = JsMainAdminComponentImpl.getJsAdminService();

            // Check that the admin service is initialized before calling it.
            // Tell TRM the set of messaging engines on the bus
            _messagingEnginesOnBus = new HashSet<SIBUuid8>();
            // Add this messaging engine to the list.
            // messagingEnginesOnBus.add(getMessagingEngineUuid());

            Set mes = null;

            // Check that the admin service is initialized before calling it.
            if (service.isInitialized())
                mes = service.getMessagingEngineSet(_engine.getBusName());

            if (mes != null) {
                Iterator iterator = mes.iterator();

                // Create a transaction for creating the Neighbours with.
                LocalTransaction transaction = _txManager
                                .createLocalTransaction(true);

                // Cycle through the list of messaging engines.
                while (iterator.hasNext()) {
                    SIBUuid8 jsEngineUUID = new SIBUuid8((String) iterator
                                    .next());

                    if (!jsEngineUUID.equals(new SIBUuid8(_engine.getUuid()))) {
                        // Create the Neighbour
                        _multiMEProxyHandler
                                        .createNeighbour(jsEngineUUID, _engine
                                                        .getBusName(),
                                                         (Transaction) transaction);
                    }

                    _messagingEnginesOnBus.add(jsEngineUUID);
                }

                transaction.commit();
            }
        } catch (SIException e) {
            // FFDC
            FFDCFilter
                            .processException(
                                              e,
                                              "com.ibm.ws.sib.processor.impl.MessageProcessor.configureNeighbours",
                                              "1:2223:1.445", this);

            SibTr.exception(tc, e);

            SIErrorException finalE = new SIErrorException(
                            nls
                                            .getFormattedMessage(
                                                                 "MESSAGE_PROCESSOR_CONFIGURE_NEIGHBOURS_ERROR_CWSIP0391",
                                                                 new Object[] { getMessagingEngineName(), e },
                                                                 null), e);

            if (TraceComponent.isAnyTracingEnabled()
                && tc.isEntryEnabled())
                SibTr.exit(tc, "configureNeighbours", finalE);

            SibTr.error(tc,
                        "MESSAGE_PROCESSOR_CONFIGURE_NEIGHBOURS_ERROR_CWSIP0391",
                        new Object[] { getMessagingEngineName(),
                                      SIMPUtils.getStackTrace(e) });

            throw finalE;
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "configureNeighbours");
    }
1252511
private void addProxyConfig(RequestConfig.Builder requestConfigBuilder, HttpClientSettings settings) {
        if (settings.isProxyEnabled() && settings.isAuthenticatedProxy() && settings.getProxyAuthenticationMethods() != null) {
            List<String> apacheAuthenticationSchemes = new ArrayList<String>();

            for (ProxyAuthenticationMethod authenticationMethod : settings.getProxyAuthenticationMethods()) {
                apacheAuthenticationSchemes.add(toApacheAuthenticationScheme(authenticationMethod));
            }

            requestConfigBuilder.setProxyPreferredAuthSchemes(apacheAuthenticationSchemes);
        }
    }
1332944
def add_edges(self, from_idx, to_idx, weight=1, symmetric=False, copy=False):
    ''''''
    raise NotImplementedError()