summaryrefslogtreecommitdiff
path: root/redfish-core/include/utils/fw_utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/include/utils/fw_utils.hpp')
-rw-r--r--redfish-core/include/utils/fw_utils.hpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/redfish-core/include/utils/fw_utils.hpp b/redfish-core/include/utils/fw_utils.hpp
index c990023b84..658ca4d6d7 100644
--- a/redfish-core/include/utils/fw_utils.hpp
+++ b/redfish-core/include/utils/fw_utils.hpp
@@ -1,9 +1,9 @@
#pragma once
#include <async_resp.hpp>
+#include <dbus_utility.hpp>
#include <algorithm>
#include <string>
-#include <variant>
#include <vector>
namespace redfish
@@ -39,9 +39,9 @@ inline void
{
// Used later to determine running (known on Redfish as active) FW images
crow::connections::systemBus->async_method_call(
- [aResp, fwVersionPurpose, activeVersionPropName, populateLinkToImages](
- const boost::system::error_code ec,
- const std::variant<std::vector<std::string>>& resp) {
+ [aResp, fwVersionPurpose, activeVersionPropName,
+ populateLinkToImages](const boost::system::error_code ec,
+ const dbus::utility::DbusVariantType& resp) {
BMCWEB_LOG_DEBUG << "populateFirmwareInformation enter";
if (ec)
{
@@ -132,8 +132,8 @@ inline void
const boost::system::error_code ec3,
const boost::container::flat_map<
std::string,
- std::variant<bool, std::string, uint64_t,
- uint32_t>>& propertiesList) {
+ dbus::utility::DbusVariantType>&
+ propertiesList) {
if (ec3)
{
BMCWEB_LOG_ERROR << "error_code = " << ec3;
@@ -150,9 +150,9 @@ inline void
boost::container::flat_map<
std::string,
- std::variant<bool, std::string, uint64_t,
- uint32_t>>::const_iterator it =
- propertiesList.find("Purpose");
+ dbus::utility::DbusVariantType>::
+ const_iterator it =
+ propertiesList.find("Purpose");
if (it == propertiesList.end())
{
BMCWEB_LOG_ERROR
@@ -331,11 +331,10 @@ inline void getFwStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
BMCWEB_LOG_DEBUG << "getFwStatus: swId " << *swId << " svc " << dbusSvc;
crow::connections::systemBus->async_method_call(
- [asyncResp,
- swId](const boost::system::error_code errorCode,
- const boost::container::flat_map<
- std::string, std::variant<bool, std::string, uint64_t,
- uint32_t>>& propertiesList) {
+ [asyncResp, swId](
+ const boost::system::error_code errorCode,
+ const boost::container::flat_map<
+ std::string, dbus::utility::DbusVariantType>& propertiesList) {
if (errorCode)
{
// not all fwtypes are updateable, this is ok
@@ -343,9 +342,8 @@ inline void getFwStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return;
}
boost::container::flat_map<
- std::string, std::variant<bool, std::string, uint64_t,
- uint32_t>>::const_iterator it =
- propertiesList.find("Activation");
+ std::string, dbus::utility::DbusVariantType>::const_iterator
+ it = propertiesList.find("Activation");
if (it == propertiesList.end())
{
BMCWEB_LOG_DEBUG << "Can't find property \"Activation\"!";
@@ -388,7 +386,7 @@ inline void
{
crow::connections::systemBus->async_method_call(
[asyncResp, fwId](const boost::system::error_code ec,
- const std::variant<std::vector<std::string>>& resp) {
+ dbus::utility::DbusVariantType& resp) {
if (ec)
{
BMCWEB_LOG_DEBUG << " error_code = " << ec