admin | bae64d8 | 2013-08-01 10:50:15 -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.clidriver.CLI</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 | <th class="navbar" width="100%"></th> |
| 34 | </tr> |
| 35 | </table> |
| 36 | <table width="100%" cellpadding="0" cellspacing="0"> |
| 37 | <tr valign="top"> |
| 38 | <td width="100%"> |
| 39 | <span class="breadcrumbs"> |
| 40 | <a href="TestON-module.html">Package TestON</a> :: |
| 41 | <a href="TestON.drivers-module.html">Package drivers</a> :: |
| 42 | <a href="TestON.drivers.common-module.html">Package common</a> :: |
| 43 | <a href="TestON.drivers.common.clidriver-module.html">Module clidriver</a> :: |
| 44 | Class CLI |
| 45 | </span> |
| 46 | </td> |
| 47 | <td> |
| 48 | <table cellpadding="0" cellspacing="0"> |
| 49 | <!-- hide/show private --> |
| 50 | <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| 51 | onclick="toggle_private();">hide private</a>]</span></td></tr> |
| 52 | <tr><td align="right"><span class="options" |
| 53 | >[<a href="frames.html" target="_top">frames</a |
| 54 | >] | <a href="TestON.drivers.common.clidriver.CLI-class.html" |
| 55 | target="_top">no frames</a>]</span></td></tr> |
| 56 | </table> |
| 57 | </td> |
| 58 | </tr> |
| 59 | </table> |
| 60 | <!-- ==================== CLASS DESCRIPTION ==================== --> |
| 61 | <h1 class="epydoc">Class CLI</h1><p class="nomargin-top"><span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI">source code</a></span></p> |
| 62 | <pre class="base-tree"> |
| 63 | object --+ |
| 64 | | |
| 65 | <a href="TestON.drivers.component.Component-class.html">component.Component</a> --+ |
| 66 | | |
| 67 | <strong class="uidshort">CLI</strong> |
| 68 | </pre> |
| 69 | |
| 70 | <hr /> |
| 71 | <p>This will define common functions for CLI included.</p> |
| 72 | |
| 73 | <!-- ==================== INSTANCE METHODS ==================== --> |
| 74 | <a name="section-InstanceMethods"></a> |
| 75 | <table class="summary" border="1" cellpadding="3" |
| 76 | cellspacing="0" width="100%" bgcolor="white"> |
| 77 | <tr bgcolor="#70b0f0" class="table-header"> |
| 78 | <td colspan="2" class="table-header"> |
| 79 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 80 | <tr valign="top"> |
| 81 | <td align="left"><span class="table-header">Instance Methods</span></td> |
| 82 | <td align="right" valign="top" |
| 83 | ><span class="options">[<a href="#section-InstanceMethods" |
| 84 | class="privatelink" onclick="toggle_private();" |
| 85 | >hide private</a>]</span></td> |
| 86 | </tr> |
| 87 | </table> |
| 88 | </td> |
| 89 | </tr> |
| 90 | <tr> |
| 91 | <td width="15%" align="right" valign="top" class="summary"> |
| 92 | <span class="summary-type"> </span> |
| 93 | </td><td class="summary"> |
| 94 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 95 | <tr> |
| 96 | <td><span class="summary-sig"><a href="TestON.drivers.common.clidriver.CLI-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| 97 | x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td> |
| 98 | <td align="right" valign="top"> |
| 99 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.__init__">source code</a></span> |
| 100 | |
| 101 | </td> |
| 102 | </tr> |
| 103 | </table> |
| 104 | |
| 105 | </td> |
| 106 | </tr> |
| 107 | <tr> |
| 108 | <td width="15%" align="right" valign="top" class="summary"> |
| 109 | <span class="summary-type"> </span> |
| 110 | </td><td class="summary"> |
| 111 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 112 | <tr> |
| 113 | <td><span class="summary-sig"><a href="TestON.drivers.common.clidriver.CLI-class.html#connect" class="summary-sig-name">connect</a>(<span class="summary-sig-arg">self</span>, |
| 114 | <span class="summary-sig-arg">**connectargs</span>)</span><br /> |
| 115 | Connection will establish to the remote host using ssh.</td> |
| 116 | <td align="right" valign="top"> |
| 117 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.connect">source code</a></span> |
| 118 | |
| 119 | </td> |
| 120 | </tr> |
| 121 | </table> |
| 122 | |
| 123 | </td> |
| 124 | </tr> |
| 125 | <tr> |
| 126 | <td width="15%" align="right" valign="top" class="summary"> |
| 127 | <span class="summary-type"> </span> |
| 128 | </td><td class="summary"> |
| 129 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 130 | <tr> |
| 131 | <td><span class="summary-sig"><a href="TestON.drivers.common.clidriver.CLI-class.html#disconnect" class="summary-sig-name">disconnect</a>(<span class="summary-sig-arg">self</span>)</span></td> |
| 132 | <td align="right" valign="top"> |
| 133 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.disconnect">source code</a></span> |
| 134 | |
| 135 | </td> |
| 136 | </tr> |
| 137 | </table> |
| 138 | |
| 139 | </td> |
| 140 | </tr> |
| 141 | <tr> |
| 142 | <td width="15%" align="right" valign="top" class="summary"> |
| 143 | <span class="summary-type"> </span> |
| 144 | </td><td class="summary"> |
| 145 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 146 | <tr> |
| 147 | <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>, |
| 148 | <span class="summary-sig-arg">**execparams</span>)</span><br /> |
| 149 | It facilitates the command line execution of a given command.</td> |
| 150 | <td align="right" valign="top"> |
| 151 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.execute">source code</a></span> |
| 152 | |
| 153 | </td> |
| 154 | </tr> |
| 155 | </table> |
| 156 | |
| 157 | </td> |
| 158 | </tr> |
| 159 | <tr> |
| 160 | <td width="15%" align="right" valign="top" class="summary"> |
| 161 | <span class="summary-type"> </span> |
| 162 | </td><td class="summary"> |
| 163 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 164 | <tr> |
| 165 | <td><span class="summary-sig"><a name="runAsSudoUser"></a><span class="summary-sig-name">runAsSudoUser</span>(<span class="summary-sig-arg">self</span>, |
| 166 | <span class="summary-sig-arg">handle</span>, |
| 167 | <span class="summary-sig-arg">pwd</span>, |
| 168 | <span class="summary-sig-arg">default</span>)</span></td> |
| 169 | <td align="right" valign="top"> |
| 170 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.runAsSudoUser">source code</a></span> |
| 171 | |
| 172 | </td> |
| 173 | </tr> |
| 174 | </table> |
| 175 | |
| 176 | </td> |
| 177 | </tr> |
| 178 | <tr> |
| 179 | <td width="15%" align="right" valign="top" class="summary"> |
| 180 | <span class="summary-type"> </span> |
| 181 | </td><td class="summary"> |
| 182 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 183 | <tr> |
| 184 | <td><span class="summary-sig"><a name="onfail"></a><span class="summary-sig-name">onfail</span>(<span class="summary-sig-arg">self</span>)</span></td> |
| 185 | <td align="right" valign="top"> |
| 186 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.onfail">source code</a></span> |
| 187 | |
| 188 | </td> |
| 189 | </tr> |
| 190 | </table> |
| 191 | |
| 192 | </td> |
| 193 | </tr> |
| 194 | <tr> |
| 195 | <td width="15%" align="right" valign="top" class="summary"> |
| 196 | <span class="summary-type"> </span> |
| 197 | </td><td class="summary"> |
| 198 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 199 | <tr> |
| 200 | <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>, |
| 201 | <span class="summary-sig-arg">user_name</span>, |
| 202 | <span class="summary-sig-arg">ip_address</span>, |
| 203 | <span class="summary-sig-arg">filepath</span>, |
| 204 | <span class="summary-sig-arg">pwd</span>, |
| 205 | <span class="summary-sig-arg">dst_path</span>)</span><br /> |
| 206 | Connection will establish to the remote host using ssh.</td> |
| 207 | <td align="right" valign="top"> |
| 208 | <span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.secureCopy">source code</a></span> |
| 209 | |
| 210 | </td> |
| 211 | </tr> |
| 212 | </table> |
| 213 | |
| 214 | </td> |
| 215 | </tr> |
| 216 | <tr> |
| 217 | <td colspan="2" class="summary"> |
| 218 | <p class="indent-wrapped-lines"><b>Inherited from <code><a href="TestON.drivers.component.Component-class.html">component.Component</a></code></b>: |
| 219 | <code><a href="TestON.drivers.component.Component-class.html#__getattr__">__getattr__</a></code>, |
| 220 | <code><a href="TestON.drivers.component.Component-class.html#cleanup">cleanup</a></code>, |
| 221 | <code><a href="TestON.drivers.component.Component-class.html#close_log_handles">close_log_handles</a></code>, |
| 222 | <code><a href="TestON.drivers.component.Component-class.html#config">config</a></code>, |
| 223 | <code><a href="TestON.drivers.component.Component-class.html#experimentRun">experimentRun</a></code>, |
| 224 | <code><a href="TestON.drivers.component.Component-class.html#get_version">get_version</a></code>, |
| 225 | <code><a href="TestON.drivers.component.Component-class.html#log">log</a></code> |
| 226 | </p> |
| 227 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 228 | <code>__delattr__</code>, |
| 229 | <code>__format__</code>, |
| 230 | <code>__getattribute__</code>, |
| 231 | <code>__hash__</code>, |
| 232 | <code>__new__</code>, |
| 233 | <code>__reduce__</code>, |
| 234 | <code>__reduce_ex__</code>, |
| 235 | <code>__repr__</code>, |
| 236 | <code>__setattr__</code>, |
| 237 | <code>__sizeof__</code>, |
| 238 | <code>__str__</code>, |
| 239 | <code>__subclasshook__</code> |
| 240 | </p> |
| 241 | </td> |
| 242 | </tr> |
| 243 | </table> |
| 244 | <!-- ==================== PROPERTIES ==================== --> |
| 245 | <a name="section-Properties"></a> |
| 246 | <table class="summary" border="1" cellpadding="3" |
| 247 | cellspacing="0" width="100%" bgcolor="white"> |
| 248 | <tr bgcolor="#70b0f0" class="table-header"> |
| 249 | <td colspan="2" class="table-header"> |
| 250 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 251 | <tr valign="top"> |
| 252 | <td align="left"><span class="table-header">Properties</span></td> |
| 253 | <td align="right" valign="top" |
| 254 | ><span class="options">[<a href="#section-Properties" |
| 255 | class="privatelink" onclick="toggle_private();" |
| 256 | >hide private</a>]</span></td> |
| 257 | </tr> |
| 258 | </table> |
| 259 | </td> |
| 260 | </tr> |
| 261 | <tr> |
| 262 | <td colspan="2" class="summary"> |
| 263 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 264 | <code>__class__</code> |
| 265 | </p> |
| 266 | </td> |
| 267 | </tr> |
| 268 | </table> |
| 269 | <!-- ==================== METHOD DETAILS ==================== --> |
| 270 | <a name="section-MethodDetails"></a> |
| 271 | <table class="details" border="1" cellpadding="3" |
| 272 | cellspacing="0" width="100%" bgcolor="white"> |
| 273 | <tr bgcolor="#70b0f0" class="table-header"> |
| 274 | <td colspan="2" class="table-header"> |
| 275 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 276 | <tr valign="top"> |
| 277 | <td align="left"><span class="table-header">Method Details</span></td> |
| 278 | <td align="right" valign="top" |
| 279 | ><span class="options">[<a href="#section-MethodDetails" |
| 280 | class="privatelink" onclick="toggle_private();" |
| 281 | >hide private</a>]</span></td> |
| 282 | </tr> |
| 283 | </table> |
| 284 | </td> |
| 285 | </tr> |
| 286 | </table> |
| 287 | <a name="__init__"></a> |
| 288 | <div> |
| 289 | <table class="details" border="1" cellpadding="3" |
| 290 | cellspacing="0" width="100%" bgcolor="white"> |
| 291 | <tr><td> |
| 292 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 293 | <tr valign="top"><td> |
| 294 | <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>)</span> |
| 295 | <br /><em class="fname">(Constructor)</em> |
| 296 | </h3> |
| 297 | </td><td align="right" valign="top" |
| 298 | ><span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.__init__">source code</a></span> |
| 299 | </td> |
| 300 | </tr></table> |
| 301 | |
| 302 | <p>x.__init__(...) initializes x; see x.__class__.__doc__ for |
| 303 | signature</p> |
| 304 | <dl class="fields"> |
| 305 | <dt>Overrides: |
| 306 | object.__init__ |
| 307 | <dd><em class="note">(inherited documentation)</em></dd> |
| 308 | </dt> |
| 309 | </dl> |
| 310 | </td></tr></table> |
| 311 | </div> |
| 312 | <a name="connect"></a> |
| 313 | <div> |
| 314 | <table class="details" border="1" cellpadding="3" |
| 315 | cellspacing="0" width="100%" bgcolor="white"> |
| 316 | <tr><td> |
| 317 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 318 | <tr valign="top"><td> |
| 319 | <h3 class="epydoc"><span class="sig"><span class="sig-name">connect</span>(<span class="sig-arg">self</span>, |
| 320 | <span class="sig-arg">**connectargs</span>)</span> |
| 321 | </h3> |
| 322 | </td><td align="right" valign="top" |
| 323 | ><span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.connect">source code</a></span> |
| 324 | </td> |
| 325 | </tr></table> |
| 326 | |
| 327 | <p>Connection will establish to the remote host using ssh. It will take |
| 328 | user_name ,ip_address and password as arguments<br> and will return |
| 329 | the handle.</p> |
| 330 | <dl class="fields"> |
| 331 | <dt>Overrides: |
| 332 | <a href="TestON.drivers.component.Component-class.html#connect">component.Component.connect</a> |
| 333 | </dt> |
| 334 | </dl> |
| 335 | </td></tr></table> |
| 336 | </div> |
| 337 | <a name="disconnect"></a> |
| 338 | <div> |
| 339 | <table class="details" border="1" cellpadding="3" |
| 340 | cellspacing="0" width="100%" bgcolor="white"> |
| 341 | <tr><td> |
| 342 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 343 | <tr valign="top"><td> |
| 344 | <h3 class="epydoc"><span class="sig"><span class="sig-name">disconnect</span>(<span class="sig-arg">self</span>)</span> |
| 345 | </h3> |
| 346 | </td><td align="right" valign="top" |
| 347 | ><span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.disconnect">source code</a></span> |
| 348 | </td> |
| 349 | </tr></table> |
| 350 | |
| 351 | |
| 352 | <dl class="fields"> |
| 353 | <dt>Overrides: |
| 354 | <a href="TestON.drivers.component.Component-class.html#disconnect">component.Component.disconnect</a> |
| 355 | </dt> |
| 356 | </dl> |
| 357 | </td></tr></table> |
| 358 | </div> |
| 359 | <a name="execute"></a> |
| 360 | <div> |
| 361 | <table class="details" border="1" cellpadding="3" |
| 362 | cellspacing="0" width="100%" bgcolor="white"> |
| 363 | <tr><td> |
| 364 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 365 | <tr valign="top"><td> |
| 366 | <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>, |
| 367 | <span class="sig-arg">**execparams</span>)</span> |
| 368 | </h3> |
| 369 | </td><td align="right" valign="top" |
| 370 | ><span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.execute">source code</a></span> |
| 371 | </td> |
| 372 | </tr></table> |
| 373 | |
| 374 | <p>It facilitates the command line execution of a given command. It has |
| 375 | arguments as : cmd => represents command to be executed, prompt => |
| 376 | represents expect command prompt or output, timeout => timeout for |
| 377 | command execution, more => to provide a key press if it is on.</p> |
| 378 | <p>It will return output of command exection.</p> |
| 379 | <dl class="fields"> |
| 380 | <dt>Overrides: |
| 381 | <a href="TestON.drivers.component.Component-class.html#execute">component.Component.execute</a> |
| 382 | </dt> |
| 383 | </dl> |
| 384 | </td></tr></table> |
| 385 | </div> |
| 386 | <a name="secureCopy"></a> |
| 387 | <div> |
| 388 | <table class="details" border="1" cellpadding="3" |
| 389 | cellspacing="0" width="100%" bgcolor="white"> |
| 390 | <tr><td> |
| 391 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 392 | <tr valign="top"><td> |
| 393 | <h3 class="epydoc"><span class="sig"><span class="sig-name">secureCopy</span>(<span class="sig-arg">self</span>, |
| 394 | <span class="sig-arg">user_name</span>, |
| 395 | <span class="sig-arg">ip_address</span>, |
| 396 | <span class="sig-arg">filepath</span>, |
| 397 | <span class="sig-arg">pwd</span>, |
| 398 | <span class="sig-arg">dst_path</span>)</span> |
| 399 | </h3> |
| 400 | </td><td align="right" valign="top" |
| 401 | ><span class="codelink"><a href="TestON.drivers.common.clidriver-pysrc.html#CLI.secureCopy">source code</a></span> |
| 402 | </td> |
| 403 | </tr></table> |
| 404 | |
| 405 | <p>Connection will establish to the remote host using ssh. It will take |
| 406 | user_name ,ip_address and password as arguments<br> and will return |
| 407 | the handle.</p> |
| 408 | <dl class="fields"> |
| 409 | </dl> |
| 410 | </td></tr></table> |
| 411 | </div> |
| 412 | <br /> |
| 413 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 414 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 415 | bgcolor="#a0c0ff" cellspacing="0"> |
| 416 | <tr valign="middle"> |
| 417 | <!-- Home link --> |
| 418 | <th> <a |
| 419 | href="TestON-module.html">Home</a> </th> |
| 420 | |
| 421 | <!-- Tree link --> |
| 422 | <th> <a |
| 423 | href="module-tree.html">Trees</a> </th> |
| 424 | |
| 425 | <!-- Index link --> |
| 426 | <th> <a |
| 427 | href="identifier-index.html">Indices</a> </th> |
| 428 | |
| 429 | <!-- Help link --> |
| 430 | <th> <a |
| 431 | href="help.html">Help</a> </th> |
| 432 | |
| 433 | <th class="navbar" width="100%"></th> |
| 434 | </tr> |
| 435 | </table> |
| 436 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 437 | <tr> |
| 438 | <td align="left" class="footer"> |
| 439 | Generated by Epydoc 3.0.1 on Mon Mar 11 12:56:26 2013 |
| 440 | </td> |
| 441 | <td align="right" class="footer"> |
| 442 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 443 | >http://epydoc.sourceforge.net</a> |
| 444 | </td> |
| 445 | </tr> |
| 446 | </table> |
| 447 | |
| 448 | <script type="text/javascript"> |
| 449 | <!-- |
| 450 | // Private objects are initially displayed (because if |
| 451 | // javascript is turned off then we want them to be |
| 452 | // visible); but by default, we want to hide them. So hide |
| 453 | // them unless we have a cookie that says to show them. |
| 454 | checkCookie(); |
| 455 | // --> |
| 456 | </script> |
| 457 | </body> |
| 458 | </html> |