Changed obmc_boot_test to improve usability by robot programs.

- Created new obmc_boot_test_resource.robot to define parms for
  obmc_boot_test.robot.  This is to make it possible for other robot
  programs to have access to obmc_boot_functionality.
- Created process_pgm_parms function to process program parameters.
  Previously, this was done in the program prolog.
- Added support for new stack_mode parameter.  When stack mode is
  "normal", the program behaves as it always has.  In "skip" mode,
  when each boot test is pulled from the stack, the boot test is
  skipped if the system is already in the desired end state for
  the boot test in question.  This feature allows a user to run
  a boot like "REST Power Off" only if the machine is not already
  powered off.
- Renamed main_py to obmc_boot_test so that other robot files can
  call it and have it be more self documenting.  Example:
  OBMC Boot Test \ REST Power Off
- Added a single alt_boot_stack parm to the new obmc_boot_test
  function.  Again, this allows the user to call and pass a boot_stack
  as shown in the prior example.
- Added support for new boot_fail_threshold parameter.  This allows
  a caller to indicate how many failures are acceptable.  If the
  number of boot failures exceeds boot_fail_threshold, then the
  OBMC Boot Test keyword will fail.
- Switched many gen_robot_print references to gen_print.
- Made many changes to use new run_key function.

Change-Id: I56aad535dac30ab516fdc530866c09dcbca277f3
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/extended/obmc_boot_test_resource.robot b/extended/obmc_boot_test_resource.robot
new file mode 100644
index 0000000..da59112
--- /dev/null
+++ b/extended/obmc_boot_test_resource.robot
@@ -0,0 +1,65 @@
+*** Settings ***
+Documentation  This file is resourced by obmc_boot_test.py to set initial
+...            variable values, etc.
+
+Resource  ../lib/openbmc_ffdc.robot
+Library   ../lib/state.py
+
+Library   ../lib/obmc_boot_test.py
+
+*** Variables ***
+# Initialize program parameters variables.
+# Create parm_list containing all of our program parameters.  This is used by
+# 'Rqprint Pgm Header'
+@{parm_list}                openbmc_nickname  openbmc_host  openbmc_username
+...  openbmc_password  os_host  os_username  os_password  pdu_host
+...  pdu_username  pdu_password  pdu_slot_no  openbmc_serial_host
+...  openbmc_serial_port  stack_mode  boot_stack  boot_list  max_num_tests
+...  plug_in_dir_paths  status_file_path  openbmc_model  boot_pass  boot_fail
+...  ffdc_dir_path_style  ffdc_check  state_change_timeout  power_on_timeout
+...  power_off_timeout  ffdc_only  boot_fail_threshold  test_mode  quiet
+...  debug
+
+# Initialize each program parameter.
+${openbmc_host}             ${EMPTY}
+${openbmc_nickname}         ${openbmc_host}
+${openbmc_username}         root
+${openbmc_password}         0penBmc
+${os_host}                  ${EMPTY}
+${os_username}              root
+${os_password}              P@ssw0rd
+${pdu_host}                 ${EMPTY}
+${pdu_username}             admin
+${pdu_password}             admin
+${pdu_slot_no}              ${EMPTY}
+${openbmc_serial_host}      ${EMPTY}
+${openbmc_serial_port}      ${EMPTY}
+${stack_mode}               normal
+${boot_stack}               ${EMPTY}
+${boot_list}                ${EMPTY}
+${max_num_tests}            0
+${plug_in_dir_paths}        ${EMPTY}
+${status_file_path}         ${EMPTY}
+${openbmc_model}            ${EMPTY}
+# The reason boot_pass and boot_fail are parameters is that it is possible to
+# be called by a program that has already done some tests.  This allows us to
+# keep the grand total.
+${boot_pass}                ${0}
+${boot_fail}                ${0}
+${ffdc_dir_path_style}      ${EMPTY}
+${ffdc_check}               ${EMPTY}
+${state_change_timeout}     3 mins
+${power_on_timeout}         14 mins
+${power_off_timeout}        2 mins
+${ffdc_only}                ${0}
+# If the number of boot failures, exceeds boot_fail_threshold, this program
+# returns non-zero.
+${boot_fail_threshold}      ${1000000}
+${test_mode}                0
+${quiet}                    0
+${debug}                    0
+
+# Flag variables.
+# test_really_running is needed by DB_Logging plug-in.
+${test_really_running}      ${1}
+