Пример #1
0
def FindAllAvailableDevices(options):
  """Returns a list of available presentation.device types."""
  use_ssh = options.cros_remote and cros_interface.HasSSH()
  if not use_ssh and not IsRunningOnCrOS():
    logging.debug('No --remote specified, and not running on ChromeOs.')
    return []

  return [CrOSDevice(options.cros_remote, options.cros_remote_ssh_port,
                     options.cros_ssh_identity, not use_ssh)]
Пример #2
0
def FindAllAvailableDevices(options):
    """Returns a list of available device types.
  """
    if IsRunningOnCrOS():
        return [CrOSDevice('localhost', -1)]

    if options.cros_remote == None:
        logging.debug('No --remote specified, will not probe for CrOS.')
        return []

    if not cros_interface.HasSSH():
        logging.debug('ssh not found. Cannot talk to CrOS devices.')
        return []

    return [
        CrOSDevice(options.cros_remote, options.cros_remote_ssh_port,
                   options.cros_ssh_identity)
    ]
Пример #3
0
def CanFindAvailableBrowsers(finder_options):
    return (cros_device.IsRunningOnCrOS() or finder_options.cros_remote
            or cros_interface.HasSSH())