Remove redfish login and logout from lib code
With this change, the test script caller is expected to have the
valid session before invoking the changed keywords in library.
Changes:
- Remove login/logout from lib/bmc_redfish_utils.robot
for power and reset operation.
- Update impacted test suites.
Tested: To identify the impact, ran the existing test bucket and
the result is looking good.
Change-Id: I6df69d6fcc4c38470fdb2ec3b31fb28beb726d70
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index 0fb2c50..5936574 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -31,11 +31,9 @@
# }
# }
- Redfish.Login
${target}= redfish_utils.Get Target Actions /redfish/v1/Systems/system/ ComputerSystem.Reset
${payload}= Create Dictionary ResetType=${reset_type}
${resp}= Redfish.Post ${target} body=&{payload}
- Redfish.Logout
Redfish BMC Reset Operation
@@ -50,13 +48,9 @@
# "target": "/redfish/v1/Managers/bmc/Actions/Manager.Reset"
# }
- Redfish.Login
${target}= redfish_utils.Get Target Actions /redfish/v1/Managers/bmc/ Manager.Reset
${payload}= Create Dictionary ResetType=GracefulRestart
- ${resp}= Redfish.Post ${target} body=&{payload}
- # The logout may very well fail because the system was just asked to
- # reset itself.
- Run Keyword And Ignore Error Redfish.Logout
+ Redfish.Post ${target} body=&{payload}
Reset BIOS Via Redfish