Revert "Add retries to robot command."
This reverts commit ae56bee659967a826397bdea9a37c83ec0fa7070.
Reason for revert: Failed in boot plugin run
Change-Id: I2de4926fe3049b0f1491d17ea4a28c26c50b2a9e
diff --git a/bin/plug_ins/Auto_reboot/cp_master b/bin/plug_ins/Auto_reboot/cp_master
index 3ad0742..8dd9e0e 100755
--- a/bin/plug_ins/Auto_reboot/cp_master
+++ b/bin/plug_ins/Auto_reboot/cp_master
@@ -6,7 +6,6 @@
import os
import sys
-import time
save_dir_path = sys.path.pop(0)
@@ -35,6 +34,7 @@
AUTO_REBOOT_DISABLE = "1"
+
def validate_parms():
r"""
@@ -67,14 +67,6 @@
lib_file_path = init_robot_file_path("lib/utils.robot")
- REDFISH_SUPPORT_TRANS_STATE = int(os.environ.get('REDFISH_SUPPORT_TRANS_STATE', 0))
- if not REDFISH_SUPPORT_TRANS_STATE:
- try:
- from robot.libraries.BuiltIn import BuiltIn
- REDFISH_SUPPORT_TRANS_STATE = int(BuiltIn().get_variable_value("${REDFISH_SUPPORT_TRANS_STATE}", default=0))
- except:
- pass
-
enable_auto_reboot = 1 - AUTO_REBOOT_DISABLE
print_var(enable_auto_reboot)
keyword_string = "Set Auto Reboot Setting ${%i}" % enable_auto_reboot
@@ -84,14 +76,9 @@
REDFISH_SUPPORT_TRANS_STATE, keyword_string, lib_file_path, quiet,
test_mode, debug, outputdir, output, log, report)
- retry_count = 3
- while not robot_cmd_fnc(cmd_buf):
- retry_count -= 1
- if retry_count == 0:
- print_error_report("Robot command execution failed.")
- exit(1)
- time.sleep(30)
- return
+ if not robot_cmd_fnc(cmd_buf):
+ print_error_report("Robot command execution failed.")
+ exit(1)
main()