Update session delete to handle Context vs OEM ClientID
Changes:
- Added logic to skip OEM ClientID during session delete.
Tested:
- Ran from sandbox with and without cliend id configured.
Change-Id: I1852343c672fe59e7afcfb4667cbdb96fff6340c
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index 6c8143e..8d92755 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -151,8 +151,12 @@
# This prevents dictionary KeyError exception when the Context
# attribute is not populated in generic session response.
${context_var}= Get Variable Value ${resp.dict["Context"]} ${EMPTY}
+ # Handle backward compatibility for OEM.
+ ${oem_var}= Get Variable Value ${resp.dict["Oem"]["OpenBMC"]["ClientID"]} ${EMPTY}
Run Keyword If '${context_var}' != '${EMPTY}'
... Append To List ${client_id_sessions} ${session}
+ Run Keyword If '${oem_var}' != '${EMPTY}'
+ ... Append To List ${client_id_sessions} ${session}
END
[Return] ${client_id_sessions}