Skip to content

Commit 7d71698

Browse files
authored
Merge pull request #692 from nasastry/vios_doc
Add VIOS package to doc
2 parents ab398cb + 602dae3 commit 7d71698

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

common/OpTestVIOS.py

+21
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
# IBM_PROLOG_END_TAG
2222
#
2323

24+
# @package OpTestVIOS
25+
# This class contains common functions for Virtual IO Server(VIOS)
26+
2427
import os
2528
import re
2629
import time
@@ -31,6 +34,9 @@
3134
log = OpTestLogger.optest_logger_glob.get_logger(__name__)
3235

3336
class OpTestVIOS():
37+
'''
38+
Utility and functions of Virtual I/O Server(VIOS) object
39+
'''
3440

3541

3642
def __init__(self, vios_name, vios_ip, vios_username, vios_password, conf=None):
@@ -45,6 +51,15 @@ def set_system(self, system):
4551
self.ssh.set_system(system)
4652

4753
def gather_logs(self, list_of_commands=[], output_dir=None):
54+
'''
55+
Gather logs - this function gathers default information like version,
56+
ioslevel, errlog, snap and custom commands given through parameter
57+
'list of commands'
58+
59+
:param list_of_commands: list, of commands for which output to be logged
60+
:output_dir: string, to store the gatherd logs
61+
:returns: True on success, Command Failed exception on failed
62+
'''
4863
if not output_dir:
4964
output_dir = "Vios_Logs_%s" % (time.asctime(time.localtime())).replace(" ", "_")
5065
output_dir = os.path.join(self.conf.host().results_dir, output_dir, self.name)
@@ -69,4 +84,10 @@ def gather_logs(self, list_of_commands=[], output_dir=None):
6984
raise cmd_failed
7085

7186
def run_command(self, cmd, timeout=60):
87+
'''
88+
Wrapper for running ssh.run_command
89+
90+
:param cmd: string, command to run
91+
:param timeout: number, number of seconds for timeout
92+
'''
7293
return self.ssh.run_command(cmd, timeout)

doc/programming.rst

+7
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ OpTestQemu
9797
:members:
9898
:undoc-members:
9999

100+
OpTestVIOS
101+
----------
102+
103+
.. automodule:: common.OpTestVIOS
104+
:members:
105+
:undoc-members:
106+
100107
Firmware Flashing
101108
=================
102109

0 commit comments

Comments
 (0)