Jon Hall | a1cdd89 | 2015-08-10 13:36:28 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ascii"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 3 | "DTD/xhtml1-transitional.dtd"> |
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 5 | <head> |
| 6 | <title>TestON.drivers.common.cli.onosdriver.OnosDriver</title> |
| 7 | <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
| 8 | <script type="text/javascript" src="epydoc.js"></script> |
| 9 | </head> |
| 10 | |
| 11 | <body bgcolor="white" text="black" link="blue" vlink="#204080" |
| 12 | alink="#204080"> |
| 13 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 14 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 15 | bgcolor="#a0c0ff" cellspacing="0"> |
| 16 | <tr valign="middle"> |
| 17 | <!-- Home link --> |
| 18 | <th> <a |
| 19 | href="TestON-module.html">Home</a> </th> |
| 20 | |
| 21 | <!-- Tree link --> |
| 22 | <th> <a |
| 23 | href="module-tree.html">Trees</a> </th> |
| 24 | |
| 25 | <!-- Index link --> |
| 26 | <th> <a |
| 27 | href="identifier-index.html">Indices</a> </th> |
| 28 | |
| 29 | <!-- Help link --> |
| 30 | <th> <a |
| 31 | href="help.html">Help</a> </th> |
| 32 | |
| 33 | <!-- Project homepage --> |
| 34 | <th class="navbar" align="right" width="100%"> |
| 35 | <table border="0" cellpadding="0" cellspacing="0"> |
| 36 | <tr><th class="navbar" align="center" |
| 37 | >TestON</th> |
| 38 | </tr></table></th> |
| 39 | </tr> |
| 40 | </table> |
| 41 | <table width="100%" cellpadding="0" cellspacing="0"> |
| 42 | <tr valign="top"> |
| 43 | <td width="100%"> |
| 44 | <span class="breadcrumbs"> |
| 45 | <a href="TestON-module.html">Package TestON</a> :: |
| 46 | <a href="TestON.drivers-module.html">Package drivers</a> :: |
| 47 | <a href="TestON.drivers.common-module.html">Package common</a> :: |
| 48 | <a href="TestON.drivers.common.cli-module.html">Package cli</a> :: |
| 49 | <a href="TestON.drivers.common.cli.onosdriver-module.html">Module onosdriver</a> :: |
| 50 | Class OnosDriver |
| 51 | </span> |
| 52 | </td> |
| 53 | <td> |
| 54 | <table cellpadding="0" cellspacing="0"> |
| 55 | <!-- hide/show private --> |
| 56 | <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| 57 | onclick="toggle_private();">hide private</a>]</span></td></tr> |
| 58 | <tr><td align="right"><span class="options" |
| 59 | >[<a href="frames.html" target="_top">frames</a |
| 60 | >] | <a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html" |
| 61 | target="_top">no frames</a>]</span></td></tr> |
| 62 | </table> |
| 63 | </td> |
| 64 | </tr> |
| 65 | </table> |
| 66 | <!-- ==================== CLASS DESCRIPTION ==================== --> |
| 67 | <h1 class="epydoc">Class OnosDriver</h1><p class="nomargin-top"><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver">source code</a></span></p> |
| 68 | <center> |
| 69 | <center> <map id="class_hierarchy_for_onosdriver" name="class_hierarchy_for_onosdriver"> |
| 70 | <area shape="rect" id="node1" href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html" title="OnosDriver" alt="" coords="5,6,93,31"/> |
| 71 | <area shape="rect" id="node2" href="TestON.drivers.common.clidriver.CLI-class.html" title="clidriver.CLI" alt="" coords="118,6,209,31"/> |
| 72 | <area shape="rect" id="node3" href="javascript:void(0);" title="component.Component" alt="" coords="235,6,392,31"/> |
| 73 | </map> |
| 74 | <img src="class_hierarchy_for_onosdriver.gif" alt='' usemap="#class_hierarchy_for_onosdriver" ismap="ismap" class="graph-without-title" /> |
| 75 | </center> |
| 76 | </center> |
| 77 | <hr /> |
| 78 | <!-- ==================== INSTANCE METHODS ==================== --> |
| 79 | <a name="section-InstanceMethods"></a> |
| 80 | <table class="summary" border="1" cellpadding="3" |
| 81 | cellspacing="0" width="100%" bgcolor="white"> |
| 82 | <tr bgcolor="#70b0f0" class="table-header"> |
| 83 | <td colspan="2" class="table-header"> |
| 84 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 85 | <tr valign="top"> |
| 86 | <td align="left"><span class="table-header">Instance Methods</span></td> |
| 87 | <td align="right" valign="top" |
| 88 | ><span class="options">[<a href="#section-InstanceMethods" |
| 89 | class="privatelink" onclick="toggle_private();" |
| 90 | >hide private</a>]</span></td> |
| 91 | </tr> |
| 92 | </table> |
| 93 | </td> |
| 94 | </tr> |
| 95 | <tr> |
| 96 | <td width="15%" align="right" valign="top" class="summary"> |
| 97 | <span class="summary-type"> </span> |
| 98 | </td><td class="summary"> |
| 99 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 100 | <tr> |
| 101 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 102 | Initialize client</td> |
| 103 | <td align="right" valign="top"> |
| 104 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.__init__">source code</a></span> |
| 105 | |
| 106 | </td> |
| 107 | </tr> |
| 108 | </table> |
| 109 | |
| 110 | </td> |
| 111 | </tr> |
| 112 | <tr> |
| 113 | <td width="15%" align="right" valign="top" class="summary"> |
| 114 | <span class="summary-type"> </span> |
| 115 | </td><td class="summary"> |
| 116 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 117 | <tr> |
| 118 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#connect" class="summary-sig-name">connect</a>(<span class="summary-sig-arg">self</span>, |
| 119 | <span class="summary-sig-arg">**connectargs</span>)</span><br /> |
| 120 | Creates ssh handle for ONOS "bench".</td> |
| 121 | <td align="right" valign="top"> |
| 122 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.connect">source code</a></span> |
| 123 | |
| 124 | </td> |
| 125 | </tr> |
| 126 | </table> |
| 127 | |
| 128 | </td> |
| 129 | </tr> |
| 130 | <tr> |
| 131 | <td width="15%" align="right" valign="top" class="summary"> |
| 132 | <span class="summary-type"> </span> |
| 133 | </td><td class="summary"> |
| 134 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 135 | <tr> |
| 136 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#disconnect" class="summary-sig-name">disconnect</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 137 | Called when Test is complete to disconnect the ONOS handle.</td> |
| 138 | <td align="right" valign="top"> |
| 139 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.disconnect">source code</a></span> |
| 140 | |
| 141 | </td> |
| 142 | </tr> |
| 143 | </table> |
| 144 | |
| 145 | </td> |
| 146 | </tr> |
| 147 | <tr> |
| 148 | <td width="15%" align="right" valign="top" class="summary"> |
| 149 | <span class="summary-type"> </span> |
| 150 | </td><td class="summary"> |
| 151 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 152 | <tr> |
| 153 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#getEpochMs" class="summary-sig-name">getEpochMs</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 154 | Returns milliseconds since epoch</td> |
| 155 | <td align="right" valign="top"> |
| 156 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getEpochMs">source code</a></span> |
| 157 | |
| 158 | </td> |
| 159 | </tr> |
| 160 | </table> |
| 161 | |
| 162 | </td> |
| 163 | </tr> |
| 164 | <tr> |
| 165 | <td width="15%" align="right" valign="top" class="summary"> |
| 166 | <span class="summary-type"> </span> |
| 167 | </td><td class="summary"> |
| 168 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 169 | <tr> |
| 170 | <td><span class="summary-sig"><a name="onosPackage"></a><span class="summary-sig-name">onosPackage</span>(<span class="summary-sig-arg">self</span>, |
| 171 | <span class="summary-sig-arg">opTimeout</span>=<span class="summary-sig-default">30</span>)</span><br /> |
| 172 | Produce a self-contained tar.gz file that can be deployed and |
| 173 | executed on any platform with Java 7 JRE.</td> |
| 174 | <td align="right" valign="top"> |
| 175 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosPackage">source code</a></span> |
| 176 | |
| 177 | </td> |
| 178 | </tr> |
| 179 | </table> |
| 180 | |
| 181 | </td> |
| 182 | </tr> |
| 183 | <tr> |
| 184 | <td width="15%" align="right" valign="top" class="summary"> |
| 185 | <span class="summary-type"> </span> |
| 186 | </td><td class="summary"> |
| 187 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 188 | <tr> |
| 189 | <td><span class="summary-sig"><a name="onosBuild"></a><span class="summary-sig-name">onosBuild</span>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 190 | Use the pre defined script to build onos via mvn</td> |
| 191 | <td align="right" valign="top"> |
| 192 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosBuild">source code</a></span> |
| 193 | |
| 194 | </td> |
| 195 | </tr> |
| 196 | </table> |
| 197 | |
| 198 | </td> |
| 199 | </tr> |
| 200 | <tr> |
| 201 | <td width="15%" align="right" valign="top" class="summary"> |
| 202 | <span class="summary-type"> </span> |
| 203 | </td><td class="summary"> |
| 204 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 205 | <tr> |
| 206 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#cleanInstall" class="summary-sig-name">cleanInstall</a>(<span class="summary-sig-arg">self</span>, |
| 207 | <span class="summary-sig-arg">skipTest</span>=<span class="summary-sig-default">False</span>, |
| 208 | <span class="summary-sig-arg">mciTimeout</span>=<span class="summary-sig-default">600</span>)</span><br /> |
| 209 | Runs mvn clean install in the root of the ONOS directory.</td> |
| 210 | <td align="right" valign="top"> |
| 211 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.cleanInstall">source code</a></span> |
| 212 | |
| 213 | </td> |
| 214 | </tr> |
| 215 | </table> |
| 216 | |
| 217 | </td> |
| 218 | </tr> |
| 219 | <tr> |
| 220 | <td width="15%" align="right" valign="top" class="summary"> |
| 221 | <span class="summary-type"> </span> |
| 222 | </td><td class="summary"> |
| 223 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 224 | <tr> |
| 225 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#gitPull" class="summary-sig-name">gitPull</a>(<span class="summary-sig-arg">self</span>, |
| 226 | <span class="summary-sig-arg">comp1</span>=<span class="summary-sig-default">""</span>, |
| 227 | <span class="summary-sig-arg">fastForward</span>=<span class="summary-sig-default">True</span>)</span><br /> |
| 228 | Assumes that "git pull" works without login</td> |
| 229 | <td align="right" valign="top"> |
| 230 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.gitPull">source code</a></span> |
| 231 | |
| 232 | </td> |
| 233 | </tr> |
| 234 | </table> |
| 235 | |
| 236 | </td> |
| 237 | </tr> |
| 238 | <tr> |
| 239 | <td width="15%" align="right" valign="top" class="summary"> |
| 240 | <span class="summary-type"> </span> |
| 241 | </td><td class="summary"> |
| 242 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 243 | <tr> |
| 244 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#gitCheckout" class="summary-sig-name">gitCheckout</a>(<span class="summary-sig-arg">self</span>, |
| 245 | <span class="summary-sig-arg">branch</span>=<span class="summary-sig-default">"master"</span>)</span><br /> |
| 246 | Assumes that "git pull" works without login</td> |
| 247 | <td align="right" valign="top"> |
| 248 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.gitCheckout">source code</a></span> |
| 249 | |
| 250 | </td> |
| 251 | </tr> |
| 252 | </table> |
| 253 | |
| 254 | </td> |
| 255 | </tr> |
| 256 | <tr> |
| 257 | <td width="15%" align="right" valign="top" class="summary"> |
| 258 | <span class="summary-type"> </span> |
| 259 | </td><td class="summary"> |
| 260 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 261 | <tr> |
| 262 | <td><span class="summary-sig"><a name="getBranchName"></a><span class="summary-sig-name">getBranchName</span>(<span class="summary-sig-arg">self</span>)</span></td> |
| 263 | <td align="right" valign="top"> |
| 264 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getBranchName">source code</a></span> |
| 265 | |
| 266 | </td> |
| 267 | </tr> |
| 268 | </table> |
| 269 | |
| 270 | </td> |
| 271 | </tr> |
| 272 | <tr> |
| 273 | <td width="15%" align="right" valign="top" class="summary"> |
| 274 | <span class="summary-type"> </span> |
| 275 | </td><td class="summary"> |
| 276 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 277 | <tr> |
| 278 | <td><span class="summary-sig"><a name="getVersion"></a><span class="summary-sig-name">getVersion</span>(<span class="summary-sig-arg">self</span>, |
| 279 | <span class="summary-sig-arg">report</span>=<span class="summary-sig-default">False</span>)</span><br /> |
| 280 | Writes the COMMIT number to the report to be parsed |
| 281 | by Jenkins data collector.</td> |
| 282 | <td align="right" valign="top"> |
| 283 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getVersion">source code</a></span> |
| 284 | |
| 285 | </td> |
| 286 | </tr> |
| 287 | </table> |
| 288 | |
| 289 | </td> |
| 290 | </tr> |
| 291 | <tr> |
| 292 | <td width="15%" align="right" valign="top" class="summary"> |
| 293 | <span class="summary-type"> </span> |
| 294 | </td><td class="summary"> |
| 295 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 296 | <tr> |
| 297 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#createCellFile" class="summary-sig-name">createCellFile</a>(<span class="summary-sig-arg">self</span>, |
| 298 | <span class="summary-sig-arg">benchIp</span>, |
| 299 | <span class="summary-sig-arg">fileName</span>, |
| 300 | <span class="summary-sig-arg">mnIpAddrs</span>, |
| 301 | <span class="summary-sig-arg">appString</span>, |
| 302 | <span class="summary-sig-arg">onosIpAddrs</span>)</span><br /> |
| 303 | Creates a cell file based on arguments |
| 304 | Required: |
| 305 | * Bench IP address ( benchIp ) |
| 306 | - Needed to copy the cell file over |
| 307 | * File name of the cell file ( fileName ) |
| 308 | * Mininet IP address ( mnIpAddrs ) |
| 309 | - Note that only 1 ip address is |
| 310 | supported currently |
| 311 | * ONOS IP addresses ( onosIpAddrs ) |
| 312 | - Must be passed in as last arguments</td> |
| 313 | <td align="right" valign="top"> |
| 314 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.createCellFile">source code</a></span> |
| 315 | |
| 316 | </td> |
| 317 | </tr> |
| 318 | </table> |
| 319 | |
| 320 | </td> |
| 321 | </tr> |
| 322 | <tr> |
| 323 | <td width="15%" align="right" valign="top" class="summary"> |
| 324 | <span class="summary-type"> </span> |
| 325 | </td><td class="summary"> |
| 326 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 327 | <tr> |
| 328 | <td><span class="summary-sig"><a name="setCell"></a><span class="summary-sig-name">setCell</span>(<span class="summary-sig-arg">self</span>, |
| 329 | <span class="summary-sig-arg">cellname</span>)</span><br /> |
| 330 | Calls 'cell <name>' to set the environment variables on |
| 331 | ONOSbench</td> |
| 332 | <td align="right" valign="top"> |
| 333 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.setCell">source code</a></span> |
| 334 | |
| 335 | </td> |
| 336 | </tr> |
| 337 | </table> |
| 338 | |
| 339 | </td> |
| 340 | </tr> |
| 341 | <tr> |
| 342 | <td width="15%" align="right" valign="top" class="summary"> |
| 343 | <span class="summary-type"> </span> |
| 344 | </td><td class="summary"> |
| 345 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 346 | <tr> |
| 347 | <td><span class="summary-sig"><a name="verifyCell"></a><span class="summary-sig-name">verifyCell</span>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 348 | Calls 'onos-verify-cell' to check for cell installation</td> |
| 349 | <td align="right" valign="top"> |
| 350 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.verifyCell">source code</a></span> |
| 351 | |
| 352 | </td> |
| 353 | </tr> |
| 354 | </table> |
| 355 | |
| 356 | </td> |
| 357 | </tr> |
| 358 | <tr> |
| 359 | <td width="15%" align="right" valign="top" class="summary"> |
| 360 | <span class="summary-type"> </span> |
| 361 | </td><td class="summary"> |
| 362 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 363 | <tr> |
| 364 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#onosCfgSet" class="summary-sig-name">onosCfgSet</a>(<span class="summary-sig-arg">self</span>, |
| 365 | <span class="summary-sig-arg">ONOSIp</span>, |
| 366 | <span class="summary-sig-arg">configName</span>, |
| 367 | <span class="summary-sig-arg">configParam</span>)</span><br /> |
| 368 | Uses 'onos <node-ip> cfg set' to change a parameter value of an |
| 369 | application.</td> |
| 370 | <td align="right" valign="top"> |
| 371 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosCfgSet">source code</a></span> |
| 372 | |
| 373 | </td> |
| 374 | </tr> |
| 375 | </table> |
| 376 | |
| 377 | </td> |
| 378 | </tr> |
| 379 | <tr> |
| 380 | <td width="15%" align="right" valign="top" class="summary"> |
| 381 | <span class="summary-type"> </span> |
| 382 | </td><td class="summary"> |
| 383 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 384 | <tr> |
| 385 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#onosCli" class="summary-sig-name">onosCli</a>(<span class="summary-sig-arg">self</span>, |
| 386 | <span class="summary-sig-arg">ONOSIp</span>, |
| 387 | <span class="summary-sig-arg">cmdstr</span>)</span><br /> |
| 388 | Uses 'onos' command to send various ONOS CLI arguments.</td> |
| 389 | <td align="right" valign="top"> |
| 390 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosCli">source code</a></span> |
| 391 | |
| 392 | </td> |
| 393 | </tr> |
| 394 | </table> |
| 395 | |
| 396 | </td> |
| 397 | </tr> |
| 398 | <tr> |
| 399 | <td width="15%" align="right" valign="top" class="summary"> |
| 400 | <span class="summary-type"> </span> |
| 401 | </td><td class="summary"> |
| 402 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 403 | <tr> |
| 404 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#onosInstall" class="summary-sig-name">onosInstall</a>(<span class="summary-sig-arg">self</span>, |
| 405 | <span class="summary-sig-arg">options</span>=<span class="summary-sig-default">"-f"</span>, |
| 406 | <span class="summary-sig-arg">node</span>=<span class="summary-sig-default">""</span>)</span><br /> |
| 407 | Installs ONOS bits on the designated cell machine.</td> |
| 408 | <td align="right" valign="top"> |
| 409 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosInstall">source code</a></span> |
| 410 | |
| 411 | </td> |
| 412 | </tr> |
| 413 | </table> |
| 414 | |
| 415 | </td> |
| 416 | </tr> |
| 417 | <tr> |
| 418 | <td width="15%" align="right" valign="top" class="summary"> |
| 419 | <span class="summary-type"> </span> |
| 420 | </td><td class="summary"> |
| 421 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 422 | <tr> |
| 423 | <td><span class="summary-sig"><a name="onosStart"></a><span class="summary-sig-name">onosStart</span>(<span class="summary-sig-arg">self</span>, |
| 424 | <span class="summary-sig-arg">nodeIp</span>)</span><br /> |
| 425 | Calls onos command: 'onos-service [<node-ip>] start' This |
| 426 | command is a remote management of the ONOS upstart daemon</td> |
| 427 | <td align="right" valign="top"> |
| 428 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosStart">source code</a></span> |
| 429 | |
| 430 | </td> |
| 431 | </tr> |
| 432 | </table> |
| 433 | |
| 434 | </td> |
| 435 | </tr> |
| 436 | <tr> |
| 437 | <td width="15%" align="right" valign="top" class="summary"> |
| 438 | <span class="summary-type"> </span> |
| 439 | </td><td class="summary"> |
| 440 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 441 | <tr> |
| 442 | <td><span class="summary-sig"><a name="onosStop"></a><span class="summary-sig-name">onosStop</span>(<span class="summary-sig-arg">self</span>, |
| 443 | <span class="summary-sig-arg">nodeIp</span>)</span><br /> |
| 444 | Calls onos command: 'onos-service [<node-ip>] stop' This |
| 445 | command is a remote management of the ONOS upstart daemon</td> |
| 446 | <td align="right" valign="top"> |
| 447 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosStop">source code</a></span> |
| 448 | |
| 449 | </td> |
| 450 | </tr> |
| 451 | </table> |
| 452 | |
| 453 | </td> |
| 454 | </tr> |
| 455 | <tr> |
| 456 | <td width="15%" align="right" valign="top" class="summary"> |
| 457 | <span class="summary-type"> </span> |
| 458 | </td><td class="summary"> |
| 459 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 460 | <tr> |
| 461 | <td><span class="summary-sig"><a name="onosUninstall"></a><span class="summary-sig-name">onosUninstall</span>(<span class="summary-sig-arg">self</span>, |
| 462 | <span class="summary-sig-arg">nodeIp</span>=<span class="summary-sig-default">""</span>)</span><br /> |
| 463 | Calls the command: 'onos-uninstall' Uninstalls ONOS from the |
| 464 | designated cell machine, stopping if needed</td> |
| 465 | <td align="right" valign="top"> |
| 466 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosUninstall">source code</a></span> |
| 467 | |
| 468 | </td> |
| 469 | </tr> |
| 470 | </table> |
| 471 | |
| 472 | </td> |
| 473 | </tr> |
| 474 | <tr> |
| 475 | <td width="15%" align="right" valign="top" class="summary"> |
| 476 | <span class="summary-type"> </span> |
| 477 | </td><td class="summary"> |
| 478 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 479 | <tr> |
| 480 | <td><span class="summary-sig"><a name="onosDie"></a><span class="summary-sig-name">onosDie</span>(<span class="summary-sig-arg">self</span>, |
| 481 | <span class="summary-sig-arg">nodeIp</span>)</span><br /> |
| 482 | Issues the command 'onos-die <node-ip>' This command calls |
| 483 | onos-kill and also stops the node</td> |
| 484 | <td align="right" valign="top"> |
| 485 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosDie">source code</a></span> |
| 486 | |
| 487 | </td> |
| 488 | </tr> |
| 489 | </table> |
| 490 | |
| 491 | </td> |
| 492 | </tr> |
| 493 | <tr> |
| 494 | <td width="15%" align="right" valign="top" class="summary"> |
| 495 | <span class="summary-type"> </span> |
| 496 | </td><td class="summary"> |
| 497 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 498 | <tr> |
| 499 | <td><span class="summary-sig"><a name="onosKill"></a><span class="summary-sig-name">onosKill</span>(<span class="summary-sig-arg">self</span>, |
| 500 | <span class="summary-sig-arg">nodeIp</span>)</span><br /> |
| 501 | Calls the command: 'onos-kill [<node-ip>]' "Remotely, and |
| 502 | unceremoniously kills the ONOS instance running on the specified cell |
| 503 | machine" - Tom V</td> |
| 504 | <td align="right" valign="top"> |
| 505 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosKill">source code</a></span> |
| 506 | |
| 507 | </td> |
| 508 | </tr> |
| 509 | </table> |
| 510 | |
| 511 | </td> |
| 512 | </tr> |
| 513 | <tr> |
| 514 | <td width="15%" align="right" valign="top" class="summary"> |
| 515 | <span class="summary-type"> </span> |
| 516 | </td><td class="summary"> |
| 517 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 518 | <tr> |
| 519 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#onosRemoveRaftLogs" class="summary-sig-name">onosRemoveRaftLogs</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 520 | Removes Raft / Copy cat files from ONOS to ensure |
| 521 | a cleaner environment.</td> |
| 522 | <td align="right" valign="top"> |
| 523 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosRemoveRaftLogs">source code</a></span> |
| 524 | |
| 525 | </td> |
| 526 | </tr> |
| 527 | </table> |
| 528 | |
| 529 | </td> |
| 530 | </tr> |
| 531 | <tr> |
| 532 | <td width="15%" align="right" valign="top" class="summary"> |
| 533 | <span class="summary-type"> </span> |
| 534 | </td><td class="summary"> |
| 535 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 536 | <tr> |
| 537 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#onosStartNetwork" class="summary-sig-name">onosStartNetwork</a>(<span class="summary-sig-arg">self</span>, |
| 538 | <span class="summary-sig-arg">mntopo</span>)</span><br /> |
| 539 | Calls the command 'onos-start-network [ <mininet-topo> ] |
| 540 | "remotely starts the specified topology on the cell's |
| 541 | mininet machine against all controllers configured in the |
| 542 | cell." |
| 543 | * Specify mininet topology file name for mntopo |
| 544 | * Topo files should be placed at: |
| 545 | ~/<your-onos-directory>/tools/test/topos</td> |
| 546 | <td align="right" valign="top"> |
| 547 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosStartNetwork">source code</a></span> |
| 548 | |
| 549 | </td> |
| 550 | </tr> |
| 551 | </table> |
| 552 | |
| 553 | </td> |
| 554 | </tr> |
| 555 | <tr> |
| 556 | <td width="15%" align="right" valign="top" class="summary"> |
| 557 | <span class="summary-type"> </span> |
| 558 | </td><td class="summary"> |
| 559 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 560 | <tr> |
| 561 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#isup" class="summary-sig-name">isup</a>(<span class="summary-sig-arg">self</span>, |
| 562 | <span class="summary-sig-arg">node</span>=<span class="summary-sig-default">""</span>, |
| 563 | <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">120</span>)</span><br /> |
| 564 | Run's onos-wait-for-start which only returns once ONOS is at run |
| 565 | level 100(ready for use)</td> |
| 566 | <td align="right" valign="top"> |
| 567 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.isup">source code</a></span> |
| 568 | |
| 569 | </td> |
| 570 | </tr> |
| 571 | </table> |
| 572 | |
| 573 | </td> |
| 574 | </tr> |
| 575 | <tr> |
| 576 | <td width="15%" align="right" valign="top" class="summary"> |
| 577 | <span class="summary-type"> </span> |
| 578 | </td><td class="summary"> |
| 579 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 580 | <tr> |
| 581 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#pushTestIntentsShell" class="summary-sig-name">pushTestIntentsShell</a>(<span class="summary-sig-arg">self</span>, |
| 582 | <span class="summary-sig-arg">dpidSrc</span>, |
| 583 | <span class="summary-sig-arg">dpidDst</span>, |
| 584 | <span class="summary-sig-arg">numIntents</span>, |
| 585 | <span class="summary-sig-arg">dirFile</span>, |
| 586 | <span class="summary-sig-arg">onosIp</span>, |
| 587 | <span class="summary-sig-arg">numMult</span>=<span class="summary-sig-default">""</span>, |
| 588 | <span class="summary-sig-arg">appId</span>=<span class="summary-sig-default">""</span>, |
| 589 | <span class="summary-sig-arg">report</span>=<span class="summary-sig-default">True</span>, |
| 590 | <span class="summary-sig-arg">options</span>=<span class="summary-sig-default">""</span>)</span><br /> |
| 591 | Description:...</td> |
| 592 | <td align="right" valign="top"> |
| 593 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.pushTestIntentsShell">source code</a></span> |
| 594 | |
| 595 | </td> |
| 596 | </tr> |
| 597 | </table> |
| 598 | |
| 599 | </td> |
| 600 | </tr> |
| 601 | <tr> |
| 602 | <td width="15%" align="right" valign="top" class="summary"> |
| 603 | <span class="summary-type"> </span> |
| 604 | </td><td class="summary"> |
| 605 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 606 | <tr> |
| 607 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#getTopology" class="summary-sig-name">getTopology</a>(<span class="summary-sig-arg">self</span>, |
| 608 | <span class="summary-sig-arg">topologyOutput</span>)</span><br /> |
| 609 | Definition:...</td> |
| 610 | <td align="right" valign="top"> |
| 611 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getTopology">source code</a></span> |
| 612 | |
| 613 | </td> |
| 614 | </tr> |
| 615 | </table> |
| 616 | |
| 617 | </td> |
| 618 | </tr> |
| 619 | <tr> |
| 620 | <td width="15%" align="right" valign="top" class="summary"> |
| 621 | <span class="summary-type"> </span> |
| 622 | </td><td class="summary"> |
| 623 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 624 | <tr> |
| 625 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#checkStatus" class="summary-sig-name">checkStatus</a>(<span class="summary-sig-arg">self</span>, |
| 626 | <span class="summary-sig-arg">topologyResult</span>, |
| 627 | <span class="summary-sig-arg">numoswitch</span>, |
| 628 | <span class="summary-sig-arg">numolink</span>, |
| 629 | <span class="summary-sig-arg">logLevel</span>=<span class="summary-sig-default">"info"</span>)</span><br /> |
| 630 | Checks the number of switches & links that ONOS sees against the |
| 631 | supplied values.</td> |
| 632 | <td align="right" valign="top"> |
| 633 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.checkStatus">source code</a></span> |
| 634 | |
| 635 | </td> |
| 636 | </tr> |
| 637 | </table> |
| 638 | |
| 639 | </td> |
| 640 | </tr> |
| 641 | <tr> |
| 642 | <td width="15%" align="right" valign="top" class="summary"> |
| 643 | <span class="summary-type"> </span> |
| 644 | </td><td class="summary"> |
| 645 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 646 | <tr> |
| 647 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#tsharkPcap" class="summary-sig-name">tsharkPcap</a>(<span class="summary-sig-arg">self</span>, |
| 648 | <span class="summary-sig-arg">interface</span>, |
| 649 | <span class="summary-sig-arg">dirFile</span>)</span><br /> |
| 650 | Capture all packet activity and store in specified |
| 651 | directory/file</td> |
| 652 | <td align="right" valign="top"> |
| 653 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.tsharkPcap">source code</a></span> |
| 654 | |
| 655 | </td> |
| 656 | </tr> |
| 657 | </table> |
| 658 | |
| 659 | </td> |
| 660 | </tr> |
| 661 | <tr> |
| 662 | <td width="15%" align="right" valign="top" class="summary"> |
| 663 | <span class="summary-type"> </span> |
| 664 | </td><td class="summary"> |
| 665 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 666 | <tr> |
| 667 | <td><span class="summary-sig"><a name="runOnosTopoCfg"></a><span class="summary-sig-name">runOnosTopoCfg</span>(<span class="summary-sig-arg">self</span>, |
| 668 | <span class="summary-sig-arg">instanceName</span>, |
| 669 | <span class="summary-sig-arg">jsonFile</span>)</span><br /> |
| 670 | On ONOS bench, run this command: |
| 671 | {ONOS_HOME}/tools/test/bin/onos-topo-cfg $OC1 filename which starts |
| 672 | the rest and copies the json file to the onos instance</td> |
| 673 | <td align="right" valign="top"> |
| 674 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.runOnosTopoCfg">source code</a></span> |
| 675 | |
| 676 | </td> |
| 677 | </tr> |
| 678 | </table> |
| 679 | |
| 680 | </td> |
| 681 | </tr> |
| 682 | <tr> |
| 683 | <td width="15%" align="right" valign="top" class="summary"> |
| 684 | <span class="summary-type"> </span> |
| 685 | </td><td class="summary"> |
| 686 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 687 | <tr> |
| 688 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#tsharkGrep" class="summary-sig-name">tsharkGrep</a>(<span class="summary-sig-arg">self</span>, |
| 689 | <span class="summary-sig-arg">grep</span>, |
| 690 | <span class="summary-sig-arg">directory</span>, |
| 691 | <span class="summary-sig-arg">interface</span>=<span class="summary-sig-default">'eth0'</span>, |
| 692 | <span class="summary-sig-arg">grepOptions</span>=<span class="summary-sig-default">''</span>)</span><br /> |
| 693 | Required: |
| 694 | * grep string |
| 695 | * directory to store results |
| 696 | Optional: |
| 697 | * interface - default: eth0 |
| 698 | * grepOptions - options for grep |
| 699 | Description: |
| 700 | Uses tshark command to grep specific group of packets |
| 701 | and stores the results to specified directory.</td> |
| 702 | <td align="right" valign="top"> |
| 703 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.tsharkGrep">source code</a></span> |
| 704 | |
| 705 | </td> |
| 706 | </tr> |
| 707 | </table> |
| 708 | |
| 709 | </td> |
| 710 | </tr> |
| 711 | <tr> |
| 712 | <td width="15%" align="right" valign="top" class="summary"> |
| 713 | <span class="summary-type"> </span> |
| 714 | </td><td class="summary"> |
| 715 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 716 | <tr> |
| 717 | <td><span class="summary-sig"><a name="tsharkStop"></a><span class="summary-sig-name">tsharkStop</span>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 718 | Removes wireshark files from /tmp and kills all tshark processes</td> |
| 719 | <td align="right" valign="top"> |
| 720 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.tsharkStop">source code</a></span> |
| 721 | |
| 722 | </td> |
| 723 | </tr> |
| 724 | </table> |
| 725 | |
| 726 | </td> |
| 727 | </tr> |
| 728 | <tr> |
| 729 | <td width="15%" align="right" valign="top" class="summary"> |
| 730 | <span class="summary-type"> </span> |
| 731 | </td><td class="summary"> |
| 732 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 733 | <tr> |
| 734 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#ptpd" class="summary-sig-name">ptpd</a>(<span class="summary-sig-arg">self</span>, |
| 735 | <span class="summary-sig-arg">args</span>)</span><br /> |
| 736 | Initiate ptp with user-specified args.</td> |
| 737 | <td align="right" valign="top"> |
| 738 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.ptpd">source code</a></span> |
| 739 | |
| 740 | </td> |
| 741 | </tr> |
| 742 | </table> |
| 743 | |
| 744 | </td> |
| 745 | </tr> |
| 746 | <tr> |
| 747 | <td width="15%" align="right" valign="top" class="summary"> |
| 748 | <span class="summary-type"> </span> |
| 749 | </td><td class="summary"> |
| 750 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 751 | <tr> |
| 752 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#cpLogsToDir" class="summary-sig-name">cpLogsToDir</a>(<span class="summary-sig-arg">self</span>, |
| 753 | <span class="summary-sig-arg">logToCopy</span>, |
| 754 | <span class="summary-sig-arg">destDir</span>, |
| 755 | <span class="summary-sig-arg">copyFileName</span>=<span class="summary-sig-default">""</span>)</span><br /> |
| 756 | Copies logs to a desired directory.</td> |
| 757 | <td align="right" valign="top"> |
| 758 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.cpLogsToDir">source code</a></span> |
| 759 | |
| 760 | </td> |
| 761 | </tr> |
| 762 | </table> |
| 763 | |
| 764 | </td> |
| 765 | </tr> |
| 766 | <tr> |
| 767 | <td width="15%" align="right" valign="top" class="summary"> |
| 768 | <span class="summary-type"> </span> |
| 769 | </td><td class="summary"> |
| 770 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 771 | <tr> |
| 772 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#checkLogs" class="summary-sig-name">checkLogs</a>(<span class="summary-sig-arg">self</span>, |
| 773 | <span class="summary-sig-arg">onosIp</span>, |
| 774 | <span class="summary-sig-arg">restart</span>=<span class="summary-sig-default">False</span>)</span><br /> |
| 775 | runs onos-check-logs on the given onos node...</td> |
| 776 | <td align="right" valign="top"> |
| 777 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.checkLogs">source code</a></span> |
| 778 | |
| 779 | </td> |
| 780 | </tr> |
| 781 | </table> |
| 782 | |
| 783 | </td> |
| 784 | </tr> |
| 785 | <tr> |
| 786 | <td width="15%" align="right" valign="top" class="summary"> |
| 787 | <span class="summary-type"> </span> |
| 788 | </td><td class="summary"> |
| 789 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 790 | <tr> |
| 791 | <td><span class="summary-sig"><a name="onosStatus"></a><span class="summary-sig-name">onosStatus</span>(<span class="summary-sig-arg">self</span>, |
| 792 | <span class="summary-sig-arg">node</span>=<span class="summary-sig-default">""</span>)</span><br /> |
| 793 | Calls onos command: 'onos-service [<node-ip>] status'</td> |
| 794 | <td align="right" valign="top"> |
| 795 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosStatus">source code</a></span> |
| 796 | |
| 797 | </td> |
| 798 | </tr> |
| 799 | </table> |
| 800 | |
| 801 | </td> |
| 802 | </tr> |
| 803 | <tr> |
| 804 | <td width="15%" align="right" valign="top" class="summary"> |
| 805 | <span class="summary-type"> </span> |
| 806 | </td><td class="summary"> |
| 807 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 808 | <tr> |
| 809 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#setIpTables" class="summary-sig-name">setIpTables</a>(<span class="summary-sig-arg">self</span>, |
| 810 | <span class="summary-sig-arg">ip</span>, |
| 811 | <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">''</span>, |
| 812 | <span class="summary-sig-arg">action</span>=<span class="summary-sig-default">'add'</span>, |
| 813 | <span class="summary-sig-arg">packet_type</span>=<span class="summary-sig-default">''</span>, |
| 814 | <span class="summary-sig-arg">direction</span>=<span class="summary-sig-default">'INPUT'</span>, |
| 815 | <span class="summary-sig-arg">rule</span>=<span class="summary-sig-default">'DROP'</span>, |
| 816 | <span class="summary-sig-arg">states</span>=<span class="summary-sig-default">True</span>)</span><br /> |
| 817 | Description: |
| 818 | add or remove iptables rule to DROP (default) packets from |
| 819 | specific IP and PORT |
| 820 | Usage: |
| 821 | * specify action ('add' or 'remove') |
| 822 | when removing, pass in the same argument as you would add.</td> |
| 823 | <td align="right" valign="top"> |
| 824 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.setIpTables">source code</a></span> |
| 825 | |
| 826 | </td> |
| 827 | </tr> |
| 828 | </table> |
| 829 | |
| 830 | </td> |
| 831 | </tr> |
| 832 | <tr> |
| 833 | <td width="15%" align="right" valign="top" class="summary"> |
| 834 | <span class="summary-type"> </span> |
| 835 | </td><td class="summary"> |
| 836 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 837 | <tr> |
| 838 | <td><span class="summary-sig"><a name="detailed_status"></a><span class="summary-sig-name">detailed_status</span>(<span class="summary-sig-arg">self</span>, |
| 839 | <span class="summary-sig-arg">log_filename</span>)</span><br /> |
| 840 | This method is used by STS to check the status of the controller |
| 841 | Reports RUNNING, STARTING, STOPPED, FROZEN, ERROR (and reason)</td> |
| 842 | <td align="right" valign="top"> |
| 843 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.detailed_status">source code</a></span> |
| 844 | |
| 845 | </td> |
| 846 | </tr> |
| 847 | </table> |
| 848 | |
| 849 | </td> |
| 850 | </tr> |
| 851 | <tr> |
| 852 | <td width="15%" align="right" valign="top" class="summary"> |
| 853 | <span class="summary-type"> </span> |
| 854 | </td><td class="summary"> |
| 855 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 856 | <tr> |
| 857 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#createLinkGraphFile" class="summary-sig-name">createLinkGraphFile</a>(<span class="summary-sig-arg">self</span>, |
| 858 | <span class="summary-sig-arg">benchIp</span>, |
| 859 | <span class="summary-sig-arg">ONOSIpList</span>, |
| 860 | <span class="summary-sig-arg">deviceCount</span>)</span><br /> |
| 861 | Create/formats the LinkGraph.cfg file based on arguments |
| 862 | -only creates a linear topology and connects islands |
| 863 | -evenly distributes devices |
| 864 | -must be called by ONOSbench</td> |
| 865 | <td align="right" valign="top"> |
| 866 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.createLinkGraphFile">source code</a></span> |
| 867 | |
| 868 | </td> |
| 869 | </tr> |
| 870 | </table> |
| 871 | |
| 872 | </td> |
| 873 | </tr> |
| 874 | <tr> |
| 875 | <td width="15%" align="right" valign="top" class="summary"> |
| 876 | <span class="summary-type"> </span> |
| 877 | </td><td class="summary"> |
| 878 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 879 | <tr> |
| 880 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#configNullDev" class="summary-sig-name">configNullDev</a>(<span class="summary-sig-arg">self</span>, |
| 881 | <span class="summary-sig-arg">ONOSIpList</span>, |
| 882 | <span class="summary-sig-arg">deviceCount</span>, |
| 883 | <span class="summary-sig-arg">numPorts</span>=<span class="summary-sig-default">10</span>)</span><br /> |
| 884 | ONOSIpList = list of Ip addresses of nodes switches will be devided |
| 885 | amongst deviceCount = number of switches to distribute, or list of |
| 886 | values to use as custom distribution numPorts = number of ports per |
| 887 | device.</td> |
| 888 | <td align="right" valign="top"> |
| 889 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.configNullDev">source code</a></span> |
| 890 | |
| 891 | </td> |
| 892 | </tr> |
| 893 | </table> |
| 894 | |
| 895 | </td> |
| 896 | </tr> |
| 897 | <tr> |
| 898 | <td width="15%" align="right" valign="top" class="summary"> |
| 899 | <span class="summary-type"> </span> |
| 900 | </td><td class="summary"> |
| 901 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 902 | <tr> |
| 903 | <td><span class="summary-sig"><a name="configNullLink"></a><span class="summary-sig-name">configNullLink</span>(<span class="summary-sig-arg">self</span>, |
| 904 | <span class="summary-sig-arg">fileName</span>=<span class="summary-sig-default">"/opt/onos/apache-karaf-3.0.3/etc/linkGraph.cfg"</span>, |
| 905 | <span class="summary-sig-arg">eventRate</span>=<span class="summary-sig-default">0</span>)</span><br /> |
| 906 | fileName default is currently the same as the default on ONOS, |
| 907 | specify alternate file if you want to use a different topology file |
| 908 | than linkGraph.cfg</td> |
| 909 | <td align="right" valign="top"> |
| 910 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.configNullLink">source code</a></span> |
| 911 | |
| 912 | </td> |
| 913 | </tr> |
| 914 | </table> |
| 915 | |
| 916 | </td> |
| 917 | </tr> |
| 918 | <tr> |
| 919 | <td width="15%" align="right" valign="top" class="summary"> |
| 920 | <span class="summary-type"> </span> |
| 921 | </td><td class="summary"> |
| 922 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 923 | <tr> |
| 924 | <td><span class="summary-sig"><a name="getOnosIps"></a><span class="summary-sig-name">getOnosIps</span>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 925 | Get all onos IPs stored in</td> |
| 926 | <td align="right" valign="top"> |
| 927 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getOnosIps">source code</a></span> |
| 928 | |
| 929 | </td> |
| 930 | </tr> |
| 931 | </table> |
| 932 | |
| 933 | </td> |
| 934 | </tr> |
| 935 | <tr> |
| 936 | <td width="15%" align="right" valign="top" class="summary"> |
| 937 | <span class="summary-type"> </span> |
| 938 | </td><td class="summary"> |
| 939 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 940 | <tr> |
| 941 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#logReport" class="summary-sig-name">logReport</a>(<span class="summary-sig-arg">self</span>, |
| 942 | <span class="summary-sig-arg">nodeIp</span>, |
| 943 | <span class="summary-sig-arg">searchTerms</span>, |
| 944 | <span class="summary-sig-arg">outputMode</span>=<span class="summary-sig-default">"s"</span>)</span><br /> |
| 945 | - accepts either a list or a string for "searchTerms" these |
| 946 | terms will be searched for in the log and have their |
| 947 | instances counted</td> |
| 948 | <td align="right" valign="top"> |
| 949 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.logReport">source code</a></span> |
| 950 | |
| 951 | </td> |
| 952 | </tr> |
| 953 | </table> |
| 954 | |
| 955 | </td> |
| 956 | </tr> |
| 957 | <tr> |
| 958 | <td width="15%" align="right" valign="top" class="summary"> |
| 959 | <span class="summary-type"> </span> |
| 960 | </td><td class="summary"> |
| 961 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 962 | <tr> |
| 963 | <td><span class="summary-sig"><a href="TestON.drivers.common.cli.onosdriver.OnosDriver-class.html#copyMininetFile" class="summary-sig-name">copyMininetFile</a>(<span class="summary-sig-arg">self</span>, |
| 964 | <span class="summary-sig-arg">fileName</span>, |
| 965 | <span class="summary-sig-arg">localPath</span>, |
| 966 | <span class="summary-sig-arg">userName</span>, |
| 967 | <span class="summary-sig-arg">ip</span>, |
| 968 | <span class="summary-sig-arg">mnPath</span>=<span class="summary-sig-default">'~/mininet/custom/'</span>, |
| 969 | <span class="summary-sig-arg">timeout</span>=<span class="summary-sig-default">60</span>)</span><br /> |
| 970 | Description:...</td> |
| 971 | <td align="right" valign="top"> |
| 972 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.copyMininetFile">source code</a></span> |
| 973 | |
| 974 | </td> |
| 975 | </tr> |
| 976 | </table> |
| 977 | |
| 978 | </td> |
| 979 | </tr> |
| 980 | <tr> |
| 981 | <td width="15%" align="right" valign="top" class="summary"> |
| 982 | <span class="summary-type"> </span> |
| 983 | </td><td class="summary"> |
| 984 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 985 | <tr> |
| 986 | <td><span class="summary-sig"><a name="jvmSet"></a><span class="summary-sig-name">jvmSet</span>(<span class="summary-sig-arg">self</span>, |
| 987 | <span class="summary-sig-arg">memory</span>=<span class="summary-sig-default">8</span>)</span></td> |
| 988 | <td align="right" valign="top"> |
| 989 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.jvmSet">source code</a></span> |
| 990 | |
| 991 | </td> |
| 992 | </tr> |
| 993 | </table> |
| 994 | |
| 995 | </td> |
| 996 | </tr> |
| 997 | <tr> |
| 998 | <td width="15%" align="right" valign="top" class="summary"> |
| 999 | <span class="summary-type"> </span> |
| 1000 | </td><td class="summary"> |
| 1001 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1002 | <tr> |
| 1003 | <td><span class="summary-sig"><a name="createDBFile"></a><span class="summary-sig-name">createDBFile</span>(<span class="summary-sig-arg">self</span>, |
| 1004 | <span class="summary-sig-arg">testData</span>)</span></td> |
| 1005 | <td align="right" valign="top"> |
| 1006 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.createDBFile">source code</a></span> |
| 1007 | |
| 1008 | </td> |
| 1009 | </tr> |
| 1010 | </table> |
| 1011 | |
| 1012 | </td> |
| 1013 | </tr> |
| 1014 | <tr> |
| 1015 | <td width="15%" align="right" valign="top" class="summary"> |
| 1016 | <span class="summary-type"> </span> |
| 1017 | </td><td class="summary"> |
| 1018 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1019 | <tr> |
| 1020 | <td><span class="summary-sig"><a name="verifySummary"></a><span class="summary-sig-name">verifySummary</span>(<span class="summary-sig-arg">self</span>, |
| 1021 | <span class="summary-sig-arg">ONOSIp</span>, |
| 1022 | <span class="summary-sig-arg">*deviceCount</span>)</span></td> |
| 1023 | <td align="right" valign="top"> |
| 1024 | <span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.verifySummary">source code</a></span> |
| 1025 | |
| 1026 | </td> |
| 1027 | </tr> |
| 1028 | </table> |
| 1029 | |
| 1030 | </td> |
| 1031 | </tr> |
| 1032 | <tr> |
| 1033 | <td width="15%" align="right" valign="top" class="summary"> |
| 1034 | <span class="summary-type"> </span> |
| 1035 | </td><td class="summary"> |
| 1036 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1037 | <tr> |
| 1038 | <td><span class="summary-sig"><a href="TestON.drivers.common.clidriver.CLI-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>, |
| 1039 | <span class="summary-sig-arg">**execparams</span>)</span><br /> |
| 1040 | It facilitates the command line execution of a given command. |
| 1041 | <em>(Inherited from <a href="TestON.drivers.common.clidriver.CLI-class.html">TestON.drivers.common.clidriver.CLI</a>)</em></td> |
| 1042 | <td align="right" valign="top"> |
| 1043 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.execute">source code</a></span> |
| 1044 | |
| 1045 | </td> |
| 1046 | </tr> |
| 1047 | </table> |
| 1048 | |
| 1049 | </td> |
| 1050 | </tr> |
| 1051 | <tr> |
| 1052 | <td width="15%" align="right" valign="top" class="summary"> |
| 1053 | <span class="summary-type"> </span> |
| 1054 | </td><td class="summary"> |
| 1055 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1056 | <tr> |
| 1057 | <td><span class="summary-sig"><a name="onfail"></a><span class="summary-sig-name">onfail</span>(<span class="summary-sig-arg">self</span>)</span> |
| 1058 | <em>(Inherited from <a href="TestON.drivers.common.clidriver.CLI-class.html">TestON.drivers.common.clidriver.CLI</a>)</em></td> |
| 1059 | <td align="right" valign="top"> |
| 1060 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.onfail">source code</a></span> |
| 1061 | |
| 1062 | </td> |
| 1063 | </tr> |
| 1064 | </table> |
| 1065 | |
| 1066 | </td> |
| 1067 | </tr> |
| 1068 | <tr> |
| 1069 | <td width="15%" align="right" valign="top" class="summary"> |
| 1070 | <span class="summary-type"> </span> |
| 1071 | </td><td class="summary"> |
| 1072 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1073 | <tr> |
| 1074 | <td><span class="summary-sig"><a name="remove_contol_chars"></a><span class="summary-sig-name">remove_contol_chars</span>(<span class="summary-sig-arg">self</span>, |
| 1075 | <span class="summary-sig-arg">response</span>)</span> |
| 1076 | <em>(Inherited from <a href="TestON.drivers.common.clidriver.CLI-class.html">TestON.drivers.common.clidriver.CLI</a>)</em></td> |
| 1077 | <td align="right" valign="top"> |
| 1078 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.remove_contol_chars">source code</a></span> |
| 1079 | |
| 1080 | </td> |
| 1081 | </tr> |
| 1082 | </table> |
| 1083 | |
| 1084 | </td> |
| 1085 | </tr> |
| 1086 | <tr> |
| 1087 | <td width="15%" align="right" valign="top" class="summary"> |
| 1088 | <span class="summary-type"> </span> |
| 1089 | </td><td class="summary"> |
| 1090 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1091 | <tr> |
| 1092 | <td><span class="summary-sig"><a name="runAsSudoUser"></a><span class="summary-sig-name">runAsSudoUser</span>(<span class="summary-sig-arg">self</span>, |
| 1093 | <span class="summary-sig-arg">handle</span>, |
| 1094 | <span class="summary-sig-arg">pwd</span>, |
| 1095 | <span class="summary-sig-arg">default</span>)</span> |
| 1096 | <em>(Inherited from <a href="TestON.drivers.common.clidriver.CLI-class.html">TestON.drivers.common.clidriver.CLI</a>)</em></td> |
| 1097 | <td align="right" valign="top"> |
| 1098 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.runAsSudoUser">source code</a></span> |
| 1099 | |
| 1100 | </td> |
| 1101 | </tr> |
| 1102 | </table> |
| 1103 | |
| 1104 | </td> |
| 1105 | </tr> |
| 1106 | <tr> |
| 1107 | <td width="15%" align="right" valign="top" class="summary"> |
| 1108 | <span class="summary-type"> </span> |
| 1109 | </td><td class="summary"> |
| 1110 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1111 | <tr> |
| 1112 | <td><span class="summary-sig"><a href="TestON.drivers.common.clidriver.CLI-class.html#secureCopy" class="summary-sig-name">secureCopy</a>(<span class="summary-sig-arg">self</span>, |
| 1113 | <span class="summary-sig-arg">user_name</span>, |
| 1114 | <span class="summary-sig-arg">ip_address</span>, |
| 1115 | <span class="summary-sig-arg">filepath</span>, |
| 1116 | <span class="summary-sig-arg">pwd</span>, |
| 1117 | <span class="summary-sig-arg">dst_path</span>)</span><br /> |
| 1118 | Connection will establish to the remote host using ssh. |
| 1119 | <em>(Inherited from <a href="TestON.drivers.common.clidriver.CLI-class.html">TestON.drivers.common.clidriver.CLI</a>)</em></td> |
| 1120 | <td align="right" valign="top"> |
| 1121 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.secureCopy">source code</a></span> |
| 1122 | |
| 1123 | </td> |
| 1124 | </tr> |
| 1125 | </table> |
| 1126 | |
| 1127 | </td> |
| 1128 | </tr> |
| 1129 | <tr> |
| 1130 | <td colspan="2" class="summary"> |
| 1131 | <p class="indent-wrapped-lines"><b>Inherited from <code>component.Component</code></b>: |
| 1132 | <code>__getattr__</code>, |
| 1133 | <code>cleanup</code>, |
| 1134 | <code>close_log_handles</code>, |
| 1135 | <code>config</code>, |
| 1136 | <code>experimentRun</code>, |
| 1137 | <code>get_version</code>, |
| 1138 | <code>log</code> |
| 1139 | </p> |
| 1140 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 1141 | <code>__delattr__</code>, |
| 1142 | <code>__format__</code>, |
| 1143 | <code>__getattribute__</code>, |
| 1144 | <code>__hash__</code>, |
| 1145 | <code>__new__</code>, |
| 1146 | <code>__reduce__</code>, |
| 1147 | <code>__reduce_ex__</code>, |
| 1148 | <code>__repr__</code>, |
| 1149 | <code>__setattr__</code>, |
| 1150 | <code>__sizeof__</code>, |
| 1151 | <code>__str__</code>, |
| 1152 | <code>__subclasshook__</code> |
| 1153 | </p> |
| 1154 | </td> |
| 1155 | </tr> |
| 1156 | </table> |
| 1157 | <!-- ==================== PROPERTIES ==================== --> |
| 1158 | <a name="section-Properties"></a> |
| 1159 | <table class="summary" border="1" cellpadding="3" |
| 1160 | cellspacing="0" width="100%" bgcolor="white"> |
| 1161 | <tr bgcolor="#70b0f0" class="table-header"> |
| 1162 | <td colspan="2" class="table-header"> |
| 1163 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 1164 | <tr valign="top"> |
| 1165 | <td align="left"><span class="table-header">Properties</span></td> |
| 1166 | <td align="right" valign="top" |
| 1167 | ><span class="options">[<a href="#section-Properties" |
| 1168 | class="privatelink" onclick="toggle_private();" |
| 1169 | >hide private</a>]</span></td> |
| 1170 | </tr> |
| 1171 | </table> |
| 1172 | </td> |
| 1173 | </tr> |
| 1174 | <tr> |
| 1175 | <td colspan="2" class="summary"> |
| 1176 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 1177 | <code>__class__</code> |
| 1178 | </p> |
| 1179 | </td> |
| 1180 | </tr> |
| 1181 | </table> |
| 1182 | <!-- ==================== METHOD DETAILS ==================== --> |
| 1183 | <a name="section-MethodDetails"></a> |
| 1184 | <table class="details" border="1" cellpadding="3" |
| 1185 | cellspacing="0" width="100%" bgcolor="white"> |
| 1186 | <tr bgcolor="#70b0f0" class="table-header"> |
| 1187 | <td colspan="2" class="table-header"> |
| 1188 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 1189 | <tr valign="top"> |
| 1190 | <td align="left"><span class="table-header">Method Details</span></td> |
| 1191 | <td align="right" valign="top" |
| 1192 | ><span class="options">[<a href="#section-MethodDetails" |
| 1193 | class="privatelink" onclick="toggle_private();" |
| 1194 | >hide private</a>]</span></td> |
| 1195 | </tr> |
| 1196 | </table> |
| 1197 | </td> |
| 1198 | </tr> |
| 1199 | </table> |
| 1200 | <a name="__init__"></a> |
| 1201 | <div> |
| 1202 | <table class="details" border="1" cellpadding="3" |
| 1203 | cellspacing="0" width="100%" bgcolor="white"> |
| 1204 | <tr><td> |
| 1205 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1206 | <tr valign="top"><td> |
| 1207 | <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span> |
| 1208 | <br /><em class="fname">(Constructor)</em> |
| 1209 | </h3> |
| 1210 | </td><td align="right" valign="top" |
| 1211 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.__init__">source code</a></span> |
| 1212 | </td> |
| 1213 | </tr></table> |
| 1214 | |
| 1215 | <p>Initialize client</p> |
| 1216 | <dl class="fields"> |
| 1217 | <dt>Overrides: |
| 1218 | object.__init__ |
| 1219 | </dt> |
| 1220 | </dl> |
| 1221 | </td></tr></table> |
| 1222 | </div> |
| 1223 | <a name="connect"></a> |
| 1224 | <div> |
| 1225 | <table class="details" border="1" cellpadding="3" |
| 1226 | cellspacing="0" width="100%" bgcolor="white"> |
| 1227 | <tr><td> |
| 1228 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1229 | <tr valign="top"><td> |
| 1230 | <h3 class="epydoc"><span class="sig"><span class="sig-name">connect</span>(<span class="sig-arg">self</span>, |
| 1231 | <span class="sig-arg">**connectargs</span>)</span> |
| 1232 | </h3> |
| 1233 | </td><td align="right" valign="top" |
| 1234 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.connect">source code</a></span> |
| 1235 | </td> |
| 1236 | </tr></table> |
| 1237 | |
| 1238 | <p>Creates ssh handle for ONOS "bench". NOTE: The ip_address |
| 1239 | would come from the topo file using the host tag, the value can be an |
| 1240 | environment variable as well as a "localhost" to get the ip |
| 1241 | address needed to ssh to the "bench"</p> |
| 1242 | <dl class="fields"> |
| 1243 | <dt>Overrides: |
| 1244 | component.Component.connect |
| 1245 | </dt> |
| 1246 | </dl> |
| 1247 | </td></tr></table> |
| 1248 | </div> |
| 1249 | <a name="disconnect"></a> |
| 1250 | <div> |
| 1251 | <table class="details" border="1" cellpadding="3" |
| 1252 | cellspacing="0" width="100%" bgcolor="white"> |
| 1253 | <tr><td> |
| 1254 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1255 | <tr valign="top"><td> |
| 1256 | <h3 class="epydoc"><span class="sig"><span class="sig-name">disconnect</span>(<span class="sig-arg">self</span>)</span> |
| 1257 | </h3> |
| 1258 | </td><td align="right" valign="top" |
| 1259 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.disconnect">source code</a></span> |
| 1260 | </td> |
| 1261 | </tr></table> |
| 1262 | |
| 1263 | <p>Called when Test is complete to disconnect the ONOS handle.</p> |
| 1264 | <dl class="fields"> |
| 1265 | <dt>Overrides: |
| 1266 | component.Component.disconnect |
| 1267 | </dt> |
| 1268 | </dl> |
| 1269 | </td></tr></table> |
| 1270 | </div> |
| 1271 | <a name="getEpochMs"></a> |
| 1272 | <div> |
| 1273 | <table class="details" border="1" cellpadding="3" |
| 1274 | cellspacing="0" width="100%" bgcolor="white"> |
| 1275 | <tr><td> |
| 1276 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1277 | <tr valign="top"><td> |
| 1278 | <h3 class="epydoc"><span class="sig"><span class="sig-name">getEpochMs</span>(<span class="sig-arg">self</span>)</span> |
| 1279 | </h3> |
| 1280 | </td><td align="right" valign="top" |
| 1281 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getEpochMs">source code</a></span> |
| 1282 | </td> |
| 1283 | </tr></table> |
| 1284 | |
| 1285 | <p>Returns milliseconds since epoch</p> |
| 1286 | <p>When checking multiple nodes in a for loop, around a hundred |
| 1287 | milliseconds of difference (ascending) is generally acceptable due to |
| 1288 | calltime of the function. Few seconds, however, is not and it means |
| 1289 | clocks are off sync.</p> |
| 1290 | <dl class="fields"> |
| 1291 | </dl> |
| 1292 | </td></tr></table> |
| 1293 | </div> |
| 1294 | <a name="cleanInstall"></a> |
| 1295 | <div> |
| 1296 | <table class="details" border="1" cellpadding="3" |
| 1297 | cellspacing="0" width="100%" bgcolor="white"> |
| 1298 | <tr><td> |
| 1299 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1300 | <tr valign="top"><td> |
| 1301 | <h3 class="epydoc"><span class="sig"><span class="sig-name">cleanInstall</span>(<span class="sig-arg">self</span>, |
| 1302 | <span class="sig-arg">skipTest</span>=<span class="sig-default">False</span>, |
| 1303 | <span class="sig-arg">mciTimeout</span>=<span class="sig-default">600</span>)</span> |
| 1304 | </h3> |
| 1305 | </td><td align="right" valign="top" |
| 1306 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.cleanInstall">source code</a></span> |
| 1307 | </td> |
| 1308 | </tr></table> |
| 1309 | |
| 1310 | <pre class="literalblock"> |
| 1311 | |
| 1312 | Runs mvn clean install in the root of the ONOS directory. |
| 1313 | This will clean all ONOS artifacts then compile each module |
| 1314 | Optional: |
| 1315 | skipTest - Does "-DskipTests -Dcheckstyle.skip -U -T 1C" which |
| 1316 | skip the test. This will make the building faster. |
| 1317 | Disregarding the credibility of the build |
| 1318 | Returns: main.TRUE on success |
| 1319 | On Failure, exits the test |
| 1320 | |
| 1321 | </pre> |
| 1322 | <dl class="fields"> |
| 1323 | </dl> |
| 1324 | </td></tr></table> |
| 1325 | </div> |
| 1326 | <a name="gitPull"></a> |
| 1327 | <div> |
| 1328 | <table class="details" border="1" cellpadding="3" |
| 1329 | cellspacing="0" width="100%" bgcolor="white"> |
| 1330 | <tr><td> |
| 1331 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1332 | <tr valign="top"><td> |
| 1333 | <h3 class="epydoc"><span class="sig"><span class="sig-name">gitPull</span>(<span class="sig-arg">self</span>, |
| 1334 | <span class="sig-arg">comp1</span>=<span class="sig-default">""</span>, |
| 1335 | <span class="sig-arg">fastForward</span>=<span class="sig-default">True</span>)</span> |
| 1336 | </h3> |
| 1337 | </td><td align="right" valign="top" |
| 1338 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.gitPull">source code</a></span> |
| 1339 | </td> |
| 1340 | </tr></table> |
| 1341 | |
| 1342 | <p>Assumes that "git pull" works without login</p> |
| 1343 | <p>If the fastForward boolean is set to true, only git pulls that can be |
| 1344 | fast forwarded will be performed. IE if you have not local commits in |
| 1345 | your branch.</p> |
| 1346 | <p>This function will perform a git pull on the ONOS instance. If used as |
| 1347 | gitPull( "NODE" ) it will do git pull + NODE. This is for the |
| 1348 | purpose of pulling from other nodes if necessary.</p> |
| 1349 | <p>Otherwise, this function will perform a git pull in the ONOS |
| 1350 | repository. If it has any problems, it will return main.ERROR If it |
| 1351 | successfully does a gitPull, it will return a 1 ( main.TRUE ) If it has |
| 1352 | no updates, it will return 3.</p> |
| 1353 | <dl class="fields"> |
| 1354 | </dl> |
| 1355 | </td></tr></table> |
| 1356 | </div> |
| 1357 | <a name="gitCheckout"></a> |
| 1358 | <div> |
| 1359 | <table class="details" border="1" cellpadding="3" |
| 1360 | cellspacing="0" width="100%" bgcolor="white"> |
| 1361 | <tr><td> |
| 1362 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1363 | <tr valign="top"><td> |
| 1364 | <h3 class="epydoc"><span class="sig"><span class="sig-name">gitCheckout</span>(<span class="sig-arg">self</span>, |
| 1365 | <span class="sig-arg">branch</span>=<span class="sig-default">"master"</span>)</span> |
| 1366 | </h3> |
| 1367 | </td><td align="right" valign="top" |
| 1368 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.gitCheckout">source code</a></span> |
| 1369 | </td> |
| 1370 | </tr></table> |
| 1371 | |
| 1372 | <p>Assumes that "git pull" works without login</p> |
| 1373 | <p>This function will perform a git git checkout on the ONOS instance. If |
| 1374 | used as gitCheckout( "branch" ) it will do git checkout of the |
| 1375 | "branch".</p> |
| 1376 | <p>Otherwise, this function will perform a git checkout of the master |
| 1377 | branch of the ONOS repository. If it has any problems, it will return |
| 1378 | main.ERROR. If the branch was already the specified branch, or the git |
| 1379 | checkout was successful then the function will return main.TRUE.</p> |
| 1380 | <dl class="fields"> |
| 1381 | </dl> |
| 1382 | </td></tr></table> |
| 1383 | </div> |
| 1384 | <a name="createCellFile"></a> |
| 1385 | <div> |
| 1386 | <table class="details" border="1" cellpadding="3" |
| 1387 | cellspacing="0" width="100%" bgcolor="white"> |
| 1388 | <tr><td> |
| 1389 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1390 | <tr valign="top"><td> |
| 1391 | <h3 class="epydoc"><span class="sig"><span class="sig-name">createCellFile</span>(<span class="sig-arg">self</span>, |
| 1392 | <span class="sig-arg">benchIp</span>, |
| 1393 | <span class="sig-arg">fileName</span>, |
| 1394 | <span class="sig-arg">mnIpAddrs</span>, |
| 1395 | <span class="sig-arg">appString</span>, |
| 1396 | <span class="sig-arg">onosIpAddrs</span>)</span> |
| 1397 | </h3> |
| 1398 | </td><td align="right" valign="top" |
| 1399 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.createCellFile">source code</a></span> |
| 1400 | </td> |
| 1401 | </tr></table> |
| 1402 | |
| 1403 | <pre class="literalblock"> |
| 1404 | |
| 1405 | Creates a cell file based on arguments |
| 1406 | Required: |
| 1407 | * Bench IP address ( benchIp ) |
| 1408 | - Needed to copy the cell file over |
| 1409 | * File name of the cell file ( fileName ) |
| 1410 | * Mininet IP address ( mnIpAddrs ) |
| 1411 | - Note that only 1 ip address is |
| 1412 | supported currently |
| 1413 | * ONOS IP addresses ( onosIpAddrs ) |
| 1414 | - Must be passed in as last arguments |
| 1415 | |
| 1416 | NOTE: Assumes cells are located at: |
| 1417 | ~/<self.home>/tools/test/cells/ |
| 1418 | |
| 1419 | </pre> |
| 1420 | <dl class="fields"> |
| 1421 | </dl> |
| 1422 | </td></tr></table> |
| 1423 | </div> |
| 1424 | <a name="onosCfgSet"></a> |
| 1425 | <div> |
| 1426 | <table class="details" border="1" cellpadding="3" |
| 1427 | cellspacing="0" width="100%" bgcolor="white"> |
| 1428 | <tr><td> |
| 1429 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1430 | <tr valign="top"><td> |
| 1431 | <h3 class="epydoc"><span class="sig"><span class="sig-name">onosCfgSet</span>(<span class="sig-arg">self</span>, |
| 1432 | <span class="sig-arg">ONOSIp</span>, |
| 1433 | <span class="sig-arg">configName</span>, |
| 1434 | <span class="sig-arg">configParam</span>)</span> |
| 1435 | </h3> |
| 1436 | </td><td align="right" valign="top" |
| 1437 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosCfgSet">source code</a></span> |
| 1438 | </td> |
| 1439 | </tr></table> |
| 1440 | |
| 1441 | <pre class="literalblock"> |
| 1442 | |
| 1443 | Uses 'onos <node-ip> cfg set' to change a parameter value of an |
| 1444 | application. |
| 1445 | |
| 1446 | ex) |
| 1447 | onos 10.0.0.1 cfg set org.onosproject.myapp appSetting 1 |
| 1448 | ONOSIp = '10.0.0.1' |
| 1449 | configName = 'org.onosproject.myapp' |
| 1450 | configParam = 'appSetting 1' |
| 1451 | |
| 1452 | </pre> |
| 1453 | <dl class="fields"> |
| 1454 | </dl> |
| 1455 | </td></tr></table> |
| 1456 | </div> |
| 1457 | <a name="onosCli"></a> |
| 1458 | <div> |
| 1459 | <table class="details" border="1" cellpadding="3" |
| 1460 | cellspacing="0" width="100%" bgcolor="white"> |
| 1461 | <tr><td> |
| 1462 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1463 | <tr valign="top"><td> |
| 1464 | <h3 class="epydoc"><span class="sig"><span class="sig-name">onosCli</span>(<span class="sig-arg">self</span>, |
| 1465 | <span class="sig-arg">ONOSIp</span>, |
| 1466 | <span class="sig-arg">cmdstr</span>)</span> |
| 1467 | </h3> |
| 1468 | </td><td align="right" valign="top" |
| 1469 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosCli">source code</a></span> |
| 1470 | </td> |
| 1471 | </tr></table> |
| 1472 | |
| 1473 | <pre class="literalblock"> |
| 1474 | |
| 1475 | Uses 'onos' command to send various ONOS CLI arguments. |
| 1476 | Required: |
| 1477 | * ONOSIp: specify the ip of the cell machine |
| 1478 | * cmdstr: specify the command string to send |
| 1479 | |
| 1480 | This function is intended to expose the entire karaf |
| 1481 | CLI commands for ONOS. Try to use this function first |
| 1482 | before attempting to write a ONOS CLI specific driver |
| 1483 | function. |
| 1484 | You can see a list of available 'cmdstr' arguments |
| 1485 | by starting onos, and typing in 'onos' to enter the |
| 1486 | onos> CLI. Then, type 'help' to see the list of |
| 1487 | available commands. |
| 1488 | |
| 1489 | </pre> |
| 1490 | <dl class="fields"> |
| 1491 | </dl> |
| 1492 | </td></tr></table> |
| 1493 | </div> |
| 1494 | <a name="onosInstall"></a> |
| 1495 | <div> |
| 1496 | <table class="details" border="1" cellpadding="3" |
| 1497 | cellspacing="0" width="100%" bgcolor="white"> |
| 1498 | <tr><td> |
| 1499 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1500 | <tr valign="top"><td> |
| 1501 | <h3 class="epydoc"><span class="sig"><span class="sig-name">onosInstall</span>(<span class="sig-arg">self</span>, |
| 1502 | <span class="sig-arg">options</span>=<span class="sig-default">"-f"</span>, |
| 1503 | <span class="sig-arg">node</span>=<span class="sig-default">""</span>)</span> |
| 1504 | </h3> |
| 1505 | </td><td align="right" valign="top" |
| 1506 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosInstall">source code</a></span> |
| 1507 | </td> |
| 1508 | </tr></table> |
| 1509 | |
| 1510 | <p>Installs ONOS bits on the designated cell machine. If -f option is |
| 1511 | provided, it also forces an uninstall. Presently, install also includes |
| 1512 | onos-push-bits and onos-config within. The node option allows you to |
| 1513 | selectively only push the jar files to certain onos nodes</p> |
| 1514 | <p>Returns: main.TRUE on success and main.FALSE on failure</p> |
| 1515 | <dl class="fields"> |
| 1516 | </dl> |
| 1517 | </td></tr></table> |
| 1518 | </div> |
| 1519 | <a name="onosRemoveRaftLogs"></a> |
| 1520 | <div> |
| 1521 | <table class="details" border="1" cellpadding="3" |
| 1522 | cellspacing="0" width="100%" bgcolor="white"> |
| 1523 | <tr><td> |
| 1524 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1525 | <tr valign="top"><td> |
| 1526 | <h3 class="epydoc"><span class="sig"><span class="sig-name">onosRemoveRaftLogs</span>(<span class="sig-arg">self</span>)</span> |
| 1527 | </h3> |
| 1528 | </td><td align="right" valign="top" |
| 1529 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosRemoveRaftLogs">source code</a></span> |
| 1530 | </td> |
| 1531 | </tr></table> |
| 1532 | |
| 1533 | <pre class="literalblock"> |
| 1534 | |
| 1535 | Removes Raft / Copy cat files from ONOS to ensure |
| 1536 | a cleaner environment. |
| 1537 | |
| 1538 | Description: |
| 1539 | Stops all ONOS defined in the cell, |
| 1540 | wipes the raft / copycat log files |
| 1541 | |
| 1542 | </pre> |
| 1543 | <dl class="fields"> |
| 1544 | </dl> |
| 1545 | </td></tr></table> |
| 1546 | </div> |
| 1547 | <a name="onosStartNetwork"></a> |
| 1548 | <div> |
| 1549 | <table class="details" border="1" cellpadding="3" |
| 1550 | cellspacing="0" width="100%" bgcolor="white"> |
| 1551 | <tr><td> |
| 1552 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1553 | <tr valign="top"><td> |
| 1554 | <h3 class="epydoc"><span class="sig"><span class="sig-name">onosStartNetwork</span>(<span class="sig-arg">self</span>, |
| 1555 | <span class="sig-arg">mntopo</span>)</span> |
| 1556 | </h3> |
| 1557 | </td><td align="right" valign="top" |
| 1558 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.onosStartNetwork">source code</a></span> |
| 1559 | </td> |
| 1560 | </tr></table> |
| 1561 | |
| 1562 | <pre class="literalblock"> |
| 1563 | |
| 1564 | Calls the command 'onos-start-network [ <mininet-topo> ] |
| 1565 | "remotely starts the specified topology on the cell's |
| 1566 | mininet machine against all controllers configured in the |
| 1567 | cell." |
| 1568 | * Specify mininet topology file name for mntopo |
| 1569 | * Topo files should be placed at: |
| 1570 | ~/<your-onos-directory>/tools/test/topos |
| 1571 | |
| 1572 | NOTE: This function will take you to the mininet prompt |
| 1573 | |
| 1574 | </pre> |
| 1575 | <dl class="fields"> |
| 1576 | </dl> |
| 1577 | </td></tr></table> |
| 1578 | </div> |
| 1579 | <a name="isup"></a> |
| 1580 | <div> |
| 1581 | <table class="details" border="1" cellpadding="3" |
| 1582 | cellspacing="0" width="100%" bgcolor="white"> |
| 1583 | <tr><td> |
| 1584 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1585 | <tr valign="top"><td> |
| 1586 | <h3 class="epydoc"><span class="sig"><span class="sig-name">isup</span>(<span class="sig-arg">self</span>, |
| 1587 | <span class="sig-arg">node</span>=<span class="sig-default">""</span>, |
| 1588 | <span class="sig-arg">timeout</span>=<span class="sig-default">120</span>)</span> |
| 1589 | </h3> |
| 1590 | </td><td align="right" valign="top" |
| 1591 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.isup">source code</a></span> |
| 1592 | </td> |
| 1593 | </tr></table> |
| 1594 | |
| 1595 | <p>Run's onos-wait-for-start which only returns once ONOS is at run level |
| 1596 | 100(ready for use)</p> |
| 1597 | <p>Returns: main.TRUE if ONOS is running and main.FALSE on timeout</p> |
| 1598 | <dl class="fields"> |
| 1599 | </dl> |
| 1600 | </td></tr></table> |
| 1601 | </div> |
| 1602 | <a name="pushTestIntentsShell"></a> |
| 1603 | <div> |
| 1604 | <table class="details" border="1" cellpadding="3" |
| 1605 | cellspacing="0" width="100%" bgcolor="white"> |
| 1606 | <tr><td> |
| 1607 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1608 | <tr valign="top"><td> |
| 1609 | <h3 class="epydoc"><span class="sig"><span class="sig-name">pushTestIntentsShell</span>(<span class="sig-arg">self</span>, |
| 1610 | <span class="sig-arg">dpidSrc</span>, |
| 1611 | <span class="sig-arg">dpidDst</span>, |
| 1612 | <span class="sig-arg">numIntents</span>, |
| 1613 | <span class="sig-arg">dirFile</span>, |
| 1614 | <span class="sig-arg">onosIp</span>, |
| 1615 | <span class="sig-arg">numMult</span>=<span class="sig-default">""</span>, |
| 1616 | <span class="sig-arg">appId</span>=<span class="sig-default">""</span>, |
| 1617 | <span class="sig-arg">report</span>=<span class="sig-default">True</span>, |
| 1618 | <span class="sig-arg">options</span>=<span class="sig-default">""</span>)</span> |
| 1619 | </h3> |
| 1620 | </td><td align="right" valign="top" |
| 1621 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.pushTestIntentsShell">source code</a></span> |
| 1622 | </td> |
| 1623 | </tr></table> |
| 1624 | |
| 1625 | <pre class="literalblock"> |
| 1626 | |
| 1627 | Description: |
| 1628 | Use the linux prompt to push test intents to |
| 1629 | better parallelize the results than the CLI |
| 1630 | Required: |
| 1631 | * dpidSrc: specify source dpid |
| 1632 | * dpidDst: specify destination dpid |
| 1633 | * numIntents: specify number of intents to push |
| 1634 | * dirFile: specify directory and file name to save |
| 1635 | results |
| 1636 | * onosIp: specify the IP of ONOS to install on |
| 1637 | NOTE: |
| 1638 | You must invoke this command at linux shell prompt |
| 1639 | |
| 1640 | </pre> |
| 1641 | <dl class="fields"> |
| 1642 | </dl> |
| 1643 | </td></tr></table> |
| 1644 | </div> |
| 1645 | <a name="getTopology"></a> |
| 1646 | <div> |
| 1647 | <table class="details" border="1" cellpadding="3" |
| 1648 | cellspacing="0" width="100%" bgcolor="white"> |
| 1649 | <tr><td> |
| 1650 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1651 | <tr valign="top"><td> |
| 1652 | <h3 class="epydoc"><span class="sig"><span class="sig-name">getTopology</span>(<span class="sig-arg">self</span>, |
| 1653 | <span class="sig-arg">topologyOutput</span>)</span> |
| 1654 | </h3> |
| 1655 | </td><td align="right" valign="top" |
| 1656 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.getTopology">source code</a></span> |
| 1657 | </td> |
| 1658 | </tr></table> |
| 1659 | |
| 1660 | <pre class="literalblock"> |
| 1661 | |
| 1662 | Definition: |
| 1663 | Loads a json topology output |
| 1664 | Return: |
| 1665 | topology = current ONOS topology |
| 1666 | |
| 1667 | </pre> |
| 1668 | <dl class="fields"> |
| 1669 | </dl> |
| 1670 | </td></tr></table> |
| 1671 | </div> |
| 1672 | <a name="checkStatus"></a> |
| 1673 | <div> |
| 1674 | <table class="details" border="1" cellpadding="3" |
| 1675 | cellspacing="0" width="100%" bgcolor="white"> |
| 1676 | <tr><td> |
| 1677 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1678 | <tr valign="top"><td> |
| 1679 | <h3 class="epydoc"><span class="sig"><span class="sig-name">checkStatus</span>(<span class="sig-arg">self</span>, |
| 1680 | <span class="sig-arg">topologyResult</span>, |
| 1681 | <span class="sig-arg">numoswitch</span>, |
| 1682 | <span class="sig-arg">numolink</span>, |
| 1683 | <span class="sig-arg">logLevel</span>=<span class="sig-default">"info"</span>)</span> |
| 1684 | </h3> |
| 1685 | </td><td align="right" valign="top" |
| 1686 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.checkStatus">source code</a></span> |
| 1687 | </td> |
| 1688 | </tr></table> |
| 1689 | |
| 1690 | <pre class="literalblock"> |
| 1691 | |
| 1692 | Checks the number of switches & links that ONOS sees against the |
| 1693 | supplied values. By default this will report to main.log, but the |
| 1694 | log level can be specific. |
| 1695 | |
| 1696 | Params: ip = ip used for the onos cli |
| 1697 | numoswitch = expected number of switches |
| 1698 | numolink = expected number of links |
| 1699 | logLevel = level to log to. |
| 1700 | Currently accepts 'info', 'warn' and 'report' |
| 1701 | |
| 1702 | |
| 1703 | logLevel can |
| 1704 | |
| 1705 | Returns: main.TRUE if the number of switches and links are correct, |
| 1706 | main.FALSE if the number of switches and links is incorrect, |
| 1707 | and main.ERROR otherwise |
| 1708 | |
| 1709 | </pre> |
| 1710 | <dl class="fields"> |
| 1711 | </dl> |
| 1712 | </td></tr></table> |
| 1713 | </div> |
| 1714 | <a name="tsharkPcap"></a> |
| 1715 | <div> |
| 1716 | <table class="details" border="1" cellpadding="3" |
| 1717 | cellspacing="0" width="100%" bgcolor="white"> |
| 1718 | <tr><td> |
| 1719 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1720 | <tr valign="top"><td> |
| 1721 | <h3 class="epydoc"><span class="sig"><span class="sig-name">tsharkPcap</span>(<span class="sig-arg">self</span>, |
| 1722 | <span class="sig-arg">interface</span>, |
| 1723 | <span class="sig-arg">dirFile</span>)</span> |
| 1724 | </h3> |
| 1725 | </td><td align="right" valign="top" |
| 1726 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.tsharkPcap">source code</a></span> |
| 1727 | </td> |
| 1728 | </tr></table> |
| 1729 | |
| 1730 | <pre class="literalblock"> |
| 1731 | |
| 1732 | Capture all packet activity and store in specified |
| 1733 | directory/file |
| 1734 | |
| 1735 | Required: |
| 1736 | * interface: interface to capture |
| 1737 | * dir: directory/filename to store pcap |
| 1738 | |
| 1739 | </pre> |
| 1740 | <dl class="fields"> |
| 1741 | </dl> |
| 1742 | </td></tr></table> |
| 1743 | </div> |
| 1744 | <a name="tsharkGrep"></a> |
| 1745 | <div> |
| 1746 | <table class="details" border="1" cellpadding="3" |
| 1747 | cellspacing="0" width="100%" bgcolor="white"> |
| 1748 | <tr><td> |
| 1749 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1750 | <tr valign="top"><td> |
| 1751 | <h3 class="epydoc"><span class="sig"><span class="sig-name">tsharkGrep</span>(<span class="sig-arg">self</span>, |
| 1752 | <span class="sig-arg">grep</span>, |
| 1753 | <span class="sig-arg">directory</span>, |
| 1754 | <span class="sig-arg">interface</span>=<span class="sig-default">'eth0'</span>, |
| 1755 | <span class="sig-arg">grepOptions</span>=<span class="sig-default">''</span>)</span> |
| 1756 | </h3> |
| 1757 | </td><td align="right" valign="top" |
| 1758 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.tsharkGrep">source code</a></span> |
| 1759 | </td> |
| 1760 | </tr></table> |
| 1761 | |
| 1762 | <pre class="literalblock"> |
| 1763 | |
| 1764 | Required: |
| 1765 | * grep string |
| 1766 | * directory to store results |
| 1767 | Optional: |
| 1768 | * interface - default: eth0 |
| 1769 | * grepOptions - options for grep |
| 1770 | Description: |
| 1771 | Uses tshark command to grep specific group of packets |
| 1772 | and stores the results to specified directory. |
| 1773 | The timestamp is hardcoded to be in epoch |
| 1774 | |
| 1775 | </pre> |
| 1776 | <dl class="fields"> |
| 1777 | </dl> |
| 1778 | </td></tr></table> |
| 1779 | </div> |
| 1780 | <a name="ptpd"></a> |
| 1781 | <div> |
| 1782 | <table class="details" border="1" cellpadding="3" |
| 1783 | cellspacing="0" width="100%" bgcolor="white"> |
| 1784 | <tr><td> |
| 1785 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1786 | <tr valign="top"><td> |
| 1787 | <h3 class="epydoc"><span class="sig"><span class="sig-name">ptpd</span>(<span class="sig-arg">self</span>, |
| 1788 | <span class="sig-arg">args</span>)</span> |
| 1789 | </h3> |
| 1790 | </td><td align="right" valign="top" |
| 1791 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.ptpd">source code</a></span> |
| 1792 | </td> |
| 1793 | </tr></table> |
| 1794 | |
| 1795 | <pre class="literalblock"> |
| 1796 | |
| 1797 | Initiate ptp with user-specified args. |
| 1798 | Required: |
| 1799 | * args: specify string of args after command |
| 1800 | 'sudo ptpd' |
| 1801 | |
| 1802 | </pre> |
| 1803 | <dl class="fields"> |
| 1804 | </dl> |
| 1805 | </td></tr></table> |
| 1806 | </div> |
| 1807 | <a name="cpLogsToDir"></a> |
| 1808 | <div> |
| 1809 | <table class="details" border="1" cellpadding="3" |
| 1810 | cellspacing="0" width="100%" bgcolor="white"> |
| 1811 | <tr><td> |
| 1812 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1813 | <tr valign="top"><td> |
| 1814 | <h3 class="epydoc"><span class="sig"><span class="sig-name">cpLogsToDir</span>(<span class="sig-arg">self</span>, |
| 1815 | <span class="sig-arg">logToCopy</span>, |
| 1816 | <span class="sig-arg">destDir</span>, |
| 1817 | <span class="sig-arg">copyFileName</span>=<span class="sig-default">""</span>)</span> |
| 1818 | </h3> |
| 1819 | </td><td align="right" valign="top" |
| 1820 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.cpLogsToDir">source code</a></span> |
| 1821 | </td> |
| 1822 | </tr></table> |
| 1823 | |
| 1824 | <pre class="literalblock"> |
| 1825 | |
| 1826 | Copies logs to a desired directory. |
| 1827 | Current implementation of ONOS deletes its karaf |
| 1828 | logs on every iteration. For debugging purposes, |
| 1829 | you may want to use this function to capture |
| 1830 | certain karaf logs. ( or any other logs if needed ) |
| 1831 | Localtime will be attached to the filename |
| 1832 | |
| 1833 | Required: |
| 1834 | * logToCopy: specify directory and log name to |
| 1835 | copy. |
| 1836 | ex ) /opt/onos/log/karaf.log.1 |
| 1837 | For copying multiple files, leave copyFileName |
| 1838 | empty and only specify destDir - |
| 1839 | ex ) /opt/onos/log/karaf* |
| 1840 | * destDir: specify directory to copy to. |
| 1841 | ex ) /tmp/ |
| 1842 | Optional: |
| 1843 | * copyFileName: If you want to rename the log |
| 1844 | file, specify copyFileName. This will not work |
| 1845 | with multiple file copying |
| 1846 | |
| 1847 | </pre> |
| 1848 | <dl class="fields"> |
| 1849 | </dl> |
| 1850 | </td></tr></table> |
| 1851 | </div> |
| 1852 | <a name="checkLogs"></a> |
| 1853 | <div> |
| 1854 | <table class="details" border="1" cellpadding="3" |
| 1855 | cellspacing="0" width="100%" bgcolor="white"> |
| 1856 | <tr><td> |
| 1857 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1858 | <tr valign="top"><td> |
| 1859 | <h3 class="epydoc"><span class="sig"><span class="sig-name">checkLogs</span>(<span class="sig-arg">self</span>, |
| 1860 | <span class="sig-arg">onosIp</span>, |
| 1861 | <span class="sig-arg">restart</span>=<span class="sig-default">False</span>)</span> |
| 1862 | </h3> |
| 1863 | </td><td align="right" valign="top" |
| 1864 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.checkLogs">source code</a></span> |
| 1865 | </td> |
| 1866 | </tr></table> |
| 1867 | |
| 1868 | <pre class="literalblock"> |
| 1869 | |
| 1870 | runs onos-check-logs on the given onos node |
| 1871 | If restart is True, use the old version of onos-check-logs which |
| 1872 | does not print the full stacktrace, but shows the entire log file, |
| 1873 | including across restarts |
| 1874 | returns the response |
| 1875 | |
| 1876 | </pre> |
| 1877 | <dl class="fields"> |
| 1878 | </dl> |
| 1879 | </td></tr></table> |
| 1880 | </div> |
| 1881 | <a name="setIpTables"></a> |
| 1882 | <div> |
| 1883 | <table class="details" border="1" cellpadding="3" |
| 1884 | cellspacing="0" width="100%" bgcolor="white"> |
| 1885 | <tr><td> |
| 1886 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1887 | <tr valign="top"><td> |
| 1888 | <h3 class="epydoc"><span class="sig"><span class="sig-name">setIpTables</span>(<span class="sig-arg">self</span>, |
| 1889 | <span class="sig-arg">ip</span>, |
| 1890 | <span class="sig-arg">port</span>=<span class="sig-default">''</span>, |
| 1891 | <span class="sig-arg">action</span>=<span class="sig-default">'add'</span>, |
| 1892 | <span class="sig-arg">packet_type</span>=<span class="sig-default">''</span>, |
| 1893 | <span class="sig-arg">direction</span>=<span class="sig-default">'INPUT'</span>, |
| 1894 | <span class="sig-arg">rule</span>=<span class="sig-default">'DROP'</span>, |
| 1895 | <span class="sig-arg">states</span>=<span class="sig-default">True</span>)</span> |
| 1896 | </h3> |
| 1897 | </td><td align="right" valign="top" |
| 1898 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.setIpTables">source code</a></span> |
| 1899 | </td> |
| 1900 | </tr></table> |
| 1901 | |
| 1902 | <pre class="literalblock"> |
| 1903 | |
| 1904 | Description: |
| 1905 | add or remove iptables rule to DROP (default) packets from |
| 1906 | specific IP and PORT |
| 1907 | Usage: |
| 1908 | * specify action ('add' or 'remove') |
| 1909 | when removing, pass in the same argument as you would add. It will |
| 1910 | delete that specific rule. |
| 1911 | * specify the ip to block |
| 1912 | * specify the destination port to block (defaults to all ports) |
| 1913 | * optional packet type to block (default tcp) |
| 1914 | * optional iptables rule (default DROP) |
| 1915 | * optional direction to block (default 'INPUT') |
| 1916 | * States boolean toggles adding all supported tcp states to the |
| 1917 | firewall rule |
| 1918 | Returns: |
| 1919 | main.TRUE on success or |
| 1920 | main.FALSE if given invalid input or |
| 1921 | main.ERROR if there is an error in response from iptables |
| 1922 | WARNING: |
| 1923 | * This function uses root privilege iptables command which may result |
| 1924 | in unwanted network errors. USE WITH CAUTION |
| 1925 | |
| 1926 | </pre> |
| 1927 | <dl class="fields"> |
| 1928 | </dl> |
| 1929 | </td></tr></table> |
| 1930 | </div> |
| 1931 | <a name="createLinkGraphFile"></a> |
| 1932 | <div> |
| 1933 | <table class="details" border="1" cellpadding="3" |
| 1934 | cellspacing="0" width="100%" bgcolor="white"> |
| 1935 | <tr><td> |
| 1936 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1937 | <tr valign="top"><td> |
| 1938 | <h3 class="epydoc"><span class="sig"><span class="sig-name">createLinkGraphFile</span>(<span class="sig-arg">self</span>, |
| 1939 | <span class="sig-arg">benchIp</span>, |
| 1940 | <span class="sig-arg">ONOSIpList</span>, |
| 1941 | <span class="sig-arg">deviceCount</span>)</span> |
| 1942 | </h3> |
| 1943 | </td><td align="right" valign="top" |
| 1944 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.createLinkGraphFile">source code</a></span> |
| 1945 | </td> |
| 1946 | </tr></table> |
| 1947 | |
| 1948 | <pre class="literalblock"> |
| 1949 | |
| 1950 | Create/formats the LinkGraph.cfg file based on arguments |
| 1951 | -only creates a linear topology and connects islands |
| 1952 | -evenly distributes devices |
| 1953 | -must be called by ONOSbench |
| 1954 | |
| 1955 | ONOSIpList - list of all of the node IPs to be used |
| 1956 | |
| 1957 | deviceCount - number of switches to be assigned |
| 1958 | |
| 1959 | </pre> |
| 1960 | <dl class="fields"> |
| 1961 | </dl> |
| 1962 | </td></tr></table> |
| 1963 | </div> |
| 1964 | <a name="configNullDev"></a> |
| 1965 | <div> |
| 1966 | <table class="details" border="1" cellpadding="3" |
| 1967 | cellspacing="0" width="100%" bgcolor="white"> |
| 1968 | <tr><td> |
| 1969 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1970 | <tr valign="top"><td> |
| 1971 | <h3 class="epydoc"><span class="sig"><span class="sig-name">configNullDev</span>(<span class="sig-arg">self</span>, |
| 1972 | <span class="sig-arg">ONOSIpList</span>, |
| 1973 | <span class="sig-arg">deviceCount</span>, |
| 1974 | <span class="sig-arg">numPorts</span>=<span class="sig-default">10</span>)</span> |
| 1975 | </h3> |
| 1976 | </td><td align="right" valign="top" |
| 1977 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.configNullDev">source code</a></span> |
| 1978 | </td> |
| 1979 | </tr></table> |
| 1980 | |
| 1981 | <p>ONOSIpList = list of Ip addresses of nodes switches will be devided |
| 1982 | amongst deviceCount = number of switches to distribute, or list of values |
| 1983 | to use as custom distribution numPorts = number of ports per device. |
| 1984 | Defaults to 10 both in this function and in ONOS. Optional arg</p> |
| 1985 | <dl class="fields"> |
| 1986 | </dl> |
| 1987 | </td></tr></table> |
| 1988 | </div> |
| 1989 | <a name="logReport"></a> |
| 1990 | <div> |
| 1991 | <table class="details" border="1" cellpadding="3" |
| 1992 | cellspacing="0" width="100%" bgcolor="white"> |
| 1993 | <tr><td> |
| 1994 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 1995 | <tr valign="top"><td> |
| 1996 | <h3 class="epydoc"><span class="sig"><span class="sig-name">logReport</span>(<span class="sig-arg">self</span>, |
| 1997 | <span class="sig-arg">nodeIp</span>, |
| 1998 | <span class="sig-arg">searchTerms</span>, |
| 1999 | <span class="sig-arg">outputMode</span>=<span class="sig-default">"s"</span>)</span> |
| 2000 | </h3> |
| 2001 | </td><td align="right" valign="top" |
| 2002 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.logReport">source code</a></span> |
| 2003 | </td> |
| 2004 | </tr></table> |
| 2005 | |
| 2006 | <pre class="literalblock"> |
| 2007 | |
| 2008 | - accepts either a list or a string for "searchTerms" these |
| 2009 | terms will be searched for in the log and have their |
| 2010 | instances counted |
| 2011 | |
| 2012 | - nodeIp is the ip of the node whos log is to be scanned |
| 2013 | |
| 2014 | - output modes: |
| 2015 | "s" - Simple. Quiet output mode that just prints |
| 2016 | the occurences of each search term |
| 2017 | |
| 2018 | "d" - Detailed. Prints number of occurences as well as the entire |
| 2019 | line for each of the last 5 occurences |
| 2020 | |
| 2021 | - returns total of the number of instances of all search terms |
| 2022 | |
| 2023 | </pre> |
| 2024 | <dl class="fields"> |
| 2025 | </dl> |
| 2026 | </td></tr></table> |
| 2027 | </div> |
| 2028 | <a name="copyMininetFile"></a> |
| 2029 | <div> |
| 2030 | <table class="details" border="1" cellpadding="3" |
| 2031 | cellspacing="0" width="100%" bgcolor="white"> |
| 2032 | <tr><td> |
| 2033 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 2034 | <tr valign="top"><td> |
| 2035 | <h3 class="epydoc"><span class="sig"><span class="sig-name">copyMininetFile</span>(<span class="sig-arg">self</span>, |
| 2036 | <span class="sig-arg">fileName</span>, |
| 2037 | <span class="sig-arg">localPath</span>, |
| 2038 | <span class="sig-arg">userName</span>, |
| 2039 | <span class="sig-arg">ip</span>, |
| 2040 | <span class="sig-arg">mnPath</span>=<span class="sig-default">'~/mininet/custom/'</span>, |
| 2041 | <span class="sig-arg">timeout</span>=<span class="sig-default">60</span>)</span> |
| 2042 | </h3> |
| 2043 | </td><td align="right" valign="top" |
| 2044 | ><span class="codelink"><a href="TestON.drivers.common.cli.onosdriver-pysrc.html#OnosDriver.copyMininetFile">source code</a></span> |
| 2045 | </td> |
| 2046 | </tr></table> |
| 2047 | |
| 2048 | <pre class="literalblock"> |
| 2049 | |
| 2050 | Description: |
| 2051 | Copy mininet topology file from dependency folder in the test folder |
| 2052 | and paste it to the mininet machine's mininet/custom folder |
| 2053 | Required: |
| 2054 | fileName - Name of the topology file to copy |
| 2055 | localPath - File path of the mininet topology file |
| 2056 | userName - User name of the mininet machine to send the file to |
| 2057 | ip - Ip address of the mininet machine |
| 2058 | Optional: |
| 2059 | mnPath - of the mininet directory to send the file to |
| 2060 | Return: |
| 2061 | Return main.TRUE if successfully copied the file otherwise |
| 2062 | return main.FALSE |
| 2063 | |
| 2064 | </pre> |
| 2065 | <dl class="fields"> |
| 2066 | </dl> |
| 2067 | </td></tr></table> |
| 2068 | </div> |
| 2069 | <br /> |
| 2070 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 2071 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 2072 | bgcolor="#a0c0ff" cellspacing="0"> |
| 2073 | <tr valign="middle"> |
| 2074 | <!-- Home link --> |
| 2075 | <th> <a |
| 2076 | href="TestON-module.html">Home</a> </th> |
| 2077 | |
| 2078 | <!-- Tree link --> |
| 2079 | <th> <a |
| 2080 | href="module-tree.html">Trees</a> </th> |
| 2081 | |
| 2082 | <!-- Index link --> |
| 2083 | <th> <a |
| 2084 | href="identifier-index.html">Indices</a> </th> |
| 2085 | |
| 2086 | <!-- Help link --> |
| 2087 | <th> <a |
| 2088 | href="help.html">Help</a> </th> |
| 2089 | |
| 2090 | <!-- Project homepage --> |
| 2091 | <th class="navbar" align="right" width="100%"> |
| 2092 | <table border="0" cellpadding="0" cellspacing="0"> |
| 2093 | <tr><th class="navbar" align="center" |
| 2094 | >TestON</th> |
| 2095 | </tr></table></th> |
| 2096 | </tr> |
| 2097 | </table> |
| 2098 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 2099 | <tr> |
| 2100 | <td align="left" class="footer"> |
| 2101 | Generated by Epydoc 3.0.1 on Mon Aug 10 11:12:35 2015 |
| 2102 | </td> |
| 2103 | <td align="right" class="footer"> |
| 2104 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 2105 | >http://epydoc.sourceforge.net</a> |
| 2106 | </td> |
| 2107 | </tr> |
| 2108 | </table> |
| 2109 | |
| 2110 | <script type="text/javascript"> |
| 2111 | <!-- |
| 2112 | // Private objects are initially displayed (because if |
| 2113 | // javascript is turned off then we want them to be |
| 2114 | // visible); but by default, we want to hide them. So hide |
| 2115 | // them unless we have a cookie that says to show them. |
| 2116 | checkCookie(); |
| 2117 | // --> |
| 2118 | </script> |
| 2119 | </body> |
| 2120 | </html> |