| Index: telemetry/telemetry/core/cros_interface.py
|
| diff --git a/telemetry/telemetry/core/cros_interface.py b/telemetry/telemetry/core/cros_interface.py
|
| index 1921207d3c9f9e829a5576b115cc6e82b44375a3..e5e4377a2fd36b73babc6fa733ef7e92fc10a65c 100644
|
| --- a/telemetry/telemetry/core/cros_interface.py
|
| +++ b/telemetry/telemetry/core/cros_interface.py
|
| @@ -97,9 +97,6 @@ class CrOSInterface(object):
|
| self._hostname = hostname
|
| self._ssh_port = ssh_port
|
|
|
| - # List of ports generated from GetRemotePort() that may not be in use yet.
|
| - self._reserved_ports = []
|
| -
|
| if self.local:
|
| return
|
|
|
| @@ -439,25 +436,6 @@ class CrOSInterface(object):
|
| logging.debug("IsServiceRunning(%s)->%s" % (service_name, running))
|
| return running
|
|
|
| - def GetRemotePort(self):
|
| - netstat = self.RunCmdOnDevice(['netstat', '-ant'])
|
| - netstat = netstat[0].split('\n')
|
| - ports_in_use = []
|
| -
|
| - for line in netstat[2:]:
|
| - if not line:
|
| - continue
|
| - address_in_use = line.split()[3]
|
| - port_in_use = address_in_use.split(':')[-1]
|
| - ports_in_use.append(int(port_in_use))
|
| -
|
| - ports_in_use.extend(self._reserved_ports)
|
| -
|
| - new_port = sorted(ports_in_use)[-1] + 1
|
| - self._reserved_ports.append(new_port)
|
| -
|
| - return new_port
|
| -
|
| def IsHTTPServerRunningOnPort(self, port):
|
| wget_output = self.RunCmdOnDevice(['wget', 'localhost:%i' % (port), '-T1',
|
| '-t1'])
|
|
|