Get loc_test_mode parm for improved output on pissuing.
With this value set correctly, the user will see this:
(test_mode) Issuing:
Instead of just this:
Issuing:
when running a command in test_mode.
Change-Id: Ieb3d67cea5aa384d3b657e8f70a89fb2b6aa36c8
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/state.py b/lib/state.py
index 1e117b9..d8f85d3 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -507,8 +507,12 @@
cmd_buf = ["BMC Execute Command",
re.sub('\\$', '\\$', remote_cmd_buf), 'quiet=1']
if not quiet:
- grp.rpissuing_keyword(cmd_buf)
- grp.rpissuing(remote_cmd_buf)
+ # Get loc_test_mode parm for improved output on pissuing.
+ # See sprint_issuing in gen_print.py for details.
+ loc_test_mode = int(gp.get_var_value(var_name="test_mode",
+ default=0))
+ grp.rpissuing_keyword(cmd_buf, loc_test_mode)
+ gp.pissuing(remote_cmd_buf, loc_test_mode)
try:
stdout, stderr, rc =\
BuiltIn().wait_until_keyword_succeeds("10 sec", "0 sec",