Search for all connections between this and another port.
10447
def get_connections_by_dest(self, dest):
        ''''''
        with self._mutex:
            res = []
            for c in self.connections:
                if c.has_port(self) and c.has_port(dest):
                    res.append(c)
            return res
641198
def get_connections(self):
        """"""

        if float(self._dsversion) < 10:
            connections = self._extract_legacy_connection()
        else:
            connections = self._extract_federated_connections()
        return connections
970612
def ports(self):
        

        if not self.get_objects_by_type('port'):
            self.inventory()
        return {int(p.index.split('/')[1]): p for p in self.get_objects_by_type('port')}
171173
def get_nexus_switchport_binding(port_id, switch_ip):
    """"""
    LOG.debug("get_nexus_switchport_binding() called")
    return _lookup_all_nexus_bindings(port_id=port_id,
                                      switch_ip=switch_ip)
319059
def get_connections(self):
        
        path = Client.urls['all_connections']
        conns = self._call(path, 'GET')
        return conns
405329
def find_interconnect_ports(self):
        

        phy_port_list = self.ext_br_obj.get_port_name_list()
        int_port_list = self.integ_br_obj.get_port_name_list()
        for port in phy_port_list:
            # Use get Interface  xxx type
            is_patch = ovs_lib.is_patch(self.root_helper, port)
            if is_patch:
                # Get the peer for this patch
                peer_port = ovs_lib.get_peer(self.root_helper, port)
                if peer_port in int_port_list:
                    return port, peer_port
        # A solution is needed for veth pairs also, fixme(padkrish)
        # ip_wrapper.get_devices() returns all the devices
        # Pick the ones whose type is veth (?) and get the other pair
        # Combination of "ethtool -S xxx" command and "ip tool" command.
        return None, None
907848
def get_all_connections(self, id, connection_name, **args):
        
        while True:
            page = self.get_connections(id, connection_name, **args)
            for post in page["data"]:
                yield post
            next = page.get("paging", {}).get("next")
            if not next:
                return
            args = parse_qs(urlparse(next).query)
            del args["access_token"]
994126
def has_port_by_ref(self, port_ref):
        '''

        '''
        with self._mutex:
            if self.get_port_by_ref(self, port_ref):
                return True
            return False
112209
def connections(self):
        
        if not self.__connections:
            self.__connections = Connections(
                self.__connection)
        return self.__connections
1019658
def show_port(self, port, **_params):
        """"""
        return self.get(self.port_path % (port), params=_params)
307605
async function listConnections() {
    const connList = await executeCommand(
        ['nmcli', '-f', 'NAME,DEVICE', '-t', 'connection', 'show']);
    const ret = {};
    connList.split('\n').map((l) => {
        return l.split(/:/);
    }).filter((ary) => {
        return ary[0] && ary[1];
    }).forEach((ary) => {
        ret[ary[0]] = ary[1];
    });
    return ret;
}
183072
def connect(self, urls=None, **overrides):
        """"""
        if urls is not None:
            overrides['urls'] = urls
        return self.where(accept='CONNECT', **overrides)
1130221
def get_connection_by_dest(self, dest):
        ''''''
        with self._mutex:
            for conn in self.connections:
                if conn.has_port(self) and conn.has_port(dest):
                    return conn
            return None
1199828
def connection(self):
        """"""
        self.getPorts()         # acquire if necessary
        self.getIPaddresses()   # acquire if necessary
        return (self.ipAddress, self.ports)
1270566
def connect_all(self):
        
        if self.__connected:
            return  # assert not self.__connected, "connect_all() already in \"connected\" state"
        with self.__lock:
            for signal in self.__signals:
                self.__connect_signal(signal)
            if self.__slot is not None:
                self.__sigDelayed.connect(self.__slot, Qt.QueuedConnection)
            self.__connected = True
1297822
def find_all(pattern=None):
        
        devices = []

        try:
            if pattern:
                devices = serial.tools.list_ports.grep(pattern)
            else:
                devices = serial.tools.list_ports.comports()

        except serial.SerialException as err:
            raise CommError('Error enumerating serial devices: {0}'.format(str(err)), err)

        return devices
312622
def connections( 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 or item.outputNode() == self ):
                output.append(item)
        
        return output