| OLD | NEW |
| (Empty) | |
| 1 |
| 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 <html><head><title>Python: module telemetry.core.chrome.cros_interface</title> |
| 4 </head><body bgcolor="#f0f0f8"> |
| 5 |
| 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 7 <tr bgcolor="#7799ee"> |
| 8 <td valign=bottom> <br> |
| 9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.core.html"><font color="#ffffff">core</font></a>.<a href="telemetry.core.chrome
.html"><font color="#ffffff">chrome</font></a>.cros_interface</strong></big></bi
g></font></td |
| 10 ><td align=right valign=bottom |
| 11 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href=
"file:/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/chrome/cros_i
nterface.py">/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/chrome
/cros_interface.py</a></font></td></tr></table> |
| 12 <p><tt>A wrapper around ssh for common operati
ons on a CrOS-based device</tt></p> |
| 13 <p> |
| 14 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 15 <tr bgcolor="#aa55cc"> |
| 16 <td colspan=3 valign=bottom> <br> |
| 17 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> |
| 18 |
| 19 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> |
| 20 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><a href="logging.html">logging</a><br> |
| 21 <a href="os.html">os</a><br> |
| 22 </td><td width="25%" valign=top><a href="re.html">re</a><br> |
| 23 <a href="subprocess.html">subprocess</a><br> |
| 24 </td><td width="25%" valign=top><a href="tempfile.html">tempfile</a><br> |
| 25 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
| 26 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 27 <tr bgcolor="#ee77aa"> |
| 28 <td colspan=3 valign=bottom> <br> |
| 29 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> |
| 30 |
| 31 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> |
| 32 <td width="100%"><dl> |
| 33 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.
object</a> |
| 34 </font></dt><dd> |
| 35 <dl> |
| 36 <dt><font face="helvetica, arial"><a href="telemetry.core.chrome.cros_interface.
html#CrOSInterface">CrOSInterface</a> |
| 37 </font></dt></dl> |
| 38 </dd> |
| 39 <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions
.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException<
/a>) |
| 40 </font></dt><dd> |
| 41 <dl> |
| 42 <dt><font face="helvetica, arial"><a href="telemetry.core.chrome.cros_interface.
html#LoginException">LoginException</a> |
| 43 </font></dt><dd> |
| 44 <dl> |
| 45 <dt><font face="helvetica, arial"><a href="telemetry.core.chrome.cros_interface.
html#KeylessLoginRequiredException">KeylessLoginRequiredException</a> |
| 46 </font></dt></dl> |
| 47 </dd> |
| 48 </dl> |
| 49 </dd> |
| 50 </dl> |
| 51 <p> |
| 52 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 53 <tr bgcolor="#ffc8d8"> |
| 54 <td colspan=3 valign=bottom> <br> |
| 55 <font color="#000000" face="helvetica, arial"><a name="CrOSInterface">class <str
ong>CrOSInterface</strong></a>(<a href="__builtin__.html#object">__builtin__.obj
ect</a>)</font></td></tr> |
| 56 |
| 57 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 58 <td width="100%">Methods defined here:<br> |
| 59 <dl><dt><a name="CrOSInterface-FileExistsOnDevice"><strong>FileExistsOnDevice</s
trong></a>(self, file_name, quiet<font color="#909090">=False</font>)</dt></dl> |
| 60 |
| 61 <dl><dt><a name="CrOSInterface-FilesystemMountedAt"><strong>FilesystemMountedAt<
/strong></a>(self, path)</dt><dd><tt>Returns the filesystem mount
ed at |path|</tt></dd></dl> |
| 62 |
| 63 <dl><dt><a name="CrOSInterface-FormSSHCommandLine"><strong>FormSSHCommandLine</s
trong></a>(self, args, extra_ssh_args<font color="#909090">=None</font>)</dt></d
l> |
| 64 |
| 65 <dl><dt><a name="CrOSInterface-GetFileContents"><strong>GetFileContents</strong>
</a>(self, filename)</dt></dl> |
| 66 |
| 67 <dl><dt><a name="CrOSInterface-GetRemotePort"><strong>GetRemotePort</strong></a>
(self)</dt></dl> |
| 68 |
| 69 <dl><dt><a name="CrOSInterface-IsHTTPServerRunningOnPort"><strong>IsHTTPServerRu
nningOnPort</strong></a>(self, port)</dt></dl> |
| 70 |
| 71 <dl><dt><a name="CrOSInterface-IsServiceRunning"><strong>IsServiceRunning</stron
g></a>(self, service_name)</dt></dl> |
| 72 |
| 73 <dl><dt><a name="CrOSInterface-KillAllMatching"><strong>KillAllMatching</strong>
</a>(self, predicate)</dt></dl> |
| 74 |
| 75 <dl><dt><a name="CrOSInterface-ListProcesses"><strong>ListProcesses</strong></a>
(self)</dt><dd><tt>Returns a tuple (pid, cmd, ppid)&nbs
p;of all processes on the device.</tt></dd></dl> |
| 76 |
| 77 <dl><dt><a name="CrOSInterface-PushContents"><strong>PushContents</strong></a>(s
elf, text, remote_filename)</dt></dl> |
| 78 |
| 79 <dl><dt><a name="CrOSInterface-PushFile"><strong>PushFile</strong></a>(self, fil
ename, remote_filename)</dt></dl> |
| 80 |
| 81 <dl><dt><a name="CrOSInterface-RmRF"><strong>RmRF</strong></a>(self, filename)</
dt></dl> |
| 82 |
| 83 <dl><dt><a name="CrOSInterface-RunCmdOnDevice"><strong>RunCmdOnDevice</strong></
a>(self, args, cwd<font color="#909090">=None</font>, quiet<font color="#909090"
>=False</font>)</dt></dl> |
| 84 |
| 85 <dl><dt><a name="CrOSInterface-TryLogin"><strong>TryLogin</strong></a>(self)</dt
></dl> |
| 86 |
| 87 <dl><dt><a name="CrOSInterface-__init__"><strong>__init__</strong></a>(self, hos
tname<font color="#909090">=None</font>, ssh_identity<font color="#909090">=None
</font>)</dt><dd><tt># pylint: disable=R0923</tt></dd></dl> |
| 88 |
| 89 <hr> |
| 90 Data descriptors defined here:<br> |
| 91 <dl><dt><strong>__dict__</strong></dt> |
| 92 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> |
| 93 </dl> |
| 94 <dl><dt><strong>__weakref__</strong></dt> |
| 95 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 96 </dl> |
| 97 <dl><dt><strong>hostname</strong></dt> |
| 98 </dl> |
| 99 <dl><dt><strong>local</strong></dt> |
| 100 </dl> |
| 101 </td></tr></table> <p> |
| 102 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 103 <tr bgcolor="#ffc8d8"> |
| 104 <td colspan=3 valign=bottom> <br> |
| 105 <font color="#000000" face="helvetica, arial"><a name="KeylessLoginRequiredExcep
tion">class <strong>KeylessLoginRequiredException</strong></a>(<a href="telemetr
y.core.chrome.cros_interface.html#LoginException">LoginException</a>)</font></td
></tr> |
| 106 |
| 107 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 108 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 109 <dd><a href="telemetry.core.chrome.cros_interface.html#KeylessLoginRequiredExcep
tion">KeylessLoginRequiredException</a></dd> |
| 110 <dd><a href="telemetry.core.chrome.cros_interface.html#LoginException">LoginExce
ption</a></dd> |
| 111 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 112 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 113 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 114 </dl> |
| 115 <hr> |
| 116 Data descriptors inherited from <a href="telemetry.core.chrome.cros_interface.ht
ml#LoginException">LoginException</a>:<br> |
| 117 <dl><dt><strong>__weakref__</strong></dt> |
| 118 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 119 </dl> |
| 120 <hr> |
| 121 Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception<
/a>:<br> |
| 122 <dl><dt><a name="KeylessLoginRequiredException-__init__"><strong>__init__</stron
g></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__init__">__in
it__</a>(...) initializes x; see help(type(x)) for 
;signature</tt></dd></dl> |
| 123 |
| 124 <hr> |
| 125 Data and other attributes inherited from <a href="exceptions.html#Exception">exc
eptions.Exception</a>:<br> |
| 126 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object>
;<dd><tt>T.<a href="#KeylessLoginRequiredException-__new__">__new__</a>(S,
...) -> a new <a href="__builtin__.html#object">object</a
> with type S, a subtype of T</tt></dl> |
| 127 |
| 128 <hr> |
| 129 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseEx
ception</a>:<br> |
| 130 <dl><dt><a name="KeylessLoginRequiredException-__delattr__"><strong>__delattr__<
/strong></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__delatt
r__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| 131 |
| 132 <dl><dt><a name="KeylessLoginRequiredException-__getattribute__"><strong>__getat
tribute__</strong></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredExceptio
n-__getattribute__">__getattribute__</a>('name') <==> x.name</tt
></dd></dl> |
| 133 |
| 134 <dl><dt><a name="KeylessLoginRequiredException-__getitem__"><strong>__getitem__<
/strong></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__getite
m__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| 135 |
| 136 <dl><dt><a name="KeylessLoginRequiredException-__getslice__"><strong>__getslice_
_</strong></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__gets
lice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| 137 <br> |
| 138 Use of negative indices is not supported.</tt></dd
></dl> |
| 139 |
| 140 <dl><dt><a name="KeylessLoginRequiredException-__reduce__"><strong>__reduce__</s
trong></a>(...)</dt></dl> |
| 141 |
| 142 <dl><dt><a name="KeylessLoginRequiredException-__repr__"><strong>__repr__</stron
g></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__repr__">__re
pr__</a>() <==> repr(x)</tt></dd></dl> |
| 143 |
| 144 <dl><dt><a name="KeylessLoginRequiredException-__setattr__"><strong>__setattr__<
/strong></a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__setatt
r__">__setattr__</a>('name', value) <==> x.name = 
;value</tt></dd></dl> |
| 145 |
| 146 <dl><dt><a name="KeylessLoginRequiredException-__setstate__"><strong>__setstate_
_</strong></a>(...)</dt></dl> |
| 147 |
| 148 <dl><dt><a name="KeylessLoginRequiredException-__str__"><strong>__str__</strong>
</a>(...)</dt><dd><tt>x.<a href="#KeylessLoginRequiredException-__str__">__str__
</a>() <==> str(x)</tt></dd></dl> |
| 149 |
| 150 <dl><dt><a name="KeylessLoginRequiredException-__unicode__"><strong>__unicode__<
/strong></a>(...)</dt></dl> |
| 151 |
| 152 <hr> |
| 153 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptio
ns.BaseException</a>:<br> |
| 154 <dl><dt><strong>__dict__</strong></dt> |
| 155 </dl> |
| 156 <dl><dt><strong>args</strong></dt> |
| 157 </dl> |
| 158 <dl><dt><strong>message</strong></dt> |
| 159 </dl> |
| 160 </td></tr></table> <p> |
| 161 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 162 <tr bgcolor="#ffc8d8"> |
| 163 <td colspan=3 valign=bottom> <br> |
| 164 <font color="#000000" face="helvetica, arial"><a name="LoginException">class <st
rong>LoginException</strong></a>(<a href="exceptions.html#Exception">exceptions.
Exception</a>)</font></td></tr> |
| 165 |
| 166 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 167 <td width="100%"><dl><dt>Method resolution order:</dt> |
| 168 <dd><a href="telemetry.core.chrome.cros_interface.html#LoginException">LoginExce
ption</a></dd> |
| 169 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 170 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 171 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 172 </dl> |
| 173 <hr> |
| 174 Data descriptors defined here:<br> |
| 175 <dl><dt><strong>__weakref__</strong></dt> |
| 176 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 177 </dl> |
| 178 <hr> |
| 179 Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception<
/a>:<br> |
| 180 <dl><dt><a name="LoginException-__init__"><strong>__init__</strong></a>(...)</dt
><dd><tt>x.<a href="#LoginException-__init__">__init__</a>(...) initializes
x; see help(type(x)) for signature</tt></dd></dl> |
| 181 |
| 182 <hr> |
| 183 Data and other attributes inherited from <a href="exceptions.html#Exception">exc
eptions.Exception</a>:<br> |
| 184 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object>
;<dd><tt>T.<a href="#LoginException-__new__">__new__</a>(S, ...) ->
a new <a href="__builtin__.html#object">object</a> with&nbs
p;type S, a subtype of T</tt></dl> |
| 185 |
| 186 <hr> |
| 187 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseEx
ception</a>:<br> |
| 188 <dl><dt><a name="LoginException-__delattr__"><strong>__delattr__</strong></a>(..
.)</dt><dd><tt>x.<a href="#LoginException-__delattr__">__delattr__</a>('name')&n
bsp;<==> del x.name</tt></dd></dl> |
| 189 |
| 190 <dl><dt><a name="LoginException-__getattribute__"><strong>__getattribute__</stro
ng></a>(...)</dt><dd><tt>x.<a href="#LoginException-__getattribute__">__getattri
bute__</a>('name') <==> x.name</tt></dd></dl> |
| 191 |
| 192 <dl><dt><a name="LoginException-__getitem__"><strong>__getitem__</strong></a>(..
.)</dt><dd><tt>x.<a href="#LoginException-__getitem__">__getitem__</a>(y) &
lt;==> x[y]</tt></dd></dl> |
| 193 |
| 194 <dl><dt><a name="LoginException-__getslice__"><strong>__getslice__</strong></a>(
...)</dt><dd><tt>x.<a href="#LoginException-__getslice__">__getslice__</a>(i,&nb
sp;j) <==> x[i:j]<br> |
| 195 <br> |
| 196 Use of negative indices is not supported.</tt></dd
></dl> |
| 197 |
| 198 <dl><dt><a name="LoginException-__reduce__"><strong>__reduce__</strong></a>(...)
</dt></dl> |
| 199 |
| 200 <dl><dt><a name="LoginException-__repr__"><strong>__repr__</strong></a>(...)</dt
><dd><tt>x.<a href="#LoginException-__repr__">__repr__</a>() <==>&nbs
p;repr(x)</tt></dd></dl> |
| 201 |
| 202 <dl><dt><a name="LoginException-__setattr__"><strong>__setattr__</strong></a>(..
.)</dt><dd><tt>x.<a href="#LoginException-__setattr__">__setattr__</a>('name',&n
bsp;value) <==> x.name = value</tt></dd></dl> |
| 203 |
| 204 <dl><dt><a name="LoginException-__setstate__"><strong>__setstate__</strong></a>(
...)</dt></dl> |
| 205 |
| 206 <dl><dt><a name="LoginException-__str__"><strong>__str__</strong></a>(...)</dt><
dd><tt>x.<a href="#LoginException-__str__">__str__</a>() <==> st
r(x)</tt></dd></dl> |
| 207 |
| 208 <dl><dt><a name="LoginException-__unicode__"><strong>__unicode__</strong></a>(..
.)</dt></dl> |
| 209 |
| 210 <hr> |
| 211 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptio
ns.BaseException</a>:<br> |
| 212 <dl><dt><strong>__dict__</strong></dt> |
| 213 </dl> |
| 214 <dl><dt><strong>args</strong></dt> |
| 215 </dl> |
| 216 <dl><dt><strong>message</strong></dt> |
| 217 </dl> |
| 218 </td></tr></table></td></tr></table><p> |
| 219 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 220 <tr bgcolor="#eeaa77"> |
| 221 <td colspan=3 valign=bottom> <br> |
| 222 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></b
ig></font></td></tr> |
| 223 |
| 224 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td>
</td> |
| 225 <td width="100%"><dl><dt><a name="-GetAllCmdOutput"><strong>GetAllCmdOutput</str
ong></a>(args, cwd<font color="#909090">=None</font>, quiet<font color="#909090"
>=False</font>)</dt><dd><tt>Open a subprocess to execute&nbs
p;a program and returns its output.<br> |
| 226 <br> |
| 227 Args:<br> |
| 228 args: A string or a sequence of p
rogram arguments. The program to execute is<br> |
| 229 the string or the first item&nb
sp;in the args sequence.<br> |
| 230 cwd: If not None, the subprocess's cur
rent directory will be changed to<br> |
| 231 |cwd| before it's executed.<br> |
| 232 <br> |
| 233 Returns:<br> |
| 234 Captures and returns the command's stdout.<
br> |
| 235 Prints the command's stderr to logger
(which defaults to stdout).</tt></dd></dl> |
| 236 <dl><dt><a name="-HasSSH"><strong>HasSSH</strong></a>()</dt></dl> |
| 237 <dl><dt><a name="-RunCmd"><strong>RunCmd</strong></a>(args, cwd<font color="#90
9090">=None</font>, quiet<font color="#909090">=False</font>)</dt><dd><tt>Opens&
nbsp;a subprocess to execute a program and re
turns its return value.<br> |
| 238 <br> |
| 239 Args:<br> |
| 240 args: A string or a sequence of p
rogram arguments. The program to execute is<br> |
| 241 the string or the first item&nb
sp;in the args sequence.<br> |
| 242 cwd: If not None, the subprocess's cur
rent directory will be changed to<br> |
| 243 |cwd| before it's executed.<br> |
| 244 <br> |
| 245 Returns:<br> |
| 246 Return code from the command execution.</tt
></dd></dl> |
| 247 </td></tr></table> |
| 248 </body></html> |
| OLD | NEW |