Added new testcase for Get SDR info and Reserve SDR IPMI Commands

Modified Get SDR info testcase to verify supported commands dynamically,
rather than harcoded values.

Testcase Added:
    - Test Reserve SDR repository.
    - Verify Reserve SDR repository cmd functionality using get SDR cmd.
    - Test Invalid reservation ID using Get SDR command.
    - Verify Reserve SDR cmd after BMC reboot.

Tested  Run robot ipmi/test_ipmi_sdr.robot

Signed-off-by: Nagarjun B   <nagarjunb@ami.com>
Change-Id: I7ac3d23133c42c9823c6cbc4f14d968ecd89b78c
diff --git a/lib/utilities.py b/lib/utilities.py
index 6416aa9..1994fe7 100755
--- a/lib/utilities.py
+++ b/lib/utilities.py
@@ -250,3 +250,30 @@
     Returns the element from the list with minimum value.
     """
     return min(value_list)
+
+
+def convert_lsb_to_msb(string):
+    r"""
+    Reverse given string (From LSB first to MSB first) and converts to HEX.
+
+    Input stirng     0a 00
+    Return string    0a
+    """
+    datalist = string.split(" ")
+    new_list = datalist[::-1]
+    new_string = "".join([str(element) for element in new_list])
+    return int(new_string, 16)
+
+
+def add_prefix_to_string(string, prefix):
+    r"""
+    Add given prefix to the string and return string.
+
+    Input string      0a 01
+    Return string     0x0a 0x01
+    """
+    prefix_string = ''
+    data_list = string.strip().split(" ")
+    for item in data_list:
+        prefix_string += prefix + item + ' '
+    return prefix_string.strip()