Create multiple session and verify
Changes:
- Added set session key function in lib.
- Added get session info function in lib utils.
- Added test case to create 50 session and verify.
Tested: On Master
Change-Id: Iaf740c83d77fb1da7be65903872219e21b53c79e
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index 832da44..daa09e1 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -17,6 +17,21 @@
# Obtain a reference to the global redfish object.
self._redfish_ = BuiltIn().get_library_instance('redfish')
+ def get_redfish_session_info(self):
+ r"""
+ Returns redfish sessions info dictionary.
+
+ {
+ 'key': 'yLXotJnrh5nDhXj5lLiH' ,
+ 'location': '/redfish/v1/SessionService/Sessions/nblYY4wlz0'
+ }
+ """
+ session_dict = {
+ "key": self._redfish_._session_key_,
+ "location": self._redfish_._session_location_
+ }
+ return session_dict
+
def get_attribute(self, resource_path, attribute):
r"""
Get resource attribute.