Automation of Sanity scenarios
Change-Id: I73b585c292aa53fcb64c1778b2264652ba619501
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/utils.py b/lib/utils.py
index 2443bdd..0049cca 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -360,3 +360,21 @@
out_buf, stderr, rc = bsu.os_execute_command('cat /etc/os-release')
return vf.key_value_outbuf_to_dict(out_buf, delim="=", strip='"')
+
+
+def pdbg(option_string, **bsu_options):
+ r"""
+ Run pdbg on the BMC with the caller's option string and return the output.
+
+ Description of argument(s):
+ option_string A string of options which are to be processed by the pdbg command.
+ bsu_options Options to be passed directly to bmc_execute_command. See its prolog for
+ details.
+ """
+
+ # Default print_out to 1.
+ if 'print_out' not in bsu_options:
+ bsu_options['print_out'] = 1
+
+ stdout, stderr, rc = bsu.bmc_execute_command('pdbg ' + option_string, **bsu_options)
+ return stdout