SEL Script Changes

ipmi/test_ipmi_sel_time.robot script changes
- In test_ipmi_sel_time.robot script created an time difference list and from time difference list
date and time will be either incremented or decremented.

- Removed Identify SEL Time Future DateTime and Identify SEL Time DateTime Delay and added Identify SEL Time keyword
for incrementing or decrementing date and time.

- Modified Verify Last SEL Added keyword previously sel elist last 1 command was used to get last sel entry but sometimes
while adding sel time at the same time there may be an chance other sel also can be generated. so handled the code to get
complete sel elist via ipmi sel elist command and fetch the sel entry based on sensor name and event type. keyword also
renamed to Verify SEL Added.

ipmi/test_ipmi_sel.robot
- As Get Data And Byte From SDR sensor keyword was modified based on the modification
remodified the variable for this keyword.
- Like ipmi_sel_time.robot script verify sel entry command was modified.

lib/ipmi_client.robot
- Get Data And Byte From SDR Sensor keyword return variable ${field_data} was removed.

Tested:
	- Tested ipmi/test_ipmi_sel_time.robot script.
	- Tested ipmi/test_ipmi_sel.robot script.

Signed-off-by: ganesanb <ganesanb@ami.com>
Change-Id: If0342c07c16ecc83a0cc092e6f3476eea42d63f5
diff --git a/ipmi/test_ipmi_sel.robot b/ipmi/test_ipmi_sel.robot
index b4b743d..13540ec 100644
--- a/ipmi/test_ipmi_sel.robot
+++ b/ipmi/test_ipmi_sel.robot
@@ -9,6 +9,14 @@
 Test Setup       Test Setup Execution
 Test Teardown    FFDC On Test Case Fail
 
+*** Variables ***
+
+# Based on 13th byte of add SEL entry command as per IPMI spec
+# event_dir and event_type variable value needs to be given.
+${sel_no_entry_msg}  SEL has no entries
+${event_type}        Lower Non-critical going low
+${event_dir}         Asserted
+
 *** Test Cases ***
 
 Verify IPMI SEL Version
@@ -70,11 +78,11 @@
 
     # Get Sensor ID from SDR get "sensor".
     ${sensor_data1}=  Fetch Sensor Details From SDR  ${sensor_name}  Sensor ID
-    ${name_sensor}  ${sensor_number}=  Get Data And Byte From SDR Sensor  ${sensor_data1}
+    ${sensor_number}=  Get Bytes From SDR Sensor  ${sensor_data1}
 
     # Get Sensor Type from SDR get "sensor".
     ${sensor_data2}=  Fetch Sensor Details From SDR  ${sensor_name}  Sensor Type (Threshold)
-    ${sensor_type}  ${sensor_type_id}=  Get Data And Byte From SDR Sensor  ${sensor_data2}
+    ${sensor_type_id}=  Get Bytes From SDR Sensor  ${sensor_data2}
 
     # Add SEL Entry.
     # ${sel_entry_id} is the Record ID for added record (LSB First).
@@ -82,15 +90,17 @@
     ${sel_entry_id}=  Split String  ${sel_create_resp}
 
     # Get last SEL entry.
-    ${resp}=  Run IPMI Standard Command  sel elist last 1
+    ${resp}=  Run IPMI Standard Command  sel elist
+    Should Not Contain  ${resp}  ${sel_no_entry_msg}
 
-    # Output of the Sel elist last 1.
+    # Output of the Sel elist.
     # Below example is a continuous line statement.
     #    N | MM/DD/YYYY | HH:MM:SS | Sensor_Type Sensor_Name |
     #    Lower Non-critical going low  | Asserted | Reading 0.
 
-    Run Keywords  Should Contain  ${resp}  ${sensor_type} ${sensor_name}  AND
-    ...  Should Contain  ${resp}  Asserted  msg=Add SEL Entry failed.
+    ${get_sel_entry}=  Get Lines Containing String  ${resp}  ${sensor_name}
+    ${sel_entry}=  Get Lines Containing String  ${get_sel_entry}  ${event_type}
+    Should Contain  ${sel_entry}  ${event_dir}  msg=Add SEL Entry failed.
 
     # Get SEL Entry IPMI Raw Command.
     ${entry}=  Get SEL Entry Via IPMI  ${sel_entry_id[0]}  ${sel_entry_id[1]}
@@ -148,11 +158,11 @@
 
         # Get Sensor ID from SDR Get "sensor" and Identify Sensor ID.
         ${sensor_data1}=  Fetch Sensor Details From SDR  ${sensor_name}  Sensor ID
-        ${name_sensor}  ${sensor_number}=  Get Data And Byte From SDR Sensor  ${sensor_data1}
+        ${sensor_number}=  Get Bytes From SDR Sensor  ${sensor_data1}
 
         # Get Sensor Type from SDR Get "sensor" and Identify Sensor Type.
         ${sensor_data2}=  Fetch Sensor Details From SDR  ${sensor_name}  Sensor Type (Threshold)
-        ${sensor_type}  ${sensor_type_id}=  Get Data And Byte From SDR Sensor  ${sensor_data2}
+        ${sensor_type_id}=  Get Bytes From SDR Sensor  ${sensor_data2}
 
         # Add SEL Entry.
         ${sel_create_resp}=  Create SEL  ${sensor_type_id}  ${sensor_number}