Remove hashtag lines from all .py files.
Change-Id: Ib2b52f6ff71c8f553e0cfb1936c8e0917e70c619
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/bin/process_plug_in_packages.py b/bin/process_plug_in_packages.py
index 9b6e68f..c45f559 100755
--- a/bin/process_plug_in_packages.py
+++ b/bin/process_plug_in_packages.py
@@ -27,7 +27,6 @@
# I use this variable in calls to print_var.
hex = 1
-###############################################################################
# Create parser object to process command line parameters and args.
# Create parser object.
@@ -124,10 +123,8 @@
# names of stock parm options we want. These stock parms are pre-defined by
# gen_get_options.
stock_list = [("test_mode", 0), ("quiet", 1), ("debug", 0)]
-###############################################################################
-###############################################################################
def exit_function(signal_number=0,
frame=None):
@@ -141,10 +138,7 @@
qprint_pgm_footer()
-###############################################################################
-
-###############################################################################
def signal_handler(signal_number, frame):
r"""
@@ -162,10 +156,7 @@
# when we received the signal.
exit(0)
-###############################################################################
-
-###############################################################################
def validate_parms():
r"""
@@ -187,10 +178,7 @@
return True
-###############################################################################
-
-###############################################################################
def run_pgm(plug_in_dir_path,
call_point,
allow_shell_rc):
@@ -288,10 +276,7 @@
return rc, shell_rc, failed_plug_in_name
-###############################################################################
-
-###############################################################################
def main():
r"""
@@ -365,13 +350,8 @@
print_error("At least one plug-in failed.\n")
return False
-###############################################################################
-
-###############################################################################
# Main
if not main():
exit(1)
-
-###############################################################################
diff --git a/bin/validate_plug_ins.py b/bin/validate_plug_ins.py
index d0e541d..15d02a1 100755
--- a/bin/validate_plug_ins.py
+++ b/bin/validate_plug_ins.py
@@ -22,7 +22,6 @@
sys.path.insert(0, save_path_0)
-###############################################################################
# Create parser object to process command line parameters and args.
# Create parser object.
@@ -32,32 +31,26 @@
" It will also print a list of the absolute plug-in" +
" directory paths for use by the calling program.",
formatter_class=argparse.RawTextHelpFormatter,
- prefix_chars='-+'
- )
+ prefix_chars='-+')
# Create arguments.
parser.add_argument(
'plug_in_dir_paths',
nargs='?',
default="",
- help=plug_in_dir_paths_help_text + default_string
- )
+ help=plug_in_dir_paths_help_text + default_string)
parser.add_argument(
'--mch_class',
default="obmc",
- help=mch_class_help_text + default_string
- )
+ help=mch_class_help_text + default_string)
# The stock_list will be passed to gen_get_options. We populate it with the
# names of stock parm options we want. These stock parms are pre-defined by
# gen_get_options.
stock_list = [("test_mode", 0), ("quiet", 1), ("debug", 0)]
-###############################################################################
-
-###############################################################################
def exit_function(signal_number=0,
frame=None):
@@ -71,10 +64,7 @@
qprint_pgm_footer()
-###############################################################################
-
-###############################################################################
def signal_handler(signal_number, frame):
r"""
@@ -92,10 +82,7 @@
# when we received the signal.
exit(0)
-###############################################################################
-
-###############################################################################
def validate_parms():
r"""
@@ -106,10 +93,7 @@
return True
-###############################################################################
-
-###############################################################################
def main():
r"""
@@ -145,13 +129,8 @@
return True
-###############################################################################
-
-###############################################################################
# Main
if not main():
exit(1)
-
-###############################################################################
diff --git a/extended/run_keyword.py b/extended/run_keyword.py
index 770c634..8aadf63 100644
--- a/extended/run_keyword.py
+++ b/extended/run_keyword.py
@@ -12,7 +12,6 @@
import re
-###############################################################################
def setup():
r"""
@@ -25,10 +24,7 @@
grp.rqprint_pgm_header()
-###############################################################################
-
-###############################################################################
def validate_parms():
r"""
@@ -39,10 +35,7 @@
return True
-###############################################################################
-
-###############################################################################
def program_teardown():
r"""
@@ -51,10 +44,7 @@
grp.rqprint_pgm_footer()
-###############################################################################
-
-###############################################################################
def my_run_keywords(lib_file_path,
keyword_string,
quiet=0,
@@ -141,10 +131,7 @@
if output is not None:
grp.rprint(output)
-###############################################################################
-
-###############################################################################
def main_py():
r"""
@@ -160,4 +147,3 @@
my_run_keywords(lib_file_path, keyword_string, quiet, test_mode)
-###############################################################################
diff --git a/lib/bmc_ssh_utils.py b/lib/bmc_ssh_utils.py
index 5db5cbd..16a6593 100755
--- a/lib/bmc_ssh_utils.py
+++ b/lib/bmc_ssh_utils.py
@@ -14,7 +14,6 @@
from robot.libraries.BuiltIn import BuiltIn
-###############################################################################
def bmc_execute_command(cmd_buf,
print_out=0,
print_err=0,
@@ -74,10 +73,7 @@
print_out, print_err, ignore_err, fork,
quiet, test_mode)
-###############################################################################
-
-###############################################################################
def os_execute_command(cmd_buf,
print_out=0,
print_err=0,
@@ -135,10 +131,7 @@
print_out, print_err, ignore_err, fork,
quiet, test_mode)
-###############################################################################
-
-###############################################################################
def xcat_execute_command(cmd_buf,
print_out=0,
print_err=0,
@@ -201,5 +194,3 @@
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
quiet, test_mode)
-
-###############################################################################
diff --git a/lib/boot_data.py b/lib/boot_data.py
index 4bc4229..28dda0e 100755
--- a/lib/boot_data.py
+++ b/lib/boot_data.py
@@ -29,7 +29,6 @@
code_base_dir_path = os.path.dirname(os.path.dirname(__file__)) + os.sep
-###############################################################################
def create_boot_table(file_path=None):
r"""
@@ -82,10 +81,7 @@
return enhanced_boot_table
-###############################################################################
-
-###############################################################################
def create_valid_boot_list(boot_table):
r"""
@@ -99,10 +95,7 @@
return list(boot_table.keys())
-###############################################################################
-
-###############################################################################
def read_boot_lists(dir_path="data/boot_lists/"):
r"""
@@ -150,10 +143,7 @@
return boot_lists
-###############################################################################
-
-###############################################################################
def valid_boot_list(boot_list,
valid_boot_types):
@@ -175,10 +165,7 @@
if error_message != "":
BuiltIn().fail(gp.sprint_error(error_message))
-###############################################################################
-
-###############################################################################
class boot_results:
r"""
@@ -314,10 +301,7 @@
grp.rprint(self.sprint_obj())
-###############################################################################
-
-###############################################################################
def create_boot_results_file_path(pgm_name,
openbmc_nickname,
master_pid):
@@ -344,10 +328,7 @@
return vf.create_file_path(file_name_dict, dir_path=dir_path,
file_suffix=":boot_results")
-###############################################################################
-
-###############################################################################
def cleanup_boot_results_file():
r"""
@@ -367,4 +348,3 @@
else:
gc.cmd_fnc("rm -f " + file_path)
-###############################################################################
diff --git a/lib/code_update_utils.py b/lib/code_update_utils.py
index f569410..27ffa34 100644
--- a/lib/code_update_utils.py
+++ b/lib/code_update_utils.py
@@ -19,7 +19,6 @@
import variables as var
from robot.libraries.BuiltIn import BuiltIn
-###############################################################################
def verify_no_duplicate_image_priorities(image_purpose):
r"""
@@ -44,10 +43,7 @@
+ gp.sprint_vars(image, taken_priorities[image_priority]))
taken_priorities[image_priority] = image
-###############################################################################
-
-###############################################################################
def get_non_running_bmc_software_object():
r"""
@@ -71,10 +67,7 @@
return image_name
BuiltIn().fail("Did not find any non-running BMC images.")
-###############################################################################
-
-###############################################################################
def delete_all_pnor_images():
r"""
@@ -91,10 +84,7 @@
keyword.run_key("Call Method " + image_name
+ " delete data={\"data\":[]}")
-###############################################################################
-
-###############################################################################
def wait_for_activation_state_change(version_id, initial_state):
r"""
@@ -133,10 +123,7 @@
return
return
-###############################################################################
-
-###############################################################################
def get_latest_file(dir_path):
r"""
@@ -154,10 +141,7 @@
+ "; stat -c '%Y %n' * | sort -k1,1nr | head -n 1", ignore=1)
return ret_values.split(" ")[-1]
-###############################################################################
-
-###############################################################################
def get_version_tar(tar_file_path):
r"""
@@ -180,10 +164,7 @@
tar.close()
return version
-###############################################################################
-
-###############################################################################
def get_image_version(file_path):
r"""
@@ -199,10 +180,7 @@
+ file_path + " | grep \"version=\"", ignore=1)
return (ret_values.split("\n")[0]).split("=")[-1]
-###############################################################################
-
-###############################################################################
def get_image_purpose(file_path):
r"""
@@ -218,10 +196,7 @@
+ file_path + " | grep \"purpose=\"", ignore=1)
return ret_values.split("=")[-1]
-###############################################################################
-
-###############################################################################
def get_image_path(image_version):
r"""
@@ -250,10 +225,7 @@
time.sleep(10)
retry += 1
-###############################################################################
-
-###############################################################################
def verify_image_upload(image_version,
timeout=3):
@@ -295,10 +267,7 @@
gp.print_var(image_purpose)
return False, None
-###############################################################################
-
-###############################################################################
def verify_image_not_in_bmc_uploads_dir(image_version, timeout=3):
r"""
@@ -324,4 +293,3 @@
BuiltIn().fail('Found invalid BMC Image: ' + image_dir)
time.sleep(30)
-###############################################################################
diff --git a/lib/gen_arg.py b/lib/gen_arg.py
index 36fcba1..2981668 100755
--- a/lib/gen_arg.py
+++ b/lib/gen_arg.py
@@ -16,7 +16,6 @@
default_string = ' The default value is "%(default)s".'
-###############################################################################
def gen_get_options(parser,
stock_list=[]):
@@ -154,10 +153,7 @@
return True
-###############################################################################
-
-###############################################################################
def set_pgm_arg(var_value,
var_name=None):
@@ -185,11 +181,8 @@
elif var_name == "test_mode":
__builtin__.test_mode = var_value
-###############################################################################
-
# Put this in gen_opt.py or gen_parm.py or gen_arg.py.
-###############################################################################
def sprint_args(arg_obj,
indent=0):
@@ -214,10 +207,7 @@
return buffer
-###############################################################################
-
-###############################################################################
def gen_post_validation(exit_function=None,
signal_handler=None):
@@ -242,5 +232,3 @@
if signal_handler is not None:
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
-
-###############################################################################
diff --git a/lib/gen_cmd.py b/lib/gen_cmd.py
index 57cd65b..009c1c6 100644
--- a/lib/gen_cmd.py
+++ b/lib/gen_cmd.py
@@ -8,19 +8,16 @@
import subprocess
import collections
-robot_env = 1
-try:
- from robot.libraries.BuiltIn import BuiltIn
-except ImportError:
- robot_env = 0
import gen_print as gp
import gen_valid as gv
import gen_misc as gm
+
+robot_env = gp.robot_env
+
if robot_env:
import gen_robot_print as grp
-###############################################################################
def cmd_fnc(cmd_buf,
quiet=None,
test_mode=None,
@@ -126,10 +123,7 @@
else:
return shell_rc, out_buf
-###############################################################################
-
-###############################################################################
def cmd_fnc_u(cmd_buf,
quiet=None,
debug=None,
@@ -147,10 +141,7 @@
print_output=print_output, show_err=show_err,
return_stderr=return_stderr)
-###############################################################################
-
-###############################################################################
def parse_command_string(command_string):
r"""
@@ -250,5 +241,3 @@
ix += 1
return command_string_dict
-
-###############################################################################
diff --git a/lib/gen_plug_in.py b/lib/gen_plug_in.py
index 1570faa..a01e251 100755
--- a/lib/gen_plug_in.py
+++ b/lib/gen_plug_in.py
@@ -30,7 +30,6 @@
PATH_LIST = gm.return_path_list()
-###############################################################################
def get_plug_in_base_paths():
r"""
@@ -52,13 +51,11 @@
return plug_in_base_path_list
-###############################################################################
# Define global plug_in_base_path_list and call get_plug_in_base_paths to set
# its value.
plug_in_base_path_list = get_plug_in_base_paths()
-###############################################################################
def find_plug_in_package(plug_in_name):
r"""
@@ -80,10 +77,7 @@
return ""
-###############################################################################
-
-###############################################################################
def validate_plug_in_package(plug_in_dir_path,
mch_class="obmc"):
@@ -135,10 +129,7 @@
return candidate_plug_in_dir_path
-###############################################################################
-
-###############################################################################
def return_integrated_plug_ins(mch_class="obmc"):
r"""
@@ -180,10 +171,7 @@
return integrated_plug_ins_list
-###############################################################################
-
-###############################################################################
def return_plug_in_packages_list(plug_in_dir_paths,
mch_class="obmc"):
@@ -218,5 +206,3 @@
for path in plug_in_packages_list]))
return plug_in_packages_list
-
-###############################################################################
diff --git a/lib/gen_robot_keyword.py b/lib/gen_robot_keyword.py
index f7d89ce..87d8ef1 100755
--- a/lib/gen_robot_keyword.py
+++ b/lib/gen_robot_keyword.py
@@ -8,7 +8,6 @@
from robot.libraries.BuiltIn import BuiltIn
-###############################################################################
def run_key(keyword_buf,
quiet=None,
test_mode=None,
@@ -83,10 +82,7 @@
return status, ret_values
-###############################################################################
-
-###############################################################################
def run_key_u(keyword_buf,
quiet=None,
ignore=0):
@@ -103,5 +99,3 @@
"""
return run_key(keyword_buf, test_mode=0, quiet=quiet, ignore=ignore)
-
-###############################################################################
diff --git a/lib/gen_robot_plug_in.py b/lib/gen_robot_plug_in.py
index 94a8b33..e9fb54d 100755
--- a/lib/gen_robot_plug_in.py
+++ b/lib/gen_robot_plug_in.py
@@ -18,7 +18,6 @@
import gen_cmd as gc
-###############################################################################
def rvalidate_plug_ins(plug_in_dir_paths,
quiet=1):
@@ -50,10 +49,7 @@
return plug_in_packages_list
-###############################################################################
-
-###############################################################################
def rprocess_plug_in_packages(plug_in_packages_list=None,
call_point="setup",
shell_rc="0x00000000",
@@ -229,5 +225,3 @@
rc = 1
return rc, shell_rc, failed_plug_in_name
-
-###############################################################################
diff --git a/lib/gen_robot_print.py b/lib/gen_robot_print.py
index 9aedfaa..7d4e7cb 100755
--- a/lib/gen_robot_print.py
+++ b/lib/gen_robot_print.py
@@ -26,7 +26,6 @@
gen_robot_print_debug = 0
-###############################################################################
def rprint(buffer="",
stream="STDOUT"):
@@ -43,10 +42,7 @@
BuiltIn().log_to_console(gp.replace_passwords(str(buffer)),
no_newline=True, stream=stream)
-###############################################################################
-
-###############################################################################
def rprintn(buffer="",
stream='STDOUT'):
@@ -62,10 +58,7 @@
BuiltIn().log_to_console(gp.replace_passwords(buffer), no_newline=False,
stream=stream)
-###############################################################################
-
-###############################################################################
def sprint_vars(*args):
r"""
@@ -124,10 +117,7 @@
return buffer
-###############################################################################
-
-###############################################################################
def sprint_pgm_header(indent=0):
r"""
@@ -142,10 +132,7 @@
# version directly.
return gp.sprint_pgm_header(indent, linefeed=1)
-###############################################################################
-
-###############################################################################
def sprint_error_report(error_text="\n"):
r"""
@@ -160,10 +147,7 @@
return gp.sprint_error_report(error_text)
-###############################################################################
-
-###############################################################################
def sprint_issuing_keyword(cmd_buf,
test_mode=0):
@@ -191,10 +175,7 @@
return buffer
-###############################################################################
-
-###############################################################################
def sprint_auto_vars(headers=0):
r"""
@@ -228,10 +209,7 @@
return buffer
-###############################################################################
-
-###############################################################################
# In the following section of code, we will dynamically create robot versions
# of print functions for each of the sprint functions defined in the
# gen_print.py module. So, for example, where we have an sprint_time()
@@ -349,5 +327,3 @@
rprintn()
rprintn(cmd_buf)
exec(cmd_buf)
-
-###############################################################################
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index ddabd04..1ae909a 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -18,7 +18,6 @@
sshlib = SSHLibrary()
-###############################################################################
def sprint_connection(connection,
indent=0):
@@ -50,10 +49,7 @@
return buffer
-###############################################################################
-
-###############################################################################
def sprint_connections(connections=None,
indent=0):
@@ -78,10 +74,7 @@
return buffer
-###############################################################################
-
-###############################################################################
def find_connection(open_connection_args={}):
r"""
@@ -109,10 +102,7 @@
return False
-###############################################################################
-
-###############################################################################
def login_ssh(login_args={},
max_login_attempts=5):
@@ -162,10 +152,7 @@
# exception will be raised again.
raise(login_exception)
-###############################################################################
-
-###############################################################################
def execute_ssh_command(cmd_buf,
open_connection_args={},
login_args={},
@@ -319,5 +306,3 @@
BuiltIn().should_be_equal(rc, 0, message)
return stdout, stderr, rc
-
-###############################################################################
diff --git a/lib/gen_robot_utils.py b/lib/gen_robot_utils.py
index 8f275b0..9342412 100644
--- a/lib/gen_robot_utils.py
+++ b/lib/gen_robot_utils.py
@@ -9,7 +9,6 @@
from robot.libraries.BuiltIn import BuiltIn
-###############################################################################
def my_import_resource(path):
r"""
@@ -75,4 +74,3 @@
BuiltIn().set_global_variable(global_var_name,
pre_var_dict[key])
-###############################################################################
diff --git a/lib/gen_robot_valid.py b/lib/gen_robot_valid.py
index 08597f9..97bfedc 100755
--- a/lib/gen_robot_valid.py
+++ b/lib/gen_robot_valid.py
@@ -11,7 +11,6 @@
from robot.api import logger
-###############################################################################
def rvalid_value(var_name,
invalid_values=[],
valid_values=[]):
@@ -85,10 +84,7 @@
error_message = grp.sprint_error_report(error_message)
BuiltIn().fail(error_message)
-###############################################################################
-
-###############################################################################
def rvalid_integer(var_name):
r"""
@@ -137,5 +133,3 @@
if not error_message == "":
error_message = grp.sprint_error_report(error_message)
BuiltIn().fail(error_message)
-
-###############################################################################
diff --git a/lib/gen_valid.py b/lib/gen_valid.py
index 72d94d4..ac45662 100755
--- a/lib/gen_valid.py
+++ b/lib/gen_valid.py
@@ -11,7 +11,6 @@
import gen_print as gp
-###############################################################################
def svalid_value(var_value,
invalid_values=[],
valid_values=[],
@@ -86,10 +85,7 @@
show_blanks)
return error_message
-###############################################################################
-
-###############################################################################
def valid_value(var_value,
invalid_values=[],
valid_values=[],
@@ -111,10 +107,7 @@
return False
return True
-###############################################################################
-
-###############################################################################
def svalid_integer(var_value,
var_name=""):
@@ -152,10 +145,7 @@
return error_message
-###############################################################################
-
-###############################################################################
def valid_integer(var_value,
var_name=""):
@@ -174,10 +164,7 @@
return False
return True
-###############################################################################
-
-###############################################################################
def svalid_dir_path(var_value,
var_name=""):
@@ -206,10 +193,7 @@
return error_message
-###############################################################################
-
-###############################################################################
def valid_dir_path(var_value,
var_name=""):
@@ -229,10 +213,7 @@
return True
-###############################################################################
-
-###############################################################################
def svalid_file_path(var_value,
var_name=""):
@@ -261,10 +242,7 @@
return error_message
-###############################################################################
-
-###############################################################################
def valid_file_path(var_value,
var_name=""):
@@ -283,5 +261,3 @@
return False
return True
-
-###############################################################################
diff --git a/lib/ipmi_utils.py b/lib/ipmi_utils.py
index 2669ff8..16aa279 100644
--- a/lib/ipmi_utils.py
+++ b/lib/ipmi_utils.py
@@ -11,7 +11,6 @@
gru.my_import_resource("ipmi_client.robot")
-###############################################################################
def get_sol_info():
r"""
@@ -57,10 +56,7 @@
return sol_info
-###############################################################################
-
-###############################################################################
def set_sol_setting(setting_name, setting_value):
r"""
@@ -76,5 +72,4 @@
return status
-###############################################################################
diff --git a/lib/jobs_processing.py b/lib/jobs_processing.py
index 901cffb..915c64e 100644
--- a/lib/jobs_processing.py
+++ b/lib/jobs_processing.py
@@ -12,7 +12,6 @@
import gen_print as gp
-###############################################################################
def execute_keyword(keyword_name, return_dict):
r"""
Execute a robot keyword.
@@ -32,10 +31,7 @@
# Build PID:<status> dictionary.
return_dict[str(pid)] = str(status)
-###############################################################################
-
-###############################################################################
def execute_process(num_process, keyword_name):
r"""
Execute a robot keyword via multiprocessing process.
@@ -62,4 +58,3 @@
# Return function return codes.
return return_dict
-###############################################################################
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 792039a..35aa86b 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -69,7 +69,6 @@
main_func_parm_list = ['boot_stack', 'stack_mode', 'quiet']
-###############################################################################
def process_host(host,
host_var_name=""):
@@ -110,10 +109,7 @@
host + "')"
exec(cmd_buf)
-###############################################################################
-
-###############################################################################
def process_pgm_parms():
r"""
@@ -186,10 +182,7 @@
ffdc_summary_list_path = base_tool_dir_path + openbmc_nickname +\
"/FFDC_SUMMARY_FILE_LIST"
-###############################################################################
-
-###############################################################################
def initial_plug_in_setup():
r"""
@@ -241,10 +234,7 @@
if not os.path.exists(ffdc_list_dir_path):
os.makedirs(ffdc_list_dir_path)
-###############################################################################
-
-###############################################################################
def plug_in_setup():
r"""
@@ -295,10 +285,7 @@
BuiltIn().set_log_level(LOG_LEVEL)
-###############################################################################
-
-###############################################################################
def pre_boot_plug_in_setup():
# Clear the ffdc_list_file_path file. Plug-ins may now write to it.
@@ -327,10 +314,7 @@
ffdc_prefix = openbmc_nickname + "." + time_string
-###############################################################################
-
-###############################################################################
def setup():
r"""
@@ -395,10 +379,7 @@
gp.dprint_var(boot_table, 1)
gp.dprint_var(boot_lists)
-###############################################################################
-
-###############################################################################
def validate_parms():
r"""
@@ -458,10 +439,7 @@
return
-###############################################################################
-
-###############################################################################
def my_get_state():
r"""
@@ -479,10 +457,7 @@
state = st.get_state(req_states=req_states, quiet=quiet)
gp.qprint_var(state)
-###############################################################################
-
-###############################################################################
def valid_state():
r"""
@@ -495,10 +470,7 @@
" is illegal.\n" + gp.sprint_var(state)
BuiltIn().fail(gp.sprint_error(error_message))
-###############################################################################
-
-###############################################################################
def select_boot():
r"""
@@ -603,10 +575,7 @@
return boot
-###############################################################################
-
-###############################################################################
def print_last_boots():
r"""
@@ -621,10 +590,7 @@
grp.rqprint(boot_entry)
gp.qprint_dashes(0, 90)
-###############################################################################
-
-###############################################################################
def print_defect_report(ffdc_file_list):
r"""
@@ -713,10 +679,7 @@
gp.qprint_dashes(indent, width, linefeed, char)
-###############################################################################
-
-###############################################################################
def my_ffdc():
r"""
@@ -741,10 +704,7 @@
print_defect_report(ffdc_file_list)
-###############################################################################
-
-###############################################################################
def print_test_start_message(boot_keyword):
r"""
@@ -771,10 +731,7 @@
if len(last_ten) > 10:
del last_ten[0]
-###############################################################################
-
-###############################################################################
def run_boot(boot):
r"""
@@ -843,10 +800,7 @@
gp.sprint_var(rc, 1)
BuiltIn().fail(gp.sprint_error(error_message))
-###############################################################################
-
-###############################################################################
def test_loop_body():
r"""
@@ -931,10 +885,7 @@
return True
-###############################################################################
-
-###############################################################################
def obmc_boot_test_teardown():
r"""
@@ -971,10 +922,7 @@
gp.dprintn(save_stack.sprint_obj())
-###############################################################################
-
-###############################################################################
def test_teardown():
r"""
@@ -988,10 +936,7 @@
grp.rqprint_pgm_footer()
-###############################################################################
-
-###############################################################################
def obmc_boot_test_py(loc_boot_stack=None,
loc_stack_mode=None,
loc_quiet=None):
@@ -1064,4 +1009,3 @@
gp.sprint_var(boot_fail_threshold)
BuiltIn().fail(gp.sprint_error(error_message))
-###############################################################################
diff --git a/lib/openbmc_ffdc.py b/lib/openbmc_ffdc.py
index 511ac6b..d3a1da3 100644
--- a/lib/openbmc_ffdc.py
+++ b/lib/openbmc_ffdc.py
@@ -15,7 +15,6 @@
from robot.libraries.BuiltIn import BuiltIn
-###############################################################################
def ffdc(ffdc_dir_path=None,
ffdc_prefix=None,
ffdc_function_list=""):
@@ -93,10 +92,7 @@
return ffdc_file_list
-###############################################################################
-
-###############################################################################
def set_ffdc_defaults(ffdc_dir_path=None,
ffdc_prefix=None):
@@ -170,4 +166,3 @@
return ffdc_dir_path, ffdc_prefix
-###############################################################################
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index 9f19a12..c260740 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -1,18 +1,13 @@
#!/usr/bin/python
r"""
-#############################################################
# @file openbmc_ffdc_list.py
-#
# @brief List for FFDC ( First failure data capture )
# commands and files to be collected as a part
# of the test case failure.
-#############################################################
"""
-
# -------------------
# FFDC default list
# -------------------
-
# -----------------------------------------------------------------
# Dict Name { Index string : { Key String : Command string} }
# -----------------------------------------------------------------
@@ -36,7 +31,6 @@
'BMC state': '/usr/sbin/obmcutil state',
},
}
-
# Add file name and correcponding command needed for BMC
FFDC_BMC_FILE = {
'BMC FILES':
@@ -52,7 +46,6 @@
'BMC_systemd': 'systemctl status --all',
},
}
-
# Add file name and correcponding command needed for all Linux distributions
FFDC_OS_ALL_DISTROS_FILE = {
'OS FILES':
@@ -70,7 +63,6 @@
'OS_lscfg': 'lscfg',
},
}
-
# Add file name and correcponding command needed for Ubuntu Linux
FFDC_OS_UBUNTU_FILE = {
'OS FILES':
@@ -83,7 +75,6 @@
'OS_info': 'uname -a; dpkg -s opal-prd; dpkg -s ipmitool',
},
}
-
# Add file name and correcponding command needed for RHEL Linux
FFDC_OS_RHEL_FILE = {
'OS FILES':
@@ -95,7 +86,6 @@
'OS_info': 'lsb_release -a; cat /etc/redhat-release; uname -a; rpm -qa',
},
}
-
# Add file name and correcponding command needed for RHEL Linux
FFDC_OS_IBM_POWERKVM_FILE = {
'OS FILES':
@@ -106,7 +96,6 @@
'OS_info': 'lsb_release -a; uname -a; rpm -qa',
},
}
-
OPENBMC_BASE = '/xyz/openbmc_project/'
OPENPOWER_BASE = '/org/open_power/'
ENUMERATE_SENSORS = OPENBMC_BASE + 'sensors/enumerate'
@@ -117,7 +106,6 @@
ENUMERATE_CONTROL = OPENBMC_BASE + 'control/enumerate'
ENUMERATE_STATE = OPENBMC_BASE + 'state/enumerate'
ENUMERATE_OCC = OPENPOWER_BASE + 'control/enumerate'
-
# Add file name and correcponding Get Request
FFDC_GET_REQUEST = {
'GET REQUESTS':
@@ -133,8 +121,6 @@
'OCC_state': ENUMERATE_OCC,
},
}
-
-
# Define your keywords in method/utils and call here
FFDC_METHOD_CALL = {
'BMC LOGS':
@@ -149,13 +135,9 @@
'Sys Inventory Files': 'System Inventory Files',
},
}
-
# -----------------------------------------------------------------
-
-
# base class for FFDC default list
class openbmc_ffdc_list():
-
def get_ffdc_bmc_cmd(self, i_type):
r"""
########################################################################
@@ -165,7 +147,6 @@
########################################################################
"""
return FFDC_BMC_CMD[i_type].items()
-
def get_ffdc_bmc_file(self, i_type):
r"""
########################################################################
@@ -175,7 +156,6 @@
########################################################################
"""
return FFDC_BMC_FILE[i_type].items()
-
def get_ffdc_get_request(self, i_type):
r"""
########################################################################
@@ -185,7 +165,6 @@
########################################################################
"""
return FFDC_GET_REQUEST[i_type].items()
-
def get_ffdc_cmd_index(self):
r"""
########################################################################
@@ -194,7 +173,6 @@
########################################################################
"""
return FFDC_BMC_CMD.keys()
-
def get_ffdc_get_request_index(self):
r"""
########################################################################
@@ -203,7 +181,6 @@
########################################################################
"""
return FFDC_GET_REQUEST.keys()
-
def get_ffdc_file_index(self):
r"""
########################################################################
@@ -212,7 +189,6 @@
########################################################################
"""
return FFDC_BMC_FILE.keys()
-
def get_ffdc_method_index(self):
r"""
########################################################################
@@ -221,7 +197,6 @@
########################################################################
"""
return FFDC_METHOD_CALL.keys()
-
def get_ffdc_method_desc(self,
index):
r"""
@@ -231,7 +206,6 @@
########################################################################
"""
return FFDC_METHOD_CALL[index].keys()
-
def get_ffdc_method_call(self, i_type):
r"""
########################################################################
@@ -240,7 +214,6 @@
########################################################################
"""
return FFDC_METHOD_CALL[i_type].items()
-
def get_ffdc_os_all_distros_index(self):
r"""
########################################################################
@@ -249,7 +222,6 @@
########################################################################
"""
return FFDC_OS_ALL_DISTROS_FILE.keys()
-
def get_ffdc_os_all_distros_call(self, i_type):
r"""
########################################################################
@@ -258,7 +230,6 @@
########################################################################
"""
return FFDC_OS_ALL_DISTROS_FILE[i_type].items()
-
def get_ffdc_os_distro_index(self, distro):
r"""
########################################################################
@@ -268,7 +239,6 @@
"""
distro_file = "FFDC_OS_" + str(distro).upper() + "_FILE"
return eval(distro_file).keys()
-
def get_ffdc_os_distro_call(self, i_type, distro):
r"""
########################################################################
@@ -278,7 +248,6 @@
"""
distro_file = "FFDC_OS_" + str(distro).upper() + "_FILE"
return eval(distro_file)[i_type].items()
-
def get_strip_string(self, i_str):
r"""
########################################################################
@@ -288,7 +257,6 @@
########################################################################
"""
return ''.join(e for e in i_str if e.isalnum())
-
def get_esel_index(self, esel_list):
r"""
#######################################################################
diff --git a/lib/state.py b/lib/state.py
index 6b0d57f..4c36ef4 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -166,7 +166,6 @@
('host', '^$')])
-###############################################################################
def return_default_state():
r"""
@@ -177,13 +176,10 @@
return default_state
-###############################################################################
-
valid_state_constants = ['default', 'standby_match_state']
-###############################################################################
def return_state_constant(state_name='default'):
r"""
@@ -202,10 +198,7 @@
elif state_name == 'standby_match_state':
return standby_match_state
-###############################################################################
-
-###############################################################################
def anchor_state(state):
r"""
@@ -224,10 +217,7 @@
return anchored_state
-###############################################################################
-
-###############################################################################
def strip_anchor_state(state):
r"""
@@ -246,10 +236,7 @@
return stripped_state
-###############################################################################
-
-###############################################################################
def compare_states(state,
match_state,
match_type='and'):
@@ -295,10 +282,7 @@
return default_match
-###############################################################################
-
-###############################################################################
def get_os_state(os_host="",
os_username="",
os_password="",
@@ -434,10 +418,7 @@
return os_state
-###############################################################################
-
-###############################################################################
def get_state(openbmc_host="",
openbmc_username="",
openbmc_password="",
@@ -675,10 +656,7 @@
return state
-###############################################################################
-
-###############################################################################
def check_state(match_state,
invert=0,
print_string="",
@@ -755,10 +733,7 @@
return state
-###############################################################################
-
-###############################################################################
def wait_state(match_state=(),
wait_time="1 min",
interval="1 second",
@@ -859,10 +834,7 @@
return state
-###############################################################################
-
-###############################################################################
def wait_for_comm_cycle(start_boot_seconds,
quiet=None):
@@ -923,4 +895,3 @@
match_state = DotDict([('rest', '^1$')])
state = wait_state(match_state, wait_time="5 mins", interval="2 seconds")
-###############################################################################
diff --git a/lib/state_map.py b/lib/state_map.py
index 4ca309e..0b16d1d 100644
--- a/lib/state_map.py
+++ b/lib/state_map.py
@@ -95,7 +95,6 @@
}
-###############################################################################
class state_map():
def get_boot_state(self):
@@ -134,4 +133,3 @@
return True
else:
return False
-###############################################################################
diff --git a/lib/tally_sheet.py b/lib/tally_sheet.py
index e3280c3..d91d4c4 100755
--- a/lib/tally_sheet.py
+++ b/lib/tally_sheet.py
@@ -17,7 +17,6 @@
import gen_print as gp
-###############################################################################
class tally_sheet:
r"""
@@ -314,5 +313,3 @@
"""
sys.stdout.write(self.sprint_report())
-
-###############################################################################
diff --git a/lib/utilities.py b/lib/utilities.py
index 47586e5..4a7ea42 100755
--- a/lib/utilities.py
+++ b/lib/utilities.py
@@ -124,7 +124,6 @@
main()
-###############################################################################
def get_mtr_report(host=""):
r"""
@@ -196,10 +195,7 @@
# Return the full report as dictionary of dictionaries.
return report
-###############################################################################
-
-###############################################################################
def get_mtr_row(host=""):
r"""
@@ -230,10 +226,7 @@
return row
-###############################################################################
-
-###############################################################################
def list_to_set(fru_list=""):
r"""
Pack the list into a set tuple and return.
@@ -252,8 +245,6 @@
"""
return set(fru_list)
-###############################################################################
-
def min_list_value(value_list):
r"""
diff --git a/lib/utils.py b/lib/utils.py
index e741925..100d3af 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -17,7 +17,6 @@
import collections
-###############################################################################
def set_power_policy_method():
r"""
@@ -75,10 +74,6 @@
BuiltIn().set_global_variable("${power_policy_setup}", 1)
-###############################################################################
-
-
-###############################################################################
def translate_power_policy_value(policy):
r"""
@@ -106,10 +101,7 @@
quiet=1)
return ret_values
-###############################################################################
-
-###############################################################################
def get_bmc_date_time():
r"""
@@ -159,4 +151,3 @@
return result_time_dict
-###############################################################################
diff --git a/lib/utils_files.py b/lib/utils_files.py
index 9b1ed94..c77f6ed 100644
--- a/lib/utils_files.py
+++ b/lib/utils_files.py
@@ -16,7 +16,6 @@
robot_env = 0
-##########################################################################
def file_diff(file1_path,
file2_path,
diff_file_path,
@@ -131,4 +130,3 @@
else:
# We have at least one difference not in the skip_string.
return FILES_DO_NOT_MATCH
-###############################################################################
diff --git a/lib/var_stack.py b/lib/var_stack.py
index fd7d9bd..a375b3d 100644
--- a/lib/var_stack.py
+++ b/lib/var_stack.py
@@ -15,7 +15,6 @@
import gen_print as gp
-###############################################################################
class var_stack:
r"""
@@ -147,5 +146,3 @@
"""
return self.__stack_dict[var_name].pop()
-
-###############################################################################
diff --git a/syslib/utils_keywords.py b/syslib/utils_keywords.py
index 89b6894..f5e88b2 100644
--- a/syslib/utils_keywords.py
+++ b/syslib/utils_keywords.py
@@ -14,7 +14,6 @@
import os
-##########################################################################
def run_until_keyword_fails(retry,
retry_interval,
name,
@@ -57,10 +56,8 @@
BuiltIn().log(time.time())
return True
-###############################################################################
-###############################################################################
def htx_error_log_to_list(htx_error_log_output):
r"""
@@ -148,10 +145,8 @@
temp_error_list.append(str(line))
return error_list
-###############################################################################
-###############################################################################
def build_error_dict(htx_error_log_output):
r"""
@@ -224,4 +219,3 @@
return error_dict
-###############################################################################