1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3 <html><head><title>Python: module telemetry.internal.platform.network_controller_backend</title> 4 <meta charset="utf-8"> 5 </head><body bgcolor="#f0f0f8"> 6 7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8 <tr bgcolor="#7799ee"> 9 <td valign=bottom> <br> 10 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.platform.html"><font color="#ffffff">platform</font></a>.network_controller_backend</strong></big></big></font></td 11 ><td align=right valign=bottom 12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/platform/network_controller_backend.py">telemetry/internal/platform/network_controller_backend.py</a></font></td></tr></table> 13 <p><tt># Copyright 2014 The Chromium Authors. All rights reserved.<br> 14 # Use of this source code is governed by a BSD-style license that can be<br> 15 # found in the LICENSE file.</tt></p> 16 <p> 17 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18 <tr bgcolor="#aa55cc"> 19 <td colspan=3 valign=bottom> <br> 20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 21 22 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.internal.forwarders.html">telemetry.internal.forwarders</a><br> 24 </td><td width="25%" valign=top><a href="os.html">os</a><br> 25 </td><td width="25%" valign=top><a href="telemetry.internal.util.webpagereplay.html">telemetry.internal.util.webpagereplay</a><br> 26 </td><td width="25%" valign=top><a href="telemetry.util.wpr_modes.html">telemetry.util.wpr_modes</a><br> 27 </td></tr></table></td></tr></table><p> 28 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 29 <tr bgcolor="#ee77aa"> 30 <td colspan=3 valign=bottom> <br> 31 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 32 33 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 34 <td width="100%"><dl> 35 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 36 </font></dt><dd> 37 <dl> 38 <dt><font face="helvetica, arial"><a href="telemetry.internal.platform.network_controller_backend.html#NetworkControllerBackend">NetworkControllerBackend</a> 39 </font></dt></dl> 40 </dd> 41 <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) 42 </font></dt><dd> 43 <dl> 44 <dt><font face="helvetica, arial"><a href="telemetry.internal.platform.network_controller_backend.html#ArchiveDoesNotExistError">ArchiveDoesNotExistError</a> 45 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.internal.platform.network_controller_backend.html#ReplayAndBrowserPortsError">ReplayAndBrowserPortsError</a> 46 </font></dt></dl> 47 </dd> 48 </dl> 49 <p> 50 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 51 <tr bgcolor="#ffc8d8"> 52 <td colspan=3 valign=bottom> <br> 53 <font color="#000000" face="helvetica, arial"><a name="ArchiveDoesNotExistError">class <strong>ArchiveDoesNotExistError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 54 55 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 56 <td colspan=2><tt>Raised when the archive path does not exist for replay mode.<br> </tt></td></tr> 57 <tr><td> </td> 58 <td width="100%"><dl><dt>Method resolution order:</dt> 59 <dd><a href="telemetry.internal.platform.network_controller_backend.html#ArchiveDoesNotExistError">ArchiveDoesNotExistError</a></dd> 60 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 61 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 62 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 63 </dl> 64 <hr> 65 Data descriptors defined here:<br> 66 <dl><dt><strong>__weakref__</strong></dt> 67 <dd><tt>list of weak references to the object (if defined)</tt></dd> 68 </dl> 69 <hr> 70 Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 71 <dl><dt><a name="ArchiveDoesNotExistError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 72 73 <hr> 74 Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 75 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#ArchiveDoesNotExistError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 76 77 <hr> 78 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 79 <dl><dt><a name="ArchiveDoesNotExistError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 80 81 <dl><dt><a name="ArchiveDoesNotExistError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 82 83 <dl><dt><a name="ArchiveDoesNotExistError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 84 85 <dl><dt><a name="ArchiveDoesNotExistError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 86 <br> 87 Use of negative indices is not supported.</tt></dd></dl> 88 89 <dl><dt><a name="ArchiveDoesNotExistError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 90 91 <dl><dt><a name="ArchiveDoesNotExistError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 92 93 <dl><dt><a name="ArchiveDoesNotExistError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 94 95 <dl><dt><a name="ArchiveDoesNotExistError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 96 97 <dl><dt><a name="ArchiveDoesNotExistError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ArchiveDoesNotExistError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 98 99 <dl><dt><a name="ArchiveDoesNotExistError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 100 101 <hr> 102 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 103 <dl><dt><strong>__dict__</strong></dt> 104 </dl> 105 <dl><dt><strong>args</strong></dt> 106 </dl> 107 <dl><dt><strong>message</strong></dt> 108 </dl> 109 </td></tr></table> <p> 110 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 111 <tr bgcolor="#ffc8d8"> 112 <td colspan=3 valign=bottom> <br> 113 <font color="#000000" face="helvetica, arial"><a name="NetworkControllerBackend">class <strong>NetworkControllerBackend</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 114 115 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 116 <td colspan=2><tt>Control network settings and servers to simulate the Web.<br> 117 <br> 118 Network changes include forwarding device ports to host platform ports.<br> 119 Web Page Replay is used to record and replay HTTP/HTTPS responses.<br> </tt></td></tr> 120 <tr><td> </td> 121 <td width="100%">Methods defined here:<br> 122 <dl><dt><a name="NetworkControllerBackend-SetReplayArgs"><strong>SetReplayArgs</strong></a>(self, archive_path, wpr_mode, netsim, extra_wpr_args, make_javascript_deterministic<font color="#909090">=False</font>)</dt><dd><tt>Save the arguments needed for replay.<br> 123 <br> 124 To make the settings effective, this call must be followed by a call<br> 125 to UpdateReplay.<br> 126 <br> 127 Args:<br> 128 archive_path: a path to a specific WPR archive.<br> 129 wpr_mode: one of wpr_modes.WPR_OFF, wpr_modes.WPR_APPEND,<br> 130 wpr_modes.WPR_REPLAY, or wpr_modes.WPR_RECORD.<br> 131 netsim: a net_config string ('dialup', '3g', 'dsl', 'cable', or 'fios').<br> 132 extra_wpr_args: a list of addtional replay args (or an empty list).<br> 133 make_javascript_deterministic: True if replay should inject a script<br> 134 to make JavaScript behave deterministically (e.g., override Date()).</tt></dd></dl> 135 136 <dl><dt><a name="NetworkControllerBackend-StopReplay"><strong>StopReplay</strong></a>(self)</dt></dl> 137 138 <dl><dt><a name="NetworkControllerBackend-UpdateReplay"><strong>UpdateReplay</strong></a>(self, browser_backend<font color="#909090">=None</font>)</dt><dd><tt>Start or reuse Web Page Replay.<br> 139 <br> 140 UpdateReplay must be called after every call to SetReplayArgs.<br> 141 <br> 142 TODO(slamm): Update replay in SetReplayArgs once the browser_backend<br> 143 dependencies move to platform. https://crbug.com/423962<br> 144 browser_backend properties used:<br> 145 - Input: wpr_port_pairs<br> 146 - Output: wpr_port_pairs (browser uses for --testing-fixed-* flags).<br> 147 Args:<br> 148 browser_backend: instance of telemetry.core.backends.browser_backend</tt></dd></dl> 149 150 <dl><dt><a name="NetworkControllerBackend-__init__"><strong>__init__</strong></a>(self, platform_backend)</dt></dl> 151 152 <hr> 153 Data descriptors defined here:<br> 154 <dl><dt><strong>__dict__</strong></dt> 155 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 156 </dl> 157 <dl><dt><strong>__weakref__</strong></dt> 158 <dd><tt>list of weak references to the object (if defined)</tt></dd> 159 </dl> 160 <dl><dt><strong>wpr_http_device_port</strong></dt> 161 </dl> 162 <dl><dt><strong>wpr_https_device_port</strong></dt> 163 </dl> 164 </td></tr></table> <p> 165 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 166 <tr bgcolor="#ffc8d8"> 167 <td colspan=3 valign=bottom> <br> 168 <font color="#000000" face="helvetica, arial"><a name="ReplayAndBrowserPortsError">class <strong>ReplayAndBrowserPortsError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr> 169 170 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 171 <td colspan=2><tt>Raised an existing browser would get different remote replay ports.<br> </tt></td></tr> 172 <tr><td> </td> 173 <td width="100%"><dl><dt>Method resolution order:</dt> 174 <dd><a href="telemetry.internal.platform.network_controller_backend.html#ReplayAndBrowserPortsError">ReplayAndBrowserPortsError</a></dd> 175 <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> 176 <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> 177 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 178 </dl> 179 <hr> 180 Data descriptors defined here:<br> 181 <dl><dt><strong>__weakref__</strong></dt> 182 <dd><tt>list of weak references to the object (if defined)</tt></dd> 183 </dl> 184 <hr> 185 Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 186 <dl><dt><a name="ReplayAndBrowserPortsError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> 187 188 <hr> 189 Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> 190 <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#ReplayAndBrowserPortsError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> 191 192 <hr> 193 Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 194 <dl><dt><a name="ReplayAndBrowserPortsError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> 195 196 <dl><dt><a name="ReplayAndBrowserPortsError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> 197 198 <dl><dt><a name="ReplayAndBrowserPortsError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> 199 200 <dl><dt><a name="ReplayAndBrowserPortsError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> 201 <br> 202 Use of negative indices is not supported.</tt></dd></dl> 203 204 <dl><dt><a name="ReplayAndBrowserPortsError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> 205 206 <dl><dt><a name="ReplayAndBrowserPortsError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> 207 208 <dl><dt><a name="ReplayAndBrowserPortsError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> 209 210 <dl><dt><a name="ReplayAndBrowserPortsError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> 211 212 <dl><dt><a name="ReplayAndBrowserPortsError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ReplayAndBrowserPortsError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> 213 214 <dl><dt><a name="ReplayAndBrowserPortsError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> 215 216 <hr> 217 Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> 218 <dl><dt><strong>__dict__</strong></dt> 219 </dl> 220 <dl><dt><strong>args</strong></dt> 221 </dl> 222 <dl><dt><strong>message</strong></dt> 223 </dl> 224 </td></tr></table></td></tr></table> 225 </body></html>