Remove IPMI tool dependency for eSEL related TC.

Using Inband IPMI command to remove IPMI tool dependency for below TCs
Verify eSEL Using REST
Verify eSEL Entries Using REST
Verify Multiple eSEL Using REST
Check eSEL AdditionalData

Resolves openbmc/openbmc-test-automation#632

Change-Id: Ifcdb16db3604da770c1d7c5ef47dcbf00085fe53
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/tests/test_esel.robot b/extended/test_esel.robot
similarity index 80%
rename from tests/test_esel.robot
rename to extended/test_esel.robot
index 24581d4..fb00932 100644
--- a/tests/test_esel.robot
+++ b/extended/test_esel.robot
@@ -5,10 +5,12 @@
 Resource            ../lib/ipmi_client.robot
 Resource            ../lib/openbmc_ffdc.robot
 Variables           ../data/variables.py
+Resource            ../lib/utils.robot
 
-Suite Setup         Open Connection And Log In
+Suite Setup         eSEL Test SetUp
 Suite Teardown      Test Cleanup On Exit
 Test Teardown       FFDC On Test Case Fail
+Test Setup          Delete Error logs
 
 Force Tags  eSEL_Logging
 
@@ -31,7 +33,6 @@
 
 Verify eSEL Using REST
     [Documentation]  Generate eSEL log and verify using REST.
-    [setup]  Restart Logging Service
     [Tags]  Verify_eSEL_Using_REST
 
     # Prior eSEL log shouldn't exist.
@@ -45,16 +46,16 @@
 
 Verify eSEL Entries Using REST
     [Documentation]  Verify that eSEL entries have data.
-    [setup]  Restart Logging Service
     [Tags]  Verify_eSEL_Entries_Using_REST
+
     Create eSEL
     Verify eSEL Entries
 
 
 Verify Multiple eSEL Using REST
     [Documentation]  Generate multiple eSEL log and verify using REST.
-    [setup]  Restart Logging Service
     [Tags]  Verify_Multiple_eSEL_Using_REST
+
     Create eSEL
     Create eSEL
     ${entries}=  Count eSEL Entries
@@ -64,8 +65,8 @@
 Check eSEL AdditionalData
     [Documentation]  Generate eSEL log and verify AdditionalData is
     ...              not empty.
-    [setup]  Restart Logging Service
     [Tags]  Check_eSEL_AdditionalData
+
     Create eSEL
     ${resp}=  OpenBMC Get Request  ${BMC_LOGGING_ENTRY}${1}
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
@@ -120,11 +121,11 @@
 Create eSEL
     [Documentation]  Create an eSEL.
     Open Connection And Log In
-    ${Resv_id}=  Run Dbus IPMI Standard Command  ${RESERVE_ID}
+    ${Resv_id}=  Run Inband IPMI Standard Command  ${RESERVE_ID}
     ${cmd}=  Catenate
     ...  ${RAW_PREFIX}${Resv_id.strip().rsplit(' ', 1)[0]}  ${RAW_SUFFIX}
-    Run Dbus IPMI Standard Command  ${cmd}
-    Run Dbus IPMI Standard Command  ${RAW_SEL_COMMIT}
+    Run Inband IPMI Standard Command  ${cmd}
+    Run Inband IPMI Standard Command  ${RAW_SEL_COMMIT}
 
 
 Count eSEL Entries
@@ -158,7 +159,6 @@
 
 Test Cleanup On Exit
     [Documentation]  Cleanup test logs and connection.
-    Restart Logging Service
     Close All Connections
 
 
@@ -172,17 +172,33 @@
 
 Run IPMI Command Returned
     [Arguments]    ${args}
-    ${output_1}=    Execute Command    /tmp/ipmitool -I dbus raw ${args}
+    ${output_1}=    Execute Command   /tmp/ipmitool -I dbus raw ${args}
     [Return]    ${output_1}
 
 Check IPMI Oempartialadd Reject
-    [Arguments]    ${args}
-    ${stdout}    ${stderr}    ${output_2}=  Execute Command    /tmp/ipmitool -I dbus raw ${args}    return_stdout=True    return_stderr= True    return_rc=True
-    [Return]    ${stderr}
+    [Arguments]  ${args}
+    ${cmd}=  Catenate  /tmp/ipmitool -I dbus raw ${args}
+    ${stdout}  ${stderr}  ${output_2}=  Execute Command  ${cmd}
+    ...        return_stdout=True  return_stderr= True  return_rc=True
+    [Return]  ${stderr}
 
 Check IPMI Oempartialadd Accept
