summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2020-05-14 01:38:24 +0300
committerPatrick Williams <patrick@stwcx.xyz>2020-05-14 06:15:18 +0300
commit19bd78d9b79085526fd520d8f5c020905db1122a (patch)
treee9f467974303a9ad31a22f2c1e554407c124d733 /redfish-core
parent8d78b7a9f5fbca338a5867d5dd4fa83890d79bc7 (diff)
downloadbmcweb-19bd78d9b79085526fd520d8f5c020905db1122a.tar.xz
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia5d0845741f1d8d4bc6fd227c6d2e6f3a8d42b2e
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/account_service.hpp4
-rw-r--r--redfish-core/lib/ethernet.hpp8
-rw-r--r--redfish-core/lib/log_services.hpp5
-rw-r--r--redfish-core/lib/pcie.hpp11
-rw-r--r--redfish-core/lib/power.hpp2
-rw-r--r--redfish-core/lib/sensors.hpp3
-rw-r--r--redfish-core/lib/systems.hpp9
7 files changed, 19 insertions, 23 deletions
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index c7119832d6..b579994e0b 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -64,7 +64,7 @@ struct LDAPConfigData
std::vector<std::pair<std::string, LDAPRoleMapData>> groupRoleList;
};
-using DbusVariantType = sdbusplus::message::variant<bool, int32_t, std::string>;
+using DbusVariantType = std::variant<bool, int32_t, std::string>;
using DbusInterfaceType = boost::container::flat_map<
std::string, boost::container::flat_map<std::string, DbusVariantType>>;
@@ -1867,7 +1867,7 @@ class ManagerAccount : public Node
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.User.Attributes",
"UserLockedForFailedAttempt",
- sdbusplus::message::variant<bool>{*locked});
+ std::variant<bool>{*locked});
}
});
}
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index ae050acb14..7915bd0966 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -41,10 +41,10 @@ using GetManagedObjects = std::vector<std::pair<
std::vector<std::pair<
std::string,
boost::container::flat_map<
- std::string, sdbusplus::message::variant<
- std::string, bool, uint8_t, int16_t, uint16_t,
- int32_t, uint32_t, int64_t, uint64_t, double,
- std::vector<std::string>>>>>>>;
+ std::string,
+ std::variant<std::string, bool, uint8_t, int16_t, uint16_t, int32_t,
+ uint32_t, int64_t, uint64_t, double,
+ std::vector<std::string>>>>>>>;
enum class LinkType
{
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 77155e3ccc..667fb4045d 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -96,9 +96,8 @@ static const Message *getMessage(const std::string_view &messageID)
namespace fs = std::filesystem;
using GetManagedPropertyType = boost::container::flat_map<
- std::string,
- sdbusplus::message::variant<std::string, bool, uint8_t, int16_t, uint16_t,
- int32_t, uint32_t, int64_t, uint64_t, double>>;
+ std::string, std::variant<std::string, bool, uint8_t, int16_t, uint16_t,
+ int32_t, uint32_t, int64_t, uint64_t, double>>;
using GetManagedObjectsType = boost::container::flat_map<
sdbusplus::message::object_path,
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 33b8828671..f8a5e2957c 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -135,8 +135,8 @@ class SystemPCIeDevice : public Node
auto getPCIeDeviceCallback =
[asyncResp,
device](const boost::system::error_code ec,
- boost::container::flat_map<
- std::string, sdbusplus::message::variant<std::string>>
+ boost::container::flat_map<std::string,
+ std::variant<std::string>>
&pcieDevProperties) {
if (ec)
{
@@ -231,8 +231,8 @@ class SystemPCIeFunctionCollection : public Node
auto getPCIeDeviceCallback =
[asyncResp,
device](const boost::system::error_code ec,
- boost::container::flat_map<
- std::string, sdbusplus::message::variant<std::string>>
+ boost::container::flat_map<std::string,
+ std::variant<std::string>>
&pcieDevProperties) {
if (ec)
{
@@ -319,8 +319,7 @@ class SystemPCIeFunction : public Node
const boost::system::error_code ec,
boost::container::flat_map<
std::string,
- sdbusplus::message::variant<
- std::string>>
+ std::variant<std::string>>
&pcieDevProperties) {
if (ec)
{
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index f11d7e8d8d..a159ed6468 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -131,7 +131,7 @@ class Power : public Node
"/xyz/openbmc_project/control/host0/power_cap",
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.Control.Power.Cap", "PowerCap",
- sdbusplus::message::variant<uint32_t>(*value));
+ std::variant<uint32_t>(*value));
};
crow::connections::systemBus->async_method_call(
std::move(valueHandler), "xyz.openbmc_project.Settings",
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 39a815a54c..b158c78829 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -2712,8 +2712,7 @@ void setSensorsOverride(
item.second, item.first,
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.Sensor.Value", "Value",
- sdbusplus::message::variant<double>(
- iterator->second.first));
+ std::variant<double>(iterator->second.first));
}
};
// Get object with connection for the given sensor name
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index a4c4f5bd61..c17e13537d 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -893,7 +893,7 @@ static void getBootProperties(std::shared_ptr<AsyncResp> aResp)
crow::connections::systemBus->async_method_call(
[aResp](const boost::system::error_code ec,
- const sdbusplus::message::variant<bool> &oneTime) {
+ const std::variant<bool> &oneTime) {
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
@@ -929,7 +929,7 @@ void getPowerRestorePolicy(std::shared_ptr<AsyncResp> aResp)
crow::connections::systemBus->async_method_call(
[aResp](const boost::system::error_code ec,
- sdbusplus::message::variant<std::string> &policy) {
+ std::variant<std::string> &policy) {
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
@@ -1111,9 +1111,8 @@ static void setBootProperties(std::shared_ptr<AsyncResp> aResp,
crow::connections::systemBus->async_method_call(
[aResp, bootSource{std::move(bootSource)},
- bootEnable{std::move(bootEnable)}](
- const boost::system::error_code ec,
- const sdbusplus::message::variant<bool> &oneTime) {
+ bootEnable{std::move(bootEnable)}](const boost::system::error_code ec,
+ const std::variant<bool> &oneTime) {
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS response error " << ec;