Get an interface of this port by instance name.
420010
def get_interface_by_instance_name(self, name):
        ''''''
        with self._mutex:
            for intf in self.interfaces:
                if intf.instance_name == name:
                    return intf
            return None
399010
def Get(self, interface_name, property_name):
        ''''''

        self.log('Get %s.%s' % (interface_name, property_name))

        if not interface_name:
            interface_name = self.interface
        try:
            return self.GetAll(interface_name)[property_name]
        except KeyError:
            raise dbus.exceptions.DBusException(
                'no such property ' + property_name,
                name=self.interface + '.UnknownProperty')
1183320
def get_port_by_ref(self, port_ref):
        '''

        '''
        with self._mutex:
            for p in self.ports:
                if p.object._is_equivalent(port_ref):
                    return p
            return None
476211
def port(self):
        """"""
        self._port = self.lib.iperf_get_test_server_port(self._test)
        return self._port
735566
def _getaddr (self, ifname, func):
        """"""
        try:
            result = self._ioctl(func, self._getifreq(ifname))
        except IOError as msg:
            log.warn(LOG_CHECK,
                  "error getting addr for interface %r: %s", ifname, msg)
            return None
        return socket.inet_ntoa(result[20:24])
230308
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        if (portName == null) {
            return getPort(serviceEndpointInterface);
        }
        java.lang.String inputPortName = portName.getLocalPart();
        if ("NetworkServiceInterfacePort".equals(inputPortName)) {
            return getNetworkServiceInterfacePort();
        }
        else  {
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
            return _stub;
        }
    }
994220
def get_connection_by_name(self, name):
        ''''''
        with self._mutex:
            for conn in self.connections:
                if conn.name == name:
                    return conn
            return None
1275864
def get_interfaces(self, socket_connection=None):
        """"""
        if not socket_connection:
            socket_connection = self.open_connection()
            close_socket = True
        else:
            close_socket = False

        # noinspection PyUnresolvedReferences
        _service = self.handler(self._interfaces["org.varlink.service"], socket_connection)
        self.info = _service.GetInfo()

        if close_socket:
            socket_connection.close()

        return self.info['interfaces']
1182249
def GetInterfaceDescription(self, interface):
        """"""
        try:
            i = self.interfaces[interface]
        except KeyError:
            raise InterfaceNotFound(interface)

        return {'description': i.description}
341803
def get_instances(device_owners=None, vnic_type=None, instance_id=None):
    """"""
    session = db.get_reader_session()
    with session.begin():
        port_model = models_v2.Port
        binding_model = ml2_models.PortBinding
        instances = (session
                     .query(port_model,
                            binding_model)
                     .outerjoin(
                         binding_model,
                         port_model.id == binding_model.port_id)
                     .distinct(port_model.device_id)
                     .group_by(port_model.device_id)
                     .filter_unnecessary_ports(device_owners, vnic_type))
        if instance_id:
            instances = instances.filter(port_model.device_id == instance_id)
    return instances.all()
476220
def _get_interfaces(self):
        
        ios_cfg = self._get_running_config()
        parse = HTParser(ios_cfg)
        itfcs_raw = parse.find_lines("^interface GigabitEthernet")
        itfcs = [raw_if.strip().split(' ')[1] for raw_if in itfcs_raw]
        LOG.debug("Interfaces on hosting device: %s", itfcs)
        return itfcs
556660
public ArrayList<OvhInterface> project_serviceName_instance_instanceId_interface_GET(String serviceName, String instanceId) throws IOException {
		String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/interface";
		StringBuilder sb = path(qPath, serviceName, instanceId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t22);
	}
394670
def _iparam_instancename(instancename):
        

        if isinstance(instancename, CIMInstanceName):
            instancename = instancename.copy()
            instancename.host = None
            instancename.namespace = None
        elif instancename is None:
            pass
        else:
            raise TypeError(
                _format("The 'InstanceName' argument of the WBEMConnection "
                        "operation has invalid type {0} (must be None, a "
                        "string, or a CIMInstanceName)",
                        type(instancename)))
        return instancename
166166
def get_physical_port(self):
        """"""
        obj = None
        if self.is_link_aggregation():
            obj = UnityLinkAggregation.get(self._cli, self.get_id())
        else:
            obj = UnityEthernetPort.get(self._cli, self.get_id())
        return obj
99654
def get_internal_ip():
    """"""
    nics = {}
    for interface_name in interfaces():
        addresses = ifaddresses(interface_name)
        try:
            nics[interface_name] = {
                'ipv4': addresses[AF_INET],
                'link_layer': addresses[AF_LINK],
                'ipv6': addresses[AF_INET6],
            }
        except KeyError:
            pass

    return nics
299625
def get_interfaces
      mac_keys = facts.keys.select { |f| f =~ /net\.interface\..*\.mac_address/ }
      names = mac_keys.map do |key|
        key.sub('net.interface.', '').sub('.mac_address', '') if facts[key] != 'none'
      end
      names.compact
    end
347104
private static int getOpenPort() throws IOException {
        Log.info(c, "getOpenPort", "Entry.");
        ServerSocket s = new ServerSocket(0);
        Log.info(c, "getOpenPort", "Got socket.");
        int port = s.getLocalPort();
        Log.info(c, "getOpenPort", "Got port " + s);
        s.close();
        Log.info(c, "getOpenPort", "Close socket");
        return port;
    }