Remove the hardcoding for IPMI Prefix value
Changes:
Resolves openbmc-test-automation/issues/#2251
Create a new input argument as ${IPMI_RAW_PREFIX}
This enable the user to provide the IPMI_RAW_PREFIX from the CLI as
e.g. -v IPMI_RAW_PREFIX:'0xaa 0xbb 0x'
Tested:
Tested changes on BMC environment
Change-Id: I10f30e59cf6fe8af80b421233ad241513a138614
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/esel_utils.robot b/lib/esel_utils.robot
index 5af58dd..3e6a638 100755
--- a/lib/esel_utils.robot
+++ b/lib/esel_utils.robot
@@ -9,8 +9,6 @@
*** Variables ***
-${RAW_PREFIX} raw 0x3a 0xf0 0x
-
${RESERVE_ID} raw 0x0a 0x42
${RAW_SUFFIX} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00
@@ -24,16 +22,24 @@
Create eSEL
[Documentation] Create an eSEL.
+ [Arguments] ${IPMI_RAW_PREFIX}
+
+ # Description of Argument(s):
+ # IPMI_RAW_PREFIX Provide the IPMI raw prefix format
+ # Default is '0x3a 0xf0 0x'.
+
Open Connection And Log In
${Resv_id}= Run Inband IPMI Standard Command ${RESERVE_ID}
${cmd}= Catenate
- ... ${RAW_PREFIX}${Resv_id.strip().rsplit(' ', 1)[0]} ${RAW_SUFFIX}
+ ... raw ${IPMI_RAW_PREFIX}${Resv_id.strip().rsplit(' ', 1)[0]} ${RAW_SUFFIX}
+
Run Inband IPMI Standard Command ${cmd}
Run Inband IPMI Standard Command ${RAW_SEL_COMMIT}
Count eSEL Entries
[Documentation] Count eSEL entries logged.
+
${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${count}= Get Length ${resp.json()["data"]}