| |
- __builtin__.object
-
- CrOSInterface
- exceptions.Exception(exceptions.BaseException)
-
- LoginException
-
- DNSFailureException
- KeylessLoginRequiredException
class CrOSInterface(__builtin__.object) |
| |
Methods defined here:
- Chown(self, filename)
- CloseConnection(self)
- CryptohomePath(self, user)
- Returns the cryptohome mount point for |user|.
- FileExistsOnDevice(self, file_name)
- FilesystemMountedAt(self, path)
- Returns the filesystem mounted at |path|
- FormSSHCommandLine(self, args, extra_ssh_args=None)
- Constructs a subprocess-suitable command line for `ssh'.
- GetChromePid(self)
- Returns pid of main chrome browser process.
- GetChromeProcess(self)
- Locates the the main chrome browser process.
Chrome on cros is usually in /opt/google/chrome, but could be in
/usr/local/ for developer workflows - debug chrome is too large to fit on
rootfs.
Chrome spawns multiple processes for renderers. pids wrap around after they
are exhausted so looking for the smallest pid is not always correct. We
locate the session_manager's pid, and look for the chrome process that's an
immediate child. This is the main browser process.
- GetFile(self, filename, destfile=None)
- Copies a local file |filename| to |destfile| on the device.
Args:
filename: The name of the local source file.
destfile: The name of the file to copy to, and if it is not specified
then it is the basename of the source file.
- GetFileContents(self, filename)
- Get the contents of a file on the device.
Args:
filename: The name of the file on the device.
Returns:
A string containing the contents of the file.
- GetRemotePort(self)
- IsCryptohomeMounted(self, username, is_guest)
- Returns True iff |user|'s cryptohome is mounted.
- IsHTTPServerRunningOnPort(self, port)
- IsServiceRunning(self, service_name)
- KillAllMatching(self, predicate)
- ListProcesses(self)
- Returns (pid, cmd, ppid, state) of all processes on the device.
- PushContents(self, text, remote_filename)
- PushFile(self, filename, remote_filename)
- RestartUI(self, clear_enterprise_policy)
- RmRF(self, filename)
- RunCmdOnDevice(self, args, cwd=None, quiet=False)
- TakeScreenShot(self, screenshot_prefix)
- Takes a screenshot, useful for debugging failures.
- TryLogin(self)
- __enter__(self)
- __exit__(self, *args)
- __init__(self, hostname=None, ssh_port=None, ssh_identity=None)
- # pylint: disable=R0923
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- hostname
- local
- ssh_port
|
|