Add VirtualMedia schema to Redfish
This change adds VirtualMedia scheme to Redfish.
Implementation is based on input from virtual-media module
and nbd proxy which is a bmcweb part. The code is used
only in case ndb-proxy is supported in bmcweb
(BMCWEB_ENABLE_VM_NBDPROXY compilation flag).
Tested:
* Manual tests together with nbd proxy and virtual media app
- For requests: Postman and/or HTTPie, started with logs
enabled and Valgrind
- Manual result validation
* Tests ran:
- GET on collection with manual validation
- PUT/POST/DELETE on collection
- GET on item/nonexistent item
- PUT/POST/DELETE on item
* Redfish Service Validator tested, no new issues found.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Change-Id: I5415dc0ffe52069fd35bc614b0378bbc4ad41ff6
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 9f066e3..017a83d 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -64,11 +64,14 @@
std::vector<std::pair<std::string, LDAPRoleMapData>> groupRoleList;
};
-using ManagedObjectType = std::vector<std::pair<
- sdbusplus::message::object_path,
- boost::container::flat_map<
- std::string, boost::container::flat_map<
- std::string, std::variant<bool, std::string>>>>>;
+using DbusVariantType = sdbusplus::message::variant<bool, int32_t, std::string>;
+
+using DbusInterfaceType = boost::container::flat_map<
+ std::string, boost::container::flat_map<std::string, DbusVariantType>>;
+
+using ManagedObjectType =
+ std::vector<std::pair<sdbusplus::message::object_path, DbusInterfaceType>>;
+
using GetObjectType =
std::vector<std::pair<std::string, std::vector<std::string>>>;