Test cases cleanup for IPMI usecases to remove dependency on dbus

Fixed:
     - Remove tags "Test_Wrong_Reservation_ID" and
        "Test_Correct_Reservation_ID" from skip list
     - Changing the IPMI Command to Inband IPMI
     - Added Keyword Check IPMI Oempartialadd Accept Inband
     - Added Keyword Check IPMI Oempartialadd Reject Inband

Resolves openbmc/openbmc-test-automation#606

Change-Id: Ic5740a8eb45ba0fcad03453e9f86ec799b523dc7
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/extended/test_esel.robot b/extended/test_esel.robot
index fb00932..2780273 100644
--- a/extended/test_esel.robot
+++ b/extended/test_esel.robot
@@ -4,6 +4,7 @@
 
 Resource            ../lib/ipmi_client.robot
 Resource            ../lib/openbmc_ffdc.robot
+Resource            ../lib/utils.robot
 Variables           ../data/variables.py
 Resource            ../lib/utils.robot
 
@@ -80,7 +81,6 @@
     # }
     Should Not Be Empty  ${jsondata["data"]["AdditionalData"]}
 
-
 Test Wrong Reservation_ID
     [Documentation]   This testcase is to test BMC can handle multi-requestor's
     ...               oem partial add command with incorrect reservation id.
@@ -88,11 +88,11 @@
     ...                and wrong Reservation ID. This command will be rejected.
     [Tags]  Test_Wrong_Reservation_ID
 
-    ${rev_id_1}=    Run IPMI Command Returned   0x0a 0x42
+    ${rev_id_1}=   Run Inband IPMI Raw Command  0x0a 0x42
     ${rev_id_ls}=   Get Substring   ${rev_id_1}   1   3
     ${rev_id_ms}=   Get Substring   ${rev_id_1}   -2
-    Run IPMI command   0x0a 0x42
-    ${output}=      Check IPMI Oempartialadd Reject   0x32 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
+    Run Inband IPMI Raw Command   0x0a 0x42
+    ${output}=     Check IPMI OEMpartialadd Reject  0x32 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
     Should Contain   ${output}   Reservation cancelled
 
 Test Correct Reservation_ID
@@ -102,11 +102,11 @@
     ...               and correct Reservation ID. This command will be accepted.
     [Tags]  Test_Correct_Reservation_ID
 
-    Run IPMI command   0x0a 0x42
-    ${rev_id_2}=    Run IPMI Command Returned   0x0a 0x42
+    Run Inband IPMI Raw Command  0x0a 0x42
+    ${rev_id_2}=    Run Inband IPMI Raw Command  0x0a 0x42
     ${rev_id_ls}=   Get Substring   ${rev_id_2}   1   3
     ${rev_id_ms}=   Get Substring   ${rev_id_2}   -2
-    ${output}=      Check IPMI Oempartialadd Accept   0x32 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
+    ${output}=      Check IPMI OEMpartialadd Accept  0x32 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
     Should Be Empty    ${output}
 
 Clear Test File
@@ -175,19 +175,11 @@
     ${output_1}=    Execute Command   /tmp/ipmitool -I dbus raw ${args}
     [Return]    ${output_1}
 
-Check IPMI Oempartialadd Reject
-    [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}
-    ${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}
+Check IPMI OEMpartialadd Reject
+    [Arguments]    ${args}
+    Login To OS Host  ${OS_HOST}  ${OS_USERNAME}  ${OS_PASSWORD}
+    ${stdout}  ${stderr}  ${output_2}=  Execute Command  ipmitool raw ${args}
+    ...        return_stdout=True  return_stderr=True  return_rc=True
     [Return]  ${stderr}
 
 eSEL Test SetUp
@@ -202,3 +194,12 @@
 
     Login To OS Host  ${OS_HOST}  ${OS_USERNAME}  ${OS_PASSWORD}
     Open Connection And Log In
+
+Check IPMI OEMpartialadd Accept
+    [Arguments]    ${args}
+    Login To OS Host  ${OS_HOST}  ${OS_USERNAME}  ${OS_PASSWORD}
+    ${stdout}  ${stderr}  ${output_3}=  Execute Command  ipmitool raw ${args}
+    ...         return_stdout=True  return_stderr=True  return_rc=True
+    Should Be Equal  ${output_3}  ${0}  msg=${stderr}
+    [Return]  ${stderr}
+
diff --git a/test_lists/skip_test b/test_lists/skip_test
index 96a1cbb..853208e 100644
--- a/test_lists/skip_test
+++ b/test_lists/skip_test
@@ -1,10 +1,6 @@
 -e known_issue
 #https://github.com/openbmc/openbmc-test-automation/issues/123
 -e Execute_ipmi_BT_capabilities_command
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Wrong_Reservation_ID
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc-test-automation/issues/107
 -e Set_valid_Mac_address
 #https://github.com/openbmc/openbmc-test-automation/issues/107
diff --git a/test_lists/skip_test_barreleye b/test_lists/skip_test_barreleye
index e86c3c7..9de8442 100644
--- a/test_lists/skip_test_barreleye
+++ b/test_lists/skip_test_barreleye
@@ -1,10 +1,6 @@
 -e known_issue
 #https://github.com/openbmc/openbmc-test-automation/issues/123
 -e Execute_ipmi_BT_capabilities_command
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Wrong_Reservation_ID
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc-test-automation/issues/107
 -e Set_valid_Mac_address
 #https://github.com/openbmc/openbmc-test-automation/issues/107
diff --git a/test_lists/skip_test_palmetto b/test_lists/skip_test_palmetto
index 9d42f4b..94249da 100644
--- a/test_lists/skip_test_palmetto
+++ b/test_lists/skip_test_palmetto
@@ -1,10 +1,6 @@
 -e known_issue
 #https://github.com/openbmc/openbmc/issues/611
 -e Association_with_virtual_sensor
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Wrong_Reservation_ID
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc/issues/93
 -e System_Present
 -e Chassis_Present
diff --git a/test_lists/skip_test_witherspoon b/test_lists/skip_test_witherspoon
index 7b9c361..a0d1123 100644
--- a/test_lists/skip_test_witherspoon
+++ b/test_lists/skip_test_witherspoon
@@ -1,10 +1,6 @@
 -e known_issue
 #https://github.com/openbmc/openbmc-test-automation/issues/123
 -e Execute_ipmi_BT_capabilities_command
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Wrong_Reservation_ID
-#https://github.com/openbmc/openbmc/issues/539
--e Test_Correct_Reservation_ID
 #https://github.com/openbmc/openbmc-test-automation/issues/107
 -e Set_valid_Mac_address
 #https://github.com/openbmc/openbmc-test-automation/issues/107