Return the PortType object that is referenced by this port.
762370
def getPortType(self):
        """"""
        wsdl = self.getService().getWSDL()
        binding = wsdl.bindings[self.binding]
        return wsdl.portTypes[binding.type]
565732
def _current_web_port(self):
        
        info = inspect_container(self._get_container_name('web'))
        if info is None:
            return None
        try:
            if not info['State']['Running']:
                return None
            return info['NetworkSettings']['Ports']['5000/tcp'][0]['HostPort']
        except TypeError:
            return None
963007
def _port_not_in_use():
    """"""
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    port = 0
    s.bind(('', port))
    _, port = s.getsockname()
    return port
1021557
def get_port(self, adapter_number, port_number):
        
        for port in self.ports:
            if port.adapter_number == adapter_number and port.port_number == port_number:
                return port
        return None
559684
def getPort(self):
        
        disp = self.pbmanager.dispatchers[self.portstr]
        return disp.port.getHost().port
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
170711
def source_ports(self):
        
        start_port = self.blacklist.get('BlacklistEntrySourcePort')
        if start_port is not None:
            return '{}-{}'.format(
                start_port, self.blacklist.get('BlacklistEntrySourcePortRange'))
        return 'ANY'
47044
def get_ports(device_owners=None, vnic_type=None, port_id=None, active=True):
    """"""
    session = db.get_reader_session()
    with session.begin():
        port_model = models_v2.Port
        ports = (session
                 .query(port_model)
                 .filter_unnecessary_ports(device_owners, vnic_type, active))
        if port_id:
            ports = ports.filter(port_model.id == port_id)
    return ports.all()
865384
function getPort(port_) {
  var port = port_ || process.env.PORT || require('minimist')(process.argv.slice(2)).port || 3000;
  return +port;
}
1120883
public int getPort()
    {
        if (_port > 0) return _port;
        if (_host != null) return 0;
        if (_uri.isAbsolute())
            _port = _uri.getPort();
        else if (_connection != null) _port = _connection.getServerPort();
        return _port;
    }
302113
def get_port_at(self, tile_id, direction):
        
        for port in self.ports:
            if port.tile_id == tile_id and port.direction == direction:
                return port
        port = Port(tile_id, direction, PortType.none)
        self.ports.append(port)
        return port
699859
protected String getPort() {
        String port = tomcatPort;
        if (mavenTomcatPort != null) {
            port = mavenTomcatPort;
            getLog().info( "Tomcat Port overridden by property maven.tomcat.port");
        }

        return port;
    }
368871
def get_port_monitor(self):
        
        uri = "{}{}".format(self.data["uri"], self.PORT_MONITOR_PATH)
        return self._helper.do_get(uri)
1032094
def port_str(self):
        """"""
        if self.transport is NotSpecified:
            return str(self.port)
        else:
            return "{0}/{1}".format(self.port, self.transport)
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)
348868
def port(self, name):
        
        for p in self.ports:
            if p.name == name:
                return p
636854
def bind_port(requested_port):
  """"""
  sockets = tornado.netutil.bind_sockets(requested_port)

  if requested_port != 0:
    return sockets, requested_port

  # Get the actual port number.
  for s in sockets:
    host, port = s.getsockname()[:2]
    if host == '0.0.0.0':
      return sockets, port

  raise RuntimeError('Could not determine the bound port.')