Added new script for inband SDR comands - Get SDR, Get Device SDR Info, Reserve Device SDR Repository and Get Device SDR IPMI commands

Testcases Added :
   - Verify Get SDR For Maximum Record Via IPMI
   - Verify Sensor And SDR Count In Get Device SDR Info Via Inband IPMI
   - Verify Timestamp In Get Device SDR Info Via Inband IPMI
   - Verify Get Device SDR Info For Invalid Data Request
   - Verify Device SDR Info Via IPMI Lanplus
   - Verify Reserve Device SDR Repository Via Inband IPMI
   - Verify Reserve Device SDR Repository For Invalid Data Request
   - Verify Reserve Device SDR Repository Info Via IPMI Lanplus
   - Verify Reserve Device SDR Repository For Partial Record
   - Verify Reserve Device SDR Repository For Partial Record After BMC Reboot
   - Verify Reserve Device SDR Repository Invalid Reservation ID For Partial Record
   - Verify Get Device SDR For Maximum Record Via IPMI
   - Verify Get Device SDR For Invalid Data Request Via IPMI

Request data for Device SDR present in data/ipmi_raw_cmd_table.py
Zfill Data keyword available in lib/utils.py - committed in - https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/51641

For Get Device SDR Info, Sensor and sdr counts are compared with sensor list and sdr elist all respectively. Timestamps of both sensor and sdr data are validated.

Reserve Device SDR Repository and Get Device SDR Info should be accessible only via KCS interface and not via Lanplus interface.

Get SDR and Get Device SDR verifies maximum number Record IDs with their immediate next Record IDs.

Tested: Run robot ipmi/test_ipmi_inband_sdr.robot

Signed-off-by: chithrag <chithrag@ami.com>
Change-Id: Ia69fd02f44cb64f6341f95f987e159ee85f76a5b
diff --git a/data/ipmi_raw_cmd_table.py b/data/ipmi_raw_cmd_table.py
index 7e7f84a..4198cf4 100644
--- a/data/ipmi_raw_cmd_table.py
+++ b/data/ipmi_raw_cmd_table.py
@@ -407,6 +407,20 @@
             # raw command, expected output(s), comment
             'Invalid value',
             'Valid values are serial, 9.6 19.2, 38.4, 57.6 and 115.2',
+        ]
+    },
+    'Get SDR':
+    {
+        'Get':
+        [
+            # Get SDR raw command without Reservation ID.
+            "0x0a 0x23 0x00 0x00 0x00 0x00 0x00 0xff",
+            # Netfunction and cmd.
+            "0x0a 0x23",
+            # Record ID offset and bytes to read.
+            "0x00 0x00 0x01 0x0f",
+            #  Raw command To Get SDR Partial without Reservation ID.
+            "0x0a 0x23 0x00 0x00 0x00 0x00 0x01 0x0f"
         ],
     },
     'Get':
@@ -417,5 +431,36 @@
             '0x00 0x0f',
             'Error: Unable to establish IPMI v2 / RMCP+ session'
         ]
+    },
+    'Device_SDR':
+    {
+        'Get_Info':
+        [
+            # raw command, expected output(s), comment
+            "0x04 0x20 0x00",
+            "0x04 0x20 0x01",
+            "rsp=0xc7",
+            "Request data length invalid",
+            "rsp=0xd4",
+            "Insufficient privilege level",
+        ],
+        'Get':
+        [
+            # raw command, expected output(s), comment
+            "0x04 0x21",
+            "0x00 0x00 0x00 0xff",
+            "rsp=0xc7",
+            "Request data length invalid",
+        ],
+        'Reserve_Repository':
+        [
+            # raw command, expected output(s), comment
+            "0x04 0x22",
+            "rsp=0xc7",
+            "Request data length invalid",
+            "rsp=0xd4",
+            "Insufficient privilege level",
+            "Reservation cancelled or invalid",
+        ]
     }
 }