Add agents from :attr:`conns` to :attr:`connections`.

        :param list conns: A list of ``(addr, kwargs)``-tuples
        :returns:
            A boolean list, as returned by
            :meth:`~creamas.core.agent.CreativeAgent.add_connections`.
767176
def add_connections(self, conns):
        
        rets = []
        for addr, kwargs in conns:
            r = self.add_connection(addr, **kwargs)
            rets.append(r)
        return rets
1170893
def merge_list(self, new_list):
        
        total = len(self.list)

        for ip, port in new_list:
            if (ip, port) not in self.list:
                self.mark_good((ip, port))

        if len(self.list) > total:
            self._LOG.debug("Added %d new CM addresses." % (len(self.list) - total))
775521
def add_connection(self, host):
        
        self.hosts.append(host)
        self.set_connections(self.hosts)
396221
def AddConnectedPeer(self, peer):
        
        # if present
        self.RemoveFromQueue(peer.address)
        self.AddKnownAddress(peer.address)

        if len(self.Peers) > settings.CONNECTED_PEER_MAX:
            peer.Disconnect("Max connected peers reached", isDead=False)

        if peer not in self.Peers:
            self.Peers.append(peer)
        else:
            # either peer is already in the list and it has reconnected before it timed out on our side
            # or it's trying to connect multiple times
            # or we hit the max connected peer count
            self.RemoveKnownAddress(peer.address)
            peer.Disconnect()
433260
def inputConnections(self, cls=None):
        
        scene = self.scene()
        if not scene:
            return []
        
        if not cls:
            cls = XNodeConnection
        
        output = []
        for item in scene.items():
            if not isinstance(item, cls):
                continue
            
            if item.inputNode() == self:
                output.append(item)
        
        return output
1177017
def _new_conn(self):
        
        extra_kw = {}
        if self.source_address:
            extra_kw['source_address'] = self.source_address

        if self.socket_options:
            extra_kw['socket_options'] = self.socket_options

        try:
            conn = connection.create_connection(
                (self._dns_host, self.port), self.timeout, **extra_kw)

        except SocketTimeout as e:
            raise ConnectTimeoutError(
                self, "Connection to %s timed out. (connect timeout=%s)" %
                (self.host, self.timeout))

        except SocketError as e:
            raise NewConnectionError(
                self, "Failed to establish a new connection: %s" % e)

        return conn
282809
def configure(self, config):
        
        connections = ConnectionParams.many_from_config(config)
        for connection in connections:
            self._connections.append(connection)
666075
def nic_add(self, bridge, nic):
        

        args = {
            'name': bridge,
            'nic': nic,
        }

        self._nic_add_chk.check(args)

        return self._client.json('bridge.nic-add', args)
726469
def add_connection(uri) #:nodoc:
      publisher = SlaveProxy.new(@caller_id, uri)
      begin
        protocol, host, port = publisher.request_topic(@topic_name, [["TCPROS"]])
        if protocol == "TCPROS"
          connection = TCPROS::Client.new(host, port, @caller_id, @topic_name, @topic_type, uri, @tcp_no_delay)
          connection.start
        else
          puts "not support protocol: #{protocol}"
          raise "not support protocol: #{protocol}"
        end
        connection.id = "#{@topic_name}_in_#{@connection_id_number}"
        @connection_id_number += 1
        @connections.push(connection)
        return connection
      rescue
#	puts "request to #{uri} fail"
        return false
      end
    end
1068049
def addBrokerList(self, aBrokerInfoList):
        """"""
        self.clusterAvailable.update(set(aBrokerInfoList))

        # If we need another connection to a fellow broker
        # TODO: only connect to a given number
        for aBrokerInfo in aBrokerInfoList:
            self.clusterSocket.connect(
                "tcp://{hostname}:{port}".format(
                    hostname=aBrokerInfo.hostname,
                    port=aBrokerInfo.task_port,
                )
            )
            self.cluster.append(aBrokerInfo)
1211607
def get_connections(self):
        
        con = []
        maxconn = self.max_connectivity
        for ii in range(0, maxconn.shape[0]):
            for jj in range(0, maxconn.shape[1]):
                if maxconn[ii][jj] != 0:
                    dist = self.s.get_distance(ii, jj)
                    con.append([ii, jj, dist])
        return con
607283
def add(self, dn: str, mod_list: dict) -> None:
        

        return self._do_with_retry(lambda obj: obj.add_s(dn, mod_list))
1189798
def list_dhcp_agent_hosting_networks(self, network, **_params):
        """"""
        return self.get((self.network_path + self.DHCP_AGENTS) % network,
                        params=_params)
218179
def add_member(self, urls):
        
        member_add_request = etcdrpc.MemberAddRequest(peerURLs=urls)

        member_add_response = self.clusterstub.MemberAdd(
            member_add_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )

        member = member_add_response.member
        return etcd3.members.Member(member.ID,
                                    member.name,
                                    member.peerURLs,
                                    member.clientURLs,
                                    etcd_client=self)
440720
def add_ip_address_list(list_name):
    '''
    

    '''
    payload = {"jsonrpc": "2.0",
               "id": "ID0",
               "method": "add_policy_ip_addresses_list",
               "params": [{"list_name": list_name}]}

    response = __proxy__['bluecoat_sslv.call'](payload, True)

    return _validate_change_result(response)
561392
def __join_connections(self):
        

        interval_s = nsq.config.client.CONNECTION_CLOSE_AUDIT_WAIT_S
        graceful_wait_s = nsq.config.client.CONNECTION_QUIT_CLOSE_TIMEOUT_S
        graceful = False

        while graceful_wait_s > 0:
            if not self.__connections:
                break

            connected_list = [c.is_connected for (n, c, g) in self.__connections]
            if any(connected_list) is False:
                graceful = True
                break

            # We need to give the greenlets periodic control, in order to finish 
            # up.

            gevent.sleep(interval_s)
            graceful_wait_s -= interval_s

        if graceful is False:
            connected_list = [c for (n, c, g) in self.__connections if c.is_connected]
            _logger.error("We were told to terminate, but not all "
                          "connections were stopped: [%s]", connected_list)
706664
def _createConnection(self, connections):
        

        for c in connections:
            # Create GSSHAPY Connection object
            connection = Connection(slinkNumber=c['slinkNumber'],
                                    upSjuncNumber=c['upSjunc'],
                                    downSjuncNumber=c['downSjunc'])

            # Associate Connection with StormPipeNetworkFile
            connection.stormPipeNetworkFile = self