Modified Is BMC Operational Keyword
Changes:
- Added sleep time to handle redfish.login
- Added redfish.login
- Added code to get bmc status from redfish managers uri.
Tested:
- Ran All The Scripts Successfully
Change-Id: I68e05c527be0cde074ea8d697a83153be4f1998a
Signed-off-by: ganesanb <ganesanb@ami.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 212dc04..b657c4a 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1115,8 +1115,14 @@
Is BMC Operational
[Documentation] Check if BMC is enabled.
+ [Teardown] Redfish.Logout
- ${bmc_status} = Redfish Get BMC State
+ Wait Until Keyword Succeeds 5 min 5 sec Ping Host ${OPENBMC_HOST}
+ # In some of bmc stack, network services will gets loaded before redfish/ipmi services gets loaded.
+ # Hence, 3mins sleep time is added to allow other service gets loaded.
+ Sleep 180s
+ Redfish.login
+ ${bmc_status}= Redfish Get BMC State
Should Be Equal ${bmc_status} Enabled