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.py b/lib/bmc_redfish.py
index 92001c9..d0f22a3 100644
--- a/lib/bmc_redfish.py
+++ b/lib/bmc_redfish.py
@@ -64,8 +64,27 @@
password=self._password_,
default_prefix=self._default_prefix_)
self._robj_.login(auth=redfish.AuthMethod.SESSION)
+ self._session_key_ = self._robj_.get_session_key()
self._session_location_ = self._robj_.get_session_location()
+ def set_session_key(self, session_key):
+ r"""
+ Update the session key instance.
+
+ session_key Redfish valid session key.
+ """
+ self._robj_.set_session_key(session_key)
+
+ def set_session_location(self, session_location):
+ r"""
+ Update the session location instance.
+
+ session_location Redfish valid session location.
+ Example:
+ /redfish/v1/SessionService/Sessions/j04tD83QQn
+ """
+ self._robj_.set_session_location(session_location)
+
def get(self, resource_path, *args, **kwargs):
r"""
Perform a GET request and return response.