IPMI SOL log file path default

Changes:
   - Default the SOL in user execution directory logs/
   - Update Power on and off to use IPMI methods

This changes is to avoid leaving files under /tmp/ which will
eventually flush on the reboot but user using server running
the test hardly reboot the system. The existing scheme works
ok if running on local or docker instances but still not a
good idea to dump onto /tmp/.

Resolves  openbmc/openbmc-test-automation#2132

Change-Id: Ia699f7faf0df1badc5fcd37b638dc0008ae2bc5f
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_sol.robot b/ipmi/test_ipmi_sol.robot
index 199063b..fbb51d0 100644
--- a/ipmi/test_ipmi_sol.robot
+++ b/ipmi/test_ipmi_sol.robot
@@ -127,7 +127,7 @@
     [Documentation]  Verify SOL during boot.
     [Tags]  Verify_SOL_During_Boot
 
-    Redfish Hard Power Off  stack_mode=skip
+    IPMI Power Off  stack_mode=skip
     Activate SOL Via IPMI
     Initiate Host Boot Via External IPMI  wait=${0}
 
@@ -137,7 +137,7 @@
     Wait Until Keyword Succeeds  3 mins  15 secs
     ...  Check IPMI SOL Output Content  ISTEP
 
-    Redfish Hard Power Off
+    IPMI Power Off
 
 
 Verify Deactivate Non Existing SOL
@@ -200,11 +200,11 @@
 
 Check IPMI SOL Output Content
     [Documentation]  Check if SOL has given content.
-    [Arguments]  ${data}  ${file_path}=/tmp/sol_${OPENBMC_HOST}
+    [Arguments]  ${data}  ${file_path}=${IPMI_SOL_LOG_FILE}
     # Description of argument(s):
     # data       Content which need to be checked(e.g. Petitboot, ISTEP).
     # file_path  The file path on the local machine to check SOL content.
-    #            By default it check SOL content from /tmp/sol_<BMC_IP>.
+    #            By default it check SOL content from log/sol_<BMC_IP>.
 
     ${output}=  OperatingSystem.Get File  ${file_path}  encoding_errors=ignore
     Should Contain  ${output}  ${data}  case_insensitive=True
@@ -249,7 +249,7 @@
 
     Should Be Equal  '${setting_value}'  '${expected_value}'
 
-    Redfish Hard Power Off  stack_mode=skip
+    IPMI Power Off  stack_mode=skip
 
     Initiate Host Boot Via External IPMI  wait=${0}
 
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index 9afe56e..282a3bb 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -187,13 +187,13 @@
 
 Activate SOL Via IPMI
     [Documentation]  Start SOL using IPMI and route output to a file.
-    [Arguments]  ${file_path}=/tmp/sol_${OPENBMC_HOST}
+    [Arguments]  ${file_path}=${IPMI_SOL_LOG_FILE}
 
     # Description of argument(s):
     # file_path                     The file path on the local machine (vs.
     #                               OBMC) to collect SOL output. By default
     #                               SOL output is collected at
-    #                               /tmp/sol_<BMC_IP> else user input location.
+    #                               logs/sol_<BMC_IP> else user input location.
 
     ${ipmi_cmd}=  Create IPMI Ext Command String  sol activate usesolkeepalive
     Qprint Issuing  ${ipmi_cmd}
@@ -203,13 +203,13 @@
 
 Deactivate SOL Via IPMI
     [Documentation]  Stop SOL using IPMI and return SOL output.
-    [Arguments]  ${file_path}=/tmp/sol_${OPENBMC_HOST}
+    [Arguments]  ${file_path}=${IPMI_SOL_LOG_FILE}
 
     # Description of argument(s):
     # file_path                     The file path on the local machine to copy
     #                               SOL output collected by above "Activate
     #                               SOL Via IPMI" keyword.  By default it
-    #                               copies log from /tmp/sol_<BMC_IP>.
+    #                               copies log from logs/sol_<BMC_IP>.
 
     ${ipmi_cmd}=  Create IPMI Ext Command String  sol deactivate
     Qprint Issuing  ${ipmi_cmd}
diff --git a/lib/resource.robot b/lib/resource.robot
index 4b7b360..b3ad7ee 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -55,6 +55,9 @@
 # IPMI timeout default.
 ${IPMI_TIMEOUT}       ${3}
 
+# Log default path for IPMI SOL.
+${IPMI_SOL_LOG_FILE}    ${EXECDIR}${/}logs${/}sol_${OPENBMC_HOST}
+
 # PDU related parameters
 ${PDU_TYPE}         ${EMPTY}
 ${PDU_IP}           ${EMPTY}