Session and SessionCollection
New Redfish-Core nodes added (removed from redfish_v1.hpp) - Session
and SessionCollection. Tested manually on x86 VM and Wolfpass Platform.
Behavior almost identical to what was before - differences:
- SessionCollection - now only returns TIMEOUT presistence sessions, not SINGLE
- Aquiring sessions from session storage now applies timeouts
Change-Id: I68bf4fa7fa1c8371216a7d4daa30bbfb653cfa72
Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp
index c4b765c..c26d90b 100644
--- a/redfish-core/include/redfish.hpp
+++ b/redfish-core/include/redfish.hpp
@@ -15,6 +15,7 @@
*/
#pragma once
+#include "../lib/redfish_sessions.hpp"
#include "../lib/service_root.hpp"
namespace redfish {
@@ -34,10 +35,13 @@
RedfishService(CrowApp& app) {
auto privilegeProvider = PrivilegeProvider();
serviceRootPtr = std::make_unique<ServiceRoot>(app, privilegeProvider);
+ sessionsCollectionPtr =
+ std::make_unique<SessionCollection>(app, privilegeProvider);
}
private:
std::unique_ptr<ServiceRoot> serviceRootPtr;
+ std::unique_ptr<SessionCollection> sessionsCollectionPtr;
};
} // namespace redfish