-    [Arguments]    ${args}
-    ${stdout}    ${stderr}    ${output_3}=    Execute Command    /tmp/ipmitool -I dbus raw ${args}    return_stdout=True    return_stderr= True    return_rc=True
-    Should Be Equal    ${output_3}    ${0}    msg=${stderr}
-    [Return]    ${stderr}
+    [Arguments]  ${args}
+    ${cmd}=  Catenate  /tmp/ipmitool -I dbus raw ${args}
+    ${stdout}  ${stderr}  ${output_3}=  Execute Command  ${cmd}
+    ...        return_stdout=True  return_stderr= True  return_rc=True
+    Should Be Equal  ${output_3}  ${0}  msg=${stderr}
+    [Return]  ${stderr}
 
+eSEL Test SetUp
+    [Documentation]  Validates input parameters & check if HOST OS is up.
+
+    Should Not Be Empty
+    ...   ${OS_HOST}  msg=You must provide DNS name/IP of the OS host.
+    Should Not Be Empty
+    ...   ${OS_USERNAME}  msg=You must provide OS host user name.
+    Should Not Be Empty
+    ...   ${OS_PASSWORD}  msg=You must provide OS host user password.
+
+    Login To OS Host  ${OS_HOST}  ${OS_USERNAME}  ${OS_PASSWORD}
+    Open Connection And Log In
diff --git a/test_lists/skip_test b/test_lists/skip_test
index eea698d..96a1cbb 100644
--- a/test_lists/skip_test
+++ b/test_lists/skip_test
@@ -28,7 +28,8 @@
 -e Check_BMC_Clocks_Name_Property_Is_Set
 -e Check_BMC_Clocks_Compatible_Property_Is_Set
 #https://github.com/openbmc/openbmc-test-automation/issues/75
--e eSEL_Logging
+-e Test_Wrong_Reservation_ID
+-e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc-test-automation/issues/396
 -e NetworkManager
 # NA until support for debug tarball is enabled
diff --git a/test_lists/skip_test_barreleye b/test_lists/skip_test_barreleye
index 4b038f7..e86c3c7 100644
--- a/test_lists/skip_test_barreleye
+++ b/test_lists/skip_test_barreleye
@@ -28,7 +28,8 @@
 -e Check_BMC_Clocks_Name_Property_Is_Set
 -e Check_BMC_Clocks_Compatible_Property_Is_Set
 #https://github.com/openbmc/openbmc-test-automation/issues/75
--e eSEL_Logging
+-e Test_Wrong_Reservation_ID
+-e Test_Correct_Reservation_ID
 # Test cases are NA for Barreleye and Palmetto
 -e LED_Group
 -e Verify_Enabling_OCC_Turbo_Setting_Via_IPMI
diff --git a/test_lists/skip_test_palmetto b/test_lists/skip_test_palmetto
index 83c7f77..9d42f4b 100644
--- a/test_lists/skip_test_palmetto
+++ b/test_lists/skip_test_palmetto
@@ -36,7 +36,8 @@
 #https://github.com/openbmc/openbmc/issues/1142
 -e Check_BMC_Name_Property_Is_Set
 #https://github.com/openbmc/openbmc-test-automation/issues/75
--e eSEL_Logging
+-e Test_Wrong_Reservation_ID
+-e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc-test-automation/issues/396
 -e NetworkManager
 # Led groups test cases are NA for Barreleye and Palmetto
diff --git a/test_lists/skip_test_witherspoon b/test_lists/skip_test_witherspoon
index e12b2ee..7b9c361 100644
--- a/test_lists/skip_test_witherspoon
+++ b/test_lists/skip_test_witherspoon
@@ -36,7 +36,8 @@
 -e Check_BMC_FSI_Compatible_Property_Is_Set
 -e Check_BMC_FSI_Name_Property_Is_Set
 #https://github.com/openbmc/openbmc-test-automation/issues/75
--e eSEL_Logging
+-e Test_Wrong_Reservation_ID
+-e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc-test-automation/issues/396
 -e NetworkManager
 # NA until support for debug tarball is enabled