summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/COMMON_ERRORS.md5
-rw-r--r--features/google/google_service_root.hpp2
-rw-r--r--features/openbmc_rest/image_upload.hpp2
-rw-r--r--features/openbmc_rest/openbmc_dbus_rest.hpp2
-rw-r--r--features/serial/obmc_console.hpp3
-rw-r--r--features/virtual_media/vm_websocket.hpp3
-rw-r--r--include/dbus_utility.hpp20
-rw-r--r--include/user_monitor.hpp2
-rw-r--r--redfish-core/include/redfish_aggregator.hpp2
-rw-r--r--redfish-core/include/snmp_trap_event_clients.hpp9
-rw-r--r--redfish-core/include/utils/chassis_utils.hpp2
-rw-r--r--redfish-core/include/utils/collection.hpp2
-rw-r--r--redfish-core/include/utils/dbus_utils.hpp4
-rw-r--r--redfish-core/include/utils/eventlog_utils.hpp5
-rw-r--r--redfish-core/include/utils/fan_utils.hpp14
-rw-r--r--redfish-core/include/utils/sensor_utils.hpp10
-rw-r--r--redfish-core/include/utils/sw_utils.hpp22
-rw-r--r--redfish-core/include/utils/systems_utils.hpp18
-rw-r--r--redfish-core/include/utils/telemetry_utils.hpp6
-rw-r--r--redfish-core/lib/account_service.hpp48
-rw-r--r--redfish-core/lib/assembly.hpp2
-rw-r--r--redfish-core/lib/cable.hpp2
-rw-r--r--redfish-core/lib/certificate_service.hpp36
-rw-r--r--redfish-core/lib/chassis.hpp18
-rw-r--r--redfish-core/lib/environment_metrics.hpp2
-rw-r--r--redfish-core/lib/ethernet.hpp50
-rw-r--r--redfish-core/lib/event_service.hpp2
-rw-r--r--redfish-core/lib/fabric.hpp3
-rw-r--r--redfish-core/lib/fabric_adapters.hpp2
-rw-r--r--redfish-core/lib/fabric_ports.hpp6
-rw-r--r--redfish-core/lib/fan.hpp5
-rw-r--r--redfish-core/lib/hypervisor_system.hpp32
-rw-r--r--redfish-core/lib/led.hpp11
-rw-r--r--redfish-core/lib/log_services.hpp10
-rw-r--r--redfish-core/lib/managers.hpp2
-rw-r--r--redfish-core/lib/memory.hpp4
-rw-r--r--redfish-core/lib/metric_report_definition.hpp34
-rw-r--r--redfish-core/lib/network_adapter.hpp21
-rw-r--r--redfish-core/lib/network_protocol.hpp5
-rw-r--r--redfish-core/lib/openbmc/openbmc_managers.hpp10
-rw-r--r--redfish-core/lib/pcie.hpp8
-rw-r--r--redfish-core/lib/pcie_slots.hpp5
-rw-r--r--redfish-core/lib/power.hpp11
-rw-r--r--redfish-core/lib/power_supply.hpp4
-rw-r--r--redfish-core/lib/processor.hpp8
-rw-r--r--redfish-core/lib/redfish_util.hpp4
-rw-r--r--redfish-core/lib/sensors.hpp23
-rw-r--r--redfish-core/lib/storage.hpp8
-rw-r--r--redfish-core/lib/storage_chassis.hpp13
-rw-r--r--redfish-core/lib/storage_controller.hpp4
-rw-r--r--redfish-core/lib/switch_port.hpp24
-rw-r--r--redfish-core/lib/systems.hpp94
-rw-r--r--redfish-core/lib/trigger.hpp20
-rw-r--r--redfish-core/lib/update_service.hpp29
-rw-r--r--redfish-core/lib/virtual_media.hpp24
-rw-r--r--redfish-core/src/dbus_log_watcher.cpp4
-rw-r--r--src/dbus_utility.cpp10
57 files changed, 336 insertions, 395 deletions
diff --git a/docs/COMMON_ERRORS.md b/docs/COMMON_ERRORS.md
index d34c45e224..b25dd74404 100644
--- a/docs/COMMON_ERRORS.md
+++ b/docs/COMMON_ERRORS.md
@@ -301,9 +301,8 @@ avoid doing direct string containment matching. Doing so can lead to errors
where fan1 and fan11 both report to the same object, and cause behavior breaks
in subtle ways.
-When using dbus paths, rely on the methods on `sdbusplus::message::object_path`.
-When parsing HTTP field and lists, use the RFC7230 implementations from
-boost::beast.
+When using dbus paths, rely on the methods on `sdbusplus::object_path`. When
+parsing HTTP field and lists, use the RFC7230 implementations from boost::beast.
Other commonly misused methods are: boost::iequals. Unless the standard you're
implementing (as is the case in some HTTP fields) requires case insensitive
diff --git a/features/google/google_service_root.hpp b/features/google/google_service_root.hpp
index 4945bb424b..d4d719c8d9 100644
--- a/features/google/google_service_root.hpp
+++ b/features/google/google_service_root.hpp
@@ -87,7 +87,7 @@ inline void hothGetSubtreeCallback(
}
for (const auto& [path, services] : subtree)
{
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
if (objPath.filename() != rotId || services.empty())
{
continue;
diff --git a/features/openbmc_rest/image_upload.hpp b/features/openbmc_rest/image_upload.hpp
index 5b1f2cc058..ffdbde9823 100644
--- a/features/openbmc_rest/image_upload.hpp
+++ b/features/openbmc_rest/image_upload.hpp
@@ -78,7 +78,7 @@ inline void uploadImageHandler(
[asyncResp](sdbusplus::message_t& m) {
BMCWEB_LOG_DEBUG("Match fired");
- sdbusplus::message::object_path path;
+ sdbusplus::object_path path;
dbus::utility::DBusInterfacesMap interfaces;
m.read(path, interfaces);
diff --git a/features/openbmc_rest/openbmc_dbus_rest.hpp b/features/openbmc_rest/openbmc_dbus_rest.hpp
index 5b12ebe744..ba98312d64 100644
--- a/features/openbmc_rest/openbmc_dbus_rest.hpp
+++ b/features/openbmc_rest/openbmc_dbus_rest.hpp
@@ -265,7 +265,7 @@ inline void getManagedObjectsForEnumerate(
BMCWEB_LOG_DEBUG(
"getManagedObjectsForEnumerate {} object_manager_path {} connection_name {}",
objectName, objectManagerPath, connectionName);
- sdbusplus::message::object_path path(objectManagerPath);
+ sdbusplus::object_path path(objectManagerPath);
dbus::utility::getManagedObjects(
connectionName, path,
[transaction, objectName,
diff --git a/features/serial/obmc_console.hpp b/features/serial/obmc_console.hpp
index 3f9c79f9c7..1a9c8c3d8a 100644
--- a/features/serial/obmc_console.hpp
+++ b/features/serial/obmc_console.hpp
@@ -303,8 +303,7 @@ inline void onOpen(crow::websocket::Connection& conn)
consoleLeaf = conn.url().segments().back();
}
std::string consolePath =
- sdbusplus::message::object_path("/xyz/openbmc_project/console") /
- consoleLeaf;
+ sdbusplus::object_path("/xyz/openbmc_project/console") / consoleLeaf;
BMCWEB_LOG_DEBUG("Console Object path = {} Request target = {}",
consolePath, conn.url().path());
diff --git a/features/virtual_media/vm_websocket.hpp b/features/virtual_media/vm_websocket.hpp
index 3065a43d2b..c830543f96 100644
--- a/features/virtual_media/vm_websocket.hpp
+++ b/features/virtual_media/vm_websocket.hpp
@@ -428,8 +428,7 @@ using SessionMap = boost::container::flat_map<crow::websocket::Connection*,
static SessionMap sessions;
inline void afterGetSocket(
- crow::websocket::Connection& conn,
- const sdbusplus::message::object_path& path,
+ crow::websocket::Connection& conn, const sdbusplus::object_path& path,
const boost::system::error_code& ec,
const dbus::utility::DBusPropertiesMap& propertiesList)
{
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index 17589c49d1..fd8c0f9661 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -47,17 +47,17 @@ using DbusVariantType = std::variant<
bool,
std::vector<uint32_t>,
std::vector<uint16_t>,
- sdbusplus::message::object_path,
+ sdbusplus::object_path,
std::tuple<uint64_t, std::vector<std::tuple<std::string, double, uint64_t>>>,
std::tuple<uint64_t, std::vector<std::tuple<std::string, std::string, double, uint64_t>>>,
- std::vector<sdbusplus::message::object_path>,
+ std::vector<sdbusplus::object_path>,
std::vector<std::tuple<std::string, std::string>>,
std::vector<std::tuple<uint32_t, std::vector<uint32_t>>>,
std::vector<std::tuple<uint32_t, size_t>>,
std::vector<std::tuple<
- std::vector<std::tuple<sdbusplus::message::object_path, std::string>>,
+ std::vector<std::tuple<sdbusplus::object_path, std::string>>,
std::string, std::string, uint64_t>>,
- std::vector<std::pair<sdbusplus::message::object_path, std::string>>,
+ std::vector<std::pair<sdbusplus::object_path, std::string>>,
std::vector<std::tuple<std::string, uint64_t, std::string, double>>,
std::vector<std::tuple<std::string, std::string, uint64_t, std::string>>
>;
@@ -67,7 +67,7 @@ using DBusPropertiesMap = std::vector<std::pair<std::string, DbusVariantType>>;
using DBusInterfacesMap =
std::vector<std::pair<std::string, DBusPropertiesMap>>;
using ManagedObjectType =
- std::vector<std::pair<sdbusplus::message::object_path, DBusInterfacesMap>>;
+ std::vector<std::pair<sdbusplus::object_path, DBusInterfacesMap>>;
// Map of service name to list of interfaces
using MapperServiceMap =
@@ -164,15 +164,15 @@ void getSubTreePaths(
const MapperGetSubTreePathsResponse&)>&& callback);
void getAssociatedSubTree(
- const sdbusplus::message::object_path& associatedPath,
- const sdbusplus::message::object_path& path, int32_t depth,
+ const sdbusplus::object_path& associatedPath,
+ const sdbusplus::object_path& path, int32_t depth,
std::span<const std::string_view> interfaces,
std::function<void(const boost::system::error_code&,
const MapperGetSubTreeResponse&)>&& callback);
void getAssociatedSubTreePaths(
- const sdbusplus::message::object_path& associatedPath,
- const sdbusplus::message::object_path& path, int32_t depth,
+ const sdbusplus::object_path& associatedPath,
+ const sdbusplus::object_path& path, int32_t depth,
std::span<const std::string_view> interfaces,
std::function<void(const boost::system::error_code&,
const MapperGetSubTreePathsResponse&)>&& callback);
@@ -204,7 +204,7 @@ void getAssociationEndPoints(
const MapperEndPoints&)>&& callback);
void getManagedObjects(
- const std::string& service, const sdbusplus::message::object_path& path,
+ const std::string& service, const sdbusplus::object_path& path,
std::function<void(const boost::system::error_code&,
const ManagedObjectType&)>&& callback);
} // namespace utility
diff --git a/include/user_monitor.hpp b/include/user_monitor.hpp
index f1a5ad14a2..5431e3bb44 100644
--- a/include/user_monitor.hpp
+++ b/include/user_monitor.hpp
@@ -15,7 +15,7 @@ namespace bmcweb
inline void onUserRemoved(sdbusplus::message_t& msg)
{
- auto p = msg.unpack<sdbusplus::message::object_path>();
+ auto p = msg.unpack<sdbusplus::object_path>();
std::string username = p.filename();
persistent_data::SessionStore::getInstance().removeSessionsByUsername(
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 0917d8628d..42e02d02a4 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -944,7 +944,7 @@ class RedfishAggregator
satelliteInfo.emplace(prefix, source.url);
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/inventory");
+ sdbusplus::object_path path("/xyz/openbmc_project/inventory");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.EntityManager", path,
[handler{std::move(handler)},
diff --git a/redfish-core/include/snmp_trap_event_clients.hpp b/redfish-core/include/snmp_trap_event_clients.hpp
index 595ba967b0..ee68c3bc37 100644
--- a/redfish-core/include/snmp_trap_event_clients.hpp
+++ b/redfish-core/include/snmp_trap_event_clients.hpp
@@ -109,7 +109,7 @@ inline void getSnmpTrapClient(
for (const auto& objpath : resp)
{
- sdbusplus::message::object_path path(objpath.first);
+ sdbusplus::object_path path(objpath.first);
const std::string snmpId = path.filename();
if (snmpId.empty())
{
@@ -164,7 +164,7 @@ inline void afterSnmpClientCreate(
messages::internalError(asyncResp->res);
return;
}
- sdbusplus::message::object_path path(dbusSNMPid);
+ sdbusplus::object_path path(dbusSNMPid);
const std::string snmpId = path.filename();
if (snmpId.empty())
{
@@ -222,9 +222,8 @@ inline void deleteSnmpTrapClient(
// request is "snmp1", which will be "1" after being erased.
snmpTrapId.remove_prefix(4);
- sdbusplus::message::object_path snmpPath =
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/network/snmp/manager") /
+ sdbusplus::object_path snmpPath =
+ sdbusplus::object_path("/xyz/openbmc_project/network/snmp/manager") /
std::string(snmpTrapId);
dbus::utility::async_method_call(
diff --git a/redfish-core/include/utils/chassis_utils.hpp b/redfish-core/include/utils/chassis_utils.hpp
index bc856a6a03..d63f6c66b7 100644
--- a/redfish-core/include/utils/chassis_utils.hpp
+++ b/redfish-core/include/utils/chassis_utils.hpp
@@ -55,7 +55,7 @@ void getValidChassisPath(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
std::optional<std::string> chassisPath;
for (const std::string& chassis : chassisPaths)
{
- sdbusplus::message::object_path path(chassis);
+ sdbusplus::object_path path(chassis);
std::string chassisName = path.filename();
if (chassisName.empty())
{
diff --git a/redfish-core/include/utils/collection.hpp b/redfish-core/include/utils/collection.hpp
index 07c9241b99..844ee5fa57 100644
--- a/redfish-core/include/utils/collection.hpp
+++ b/redfish-core/include/utils/collection.hpp
@@ -84,7 +84,7 @@ inline void handleCollectionMembers(
std::vector<std::string> pathNames;
for (const auto& object : objects)
{
- sdbusplus::message::object_path path(object);
+ sdbusplus::object_path path(object);
std::string leaf = path.filename();
if (leaf.empty())
{
diff --git a/redfish-core/include/utils/dbus_utils.hpp b/redfish-core/include/utils/dbus_utils.hpp
index 008fef2c95..dde723bef0 100644
--- a/redfish-core/include/utils/dbus_utils.hpp
+++ b/redfish-core/include/utils/dbus_utils.hpp
@@ -54,7 +54,7 @@ template <typename PropertyType>
void setDbusProperty(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
std::string_view redfishPropertyName, std::string_view processName,
- const sdbusplus::message::object_path& path, std::string_view interface,
+ const sdbusplus::object_path& path, std::string_view interface,
std::string_view dbusProperty, const PropertyType& prop)
{
std::string processNameStr(processName);
@@ -75,7 +75,7 @@ void setDbusProperty(
template <typename DbusPropertyType>
void setDbusPropertyAction(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- std::string_view processName, const sdbusplus::message::object_path& path,
+ std::string_view processName, const sdbusplus::object_path& path,
std::string_view interface, std::string_view dbusProperty,
std::string_view redfishActionParameterName,
std::string_view redfishActionName, const DbusPropertyType& prop)
diff --git a/redfish-core/include/utils/eventlog_utils.hpp b/redfish-core/include/utils/eventlog_utils.hpp
index 207f4b5900..96e87eb34a 100644
--- a/redfish-core/include/utils/eventlog_utils.hpp
+++ b/redfish-core/include/utils/eventlog_utils.hpp
@@ -693,7 +693,7 @@ inline void dBusEventLogEntryCollection(
// DBus implementation of EventLog/Entries
// Make call to Logging Service to find all log entry objects
- sdbusplus::message::object_path path("/xyz/openbmc_project/logging");
+ sdbusplus::object_path path("/xyz/openbmc_project/logging");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Logging", path,
[asyncResp, collectionStr, memberId,
@@ -852,8 +852,7 @@ inline void downloadEventLogEntry(
const std::string& entryID, const std::string& downloadEntryType)
{
std::string entryPath =
- sdbusplus::message::object_path("/xyz/openbmc_project/logging/entry") /
- entryID;
+ sdbusplus::object_path("/xyz/openbmc_project/logging/entry") / entryID;
auto downloadEventLogEntryHandler =
[asyncResp, entryID,
diff --git a/redfish-core/include/utils/fan_utils.hpp b/redfish-core/include/utils/fan_utils.hpp
index 6918bb0f0a..e9b0397e18 100644
--- a/redfish-core/include/utils/fan_utils.hpp
+++ b/redfish-core/include/utils/fan_utils.hpp
@@ -70,16 +70,15 @@ inline void afterGetFanSensorObjects(
inline void getFanSensorObjects(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const sdbusplus::message::object_path& fanPath,
+ const sdbusplus::object_path& fanPath,
const std::function<void(
const std::vector<std::pair<std::string, std::string>>&)>& callback)
{
- sdbusplus::message::object_path endpointPath{fanPath};
+ sdbusplus::object_path endpointPath{fanPath};
endpointPath /= "sensors";
dbus::utility::getAssociatedSubTree(
- endpointPath,
- sdbusplus::message::object_path("/xyz/openbmc_project/sensors"), 0,
+ endpointPath, sdbusplus::object_path("/xyz/openbmc_project/sensors"), 0,
sensorInterface,
std::bind_front(afterGetFanSensorObjects, asyncResp, callback));
}
@@ -90,13 +89,12 @@ inline void getFanPaths(
const std::function<void(const dbus::utility::MapperGetSubTreePathsResponse&
fanPaths)>& callback)
{
- sdbusplus::message::object_path endpointPath{validChassisPath};
+ sdbusplus::object_path endpointPath{validChassisPath};
endpointPath /= "cooled_by";
dbus::utility::getAssociatedSubTreePaths(
- endpointPath,
- sdbusplus::message::object_path("/xyz/openbmc_project/inventory"), 0,
- fanInterface,
+ endpointPath, sdbusplus::object_path("/xyz/openbmc_project/inventory"),
+ 0, fanInterface,
[asyncResp, callback](
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreePathsResponse& subtreePaths) {
diff --git a/redfish-core/include/utils/sensor_utils.hpp b/redfish-core/include/utils/sensor_utils.hpp
index a80315da03..c170afb24b 100644
--- a/redfish-core/include/utils/sensor_utils.hpp
+++ b/redfish-core/include/utils/sensor_utils.hpp
@@ -139,7 +139,7 @@ class InventoryItem
explicit InventoryItem(const std::string& objPath) : objectPath(objPath)
{
// Set inventory item name to last node of object path
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
name = path.filename();
if (name.empty())
{
@@ -320,7 +320,7 @@ using Readings = std::vector<Reading>;
using Statistics = std::tuple<uint64_t, Readings>;
// represents sensor's path, its metadata
using SensorPaths =
- std::vector<std::tuple<sdbusplus::message::object_path, std::string>>;
+ std::vector<std::tuple<sdbusplus::object_path, std::string>>;
// represents reading parameters for statistics readings
using ReadingParameters =
std::vector<std::tuple<SensorPaths, std::string, std::string, uint64_t>>;
@@ -1093,7 +1093,7 @@ inline bool objectExcerptToJson(
return false;
}
- sdbusplus::message::object_path sensorPath(path);
+ sdbusplus::object_path sensorPath(path);
std::string sensorName = sensorPath.filename();
std::string sensorType = sensorPath.parent_path().filename();
if (sensorName.empty() || sensorType.empty())
@@ -1131,11 +1131,11 @@ inline void getAllSensorObjects(
std::function<void(const boost::system::error_code& ec,
SensorServicePathList&)>&& callback)
{
- sdbusplus::message::object_path endpointPath{associatedPath};
+ sdbusplus::object_path endpointPath{associatedPath};
endpointPath /= "all_sensors";
dbus::utility::getAssociatedSubTree(
- endpointPath, sdbusplus::message::object_path(path), depth, interfaces,
+ endpointPath, sdbusplus::object_path(path), depth, interfaces,
[callback = std::move(callback)](
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index ed1ffc2d2a..c2c35840ca 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -43,19 +43,19 @@ constexpr const char* biosPurpose =
constexpr const char* bmcPurpose =
"xyz.openbmc_project.Software.Version.VersionPurpose.BMC";
-inline std::optional<sdbusplus::message::object_path> getFunctionalSoftwarePath(
+inline std::optional<sdbusplus::object_path> getFunctionalSoftwarePath(
const std::string& swType)
{
if (swType == bmcPurpose)
{
if constexpr (BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS)
{
- return sdbusplus::message::object_path(
+ return sdbusplus::object_path(
"/xyz/openbmc_project/software/bmc/functional");
}
else
{
- return sdbusplus::message::object_path(
+ return sdbusplus::object_path(
"/xyz/openbmc_project/software/functional");
}
}
@@ -63,12 +63,12 @@ inline std::optional<sdbusplus::message::object_path> getFunctionalSoftwarePath(
{
if constexpr (BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS)
{
- return sdbusplus::message::object_path(
+ return sdbusplus::object_path(
"/xyz/openbmc_project/software/bios/functional");
}
else
{
- return sdbusplus::message::object_path(
+ return sdbusplus::object_path(
"/xyz/openbmc_project/software/functional");
}
}
@@ -194,7 +194,7 @@ inline void afterGetSubtree(
std::vector<std::pair<std::string, std::vector<std::string>>>>&
obj : subtree)
{
- sdbusplus::message::object_path path(obj.first);
+ sdbusplus::object_path path(obj.first);
std::string swId = path.filename();
if (swId.empty())
{
@@ -260,7 +260,7 @@ inline void afterAssociatedEndpoints(
// "/xyz/openbmc_project/software/230fb078"
for (const auto& sw : functionalSw)
{
- sdbusplus::message::object_path path(sw);
+ sdbusplus::object_path path(sw);
std::string leaf = path.filename();
if (leaf.empty())
{
@@ -393,7 +393,7 @@ inline void getSwMinimumVersion(
{
BMCWEB_LOG_DEBUG("getSwMinimumVersion: svc {}, swId {}", dbusSvc, *swId);
- sdbusplus::message::object_path path("/xyz/openbmc_project/software");
+ sdbusplus::object_path path("/xyz/openbmc_project/software");
path /= *swId;
dbus::utility::getProperty<std::string>(
@@ -486,8 +486,7 @@ inline void handleUpdateableEndpoints(
// so don't throw error here.
return;
}
- sdbusplus::message::object_path reqSwObjPath(
- "/xyz/openbmc_project/software");
+ sdbusplus::object_path reqSwObjPath("/xyz/openbmc_project/software");
reqSwObjPath = reqSwObjPath / *swId;
if (std::ranges::find(objPaths, reqSwObjPath.str) != objPaths.end())
@@ -535,8 +534,7 @@ inline void getSwUpdatableStatus(
{
if constexpr (BMCWEB_REDFISH_UPDATESERVICE_USE_DBUS)
{
- sdbusplus::message::object_path swObjectPath(
- "/xyz/openbmc_project/software");
+ sdbusplus::object_path swObjectPath("/xyz/openbmc_project/software");
swObjectPath = swObjectPath / *swId;
constexpr std::array<std::string_view, 1> interfaces = {
"xyz.openbmc_project.Software.Update"};
diff --git a/redfish-core/include/utils/systems_utils.hpp b/redfish-core/include/utils/systems_utils.hpp
index 288364798e..4d0df0abfc 100644
--- a/redfish-core/include/utils/systems_utils.hpp
+++ b/redfish-core/include/utils/systems_utils.hpp
@@ -77,7 +77,7 @@ inline void handleSystemCollectionMembers(
std::vector<std::string> pathNames;
for (const auto& object : objects)
{
- sdbusplus::message::object_path path(object);
+ sdbusplus::object_path path(object);
std::string leaf = path.filename();
if (leaf.empty())
{
@@ -148,7 +148,7 @@ inline void afterGetComputerSystemSubTreePaths(
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreePathsResponse& objects)
{
- sdbusplus::message::object_path systemPath;
+ sdbusplus::object_path systemPath;
if (ec)
{
if (ec.value() == boost::system::errc::io_error)
@@ -165,7 +165,7 @@ inline void afterGetComputerSystemSubTreePaths(
}
const auto& found = std::ranges::find_if(
- objects, [systemName](const sdbusplus::message::object_path& path) {
+ objects, [systemName](const sdbusplus::object_path& path) {
return path.filename() == systemName;
});
@@ -216,10 +216,10 @@ inline void getComputerSystemIndex(
}
}
-inline sdbusplus::message::object_path getHostStateObjectPath(
+inline sdbusplus::object_path getHostStateObjectPath(
const uint64_t computerSystemIndex)
{
- const sdbusplus::message::object_path hostStatePath(
+ const sdbusplus::object_path hostStatePath(
"/xyz/openbmc_project/state/host" +
std::to_string(computerSystemIndex));
@@ -237,10 +237,10 @@ inline std::string getHostStateServiceName(const uint64_t computerSystemIndex)
return hostStateService;
}
-inline sdbusplus::message::object_path getChassisStateObjectPath(
+inline sdbusplus::object_path getChassisStateObjectPath(
const uint64_t computerSystemIndex)
{
- const sdbusplus::message::object_path chassisStatePath(
+ const sdbusplus::object_path chassisStatePath(
"/xyz/openbmc_project/state/chassis" +
std::to_string(computerSystemIndex));
@@ -281,7 +281,7 @@ inline void afterGetValidSystemsPath(
for (const std::string& system : systemsPaths)
{
- sdbusplus::message::object_path path(system);
+ sdbusplus::object_path path(system);
if (path.filename() == systemId)
{
callback(path);
@@ -336,7 +336,7 @@ inline bool indexMatchingSubTreeMapObjectPath(
for (const auto& obj : subtree)
{
std::string tmp = host;
- const sdbusplus::message::object_path path{obj.first};
+ const sdbusplus::object_path path{obj.first};
const std::string serv = obj.second.begin()->first;
if (path.str.empty() || obj.second.size() != 1)
diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
index df71027b88..4490a4a4fa 100644
--- a/redfish-core/include/utils/telemetry_utils.hpp
+++ b/redfish-core/include/utils/telemetry_utils.hpp
@@ -32,14 +32,14 @@ constexpr const char* reportInterface = "xyz.openbmc_project.Telemetry.Report";
inline std::string getDbusReportPath(std::string_view id)
{
- sdbusplus::message::object_path reportsPath(
+ sdbusplus::object_path reportsPath(
"/xyz/openbmc_project/Telemetry/Reports/TelemetryService");
return {reportsPath / id};
}
inline std::string getDbusTriggerPath(std::string_view id)
{
- sdbusplus::message::object_path triggersPath(
+ sdbusplus::object_path triggersPath(
"/xyz/openbmc_project/Telemetry/Triggers/TelemetryService");
return {triggersPath / id};
}
@@ -47,7 +47,7 @@ inline std::string getDbusTriggerPath(std::string_view id)
inline std::optional<std::string> getTriggerIdFromDbusPath(
const std::string& dbusPath)
{
- sdbusplus::message::object_path converted(dbusPath);
+ sdbusplus::object_path converted(dbusPath);
if (converted.parent_path() !=
"/xyz/openbmc_project/Telemetry/Triggers/TelemetryService")
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 63225b67d1..a91d707fdc 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -561,7 +561,7 @@ inline void getLDAPConfigData(const std::string& ldapType,
return;
}
std::string service = resp.begin()->first;
- sdbusplus::message::object_path path(ldapRootObject);
+ sdbusplus::object_path path(ldapRootObject);
dbus::utility::getManagedObjects(
service, path,
[callback, ldapType](const boost::system::error_code& ec2,
@@ -1215,7 +1215,7 @@ inline void updateUserProperties(
const std::optional<std::vector<std::string>>& accountTypes, bool userSelf,
const std::shared_ptr<persistent_data::UserSession>& session)
{
- sdbusplus::message::object_path tempObjPath(rootUserDbusPath);
+ sdbusplus::object_path tempObjPath(rootUserDbusPath);
tempObjPath /= username;
std::string dbusObjectPath(tempObjPath);
@@ -1283,7 +1283,7 @@ inline void handleAccountServiceClientCertificatesInstanceGet(
"/redfish/v1/AccountService/MultiFactorAuth/ClientCertificate/Certificates/{}",
id);
std::string objPath =
- sdbusplus::message::object_path(certs::authorityObjectPath) / id;
+ sdbusplus::object_path(certs::authorityObjectPath) / id;
getCertificateProperties(
asyncResp, objPath,
"xyz.openbmc_project.Certs.Manager.Authority.Truststore", id, certURL,
@@ -1648,11 +1648,11 @@ inline void handleAccountServicePatch(
if (minPasswordLength)
{
- setDbusProperty(
- asyncResp, "MinPasswordLength", "xyz.openbmc_project.User.Manager",
- sdbusplus::message::object_path("/xyz/openbmc_project/user"),
- "xyz.openbmc_project.User.AccountPolicy", "MinPasswordLength",
- *minPasswordLength);
+ setDbusProperty(asyncResp, "MinPasswordLength",
+ "xyz.openbmc_project.User.Manager",
+ sdbusplus::object_path("/xyz/openbmc_project/user"),
+ "xyz.openbmc_project.User.AccountPolicy",
+ "MinPasswordLength", *minPasswordLength);
}
if (maxPasswordLength)
@@ -1668,21 +1668,19 @@ inline void handleAccountServicePatch(
if (unlockTimeout)
{
- setDbusProperty(
- asyncResp, "AccountLockoutDuration",
- "xyz.openbmc_project.User.Manager",
- sdbusplus::message::object_path("/xyz/openbmc_project/user"),
- "xyz.openbmc_project.User.AccountPolicy", "AccountUnlockTimeout",
- *unlockTimeout);
+ setDbusProperty(asyncResp, "AccountLockoutDuration",
+ "xyz.openbmc_project.User.Manager",
+ sdbusplus::object_path("/xyz/openbmc_project/user"),
+ "xyz.openbmc_project.User.AccountPolicy",
+ "AccountUnlockTimeout", *unlockTimeout);
}
if (lockoutThreshold)
{
- setDbusProperty(
- asyncResp, "AccountLockoutThreshold",
- "xyz.openbmc_project.User.Manager",
- sdbusplus::message::object_path("/xyz/openbmc_project/user"),
- "xyz.openbmc_project.User.AccountPolicy",
- "MaxLoginAttemptBeforeLockout", *lockoutThreshold);
+ setDbusProperty(asyncResp, "AccountLockoutThreshold",
+ "xyz.openbmc_project.User.Manager",
+ sdbusplus::object_path("/xyz/openbmc_project/user"),
+ "xyz.openbmc_project.User.AccountPolicy",
+ "MaxLoginAttemptBeforeLockout", *lockoutThreshold);
}
}
@@ -1733,7 +1731,7 @@ inline void handleAccountCollectionGet(
{
thisUser = req.session->username;
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/user");
+ sdbusplus::object_path path("/xyz/openbmc_project/user");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.User.Manager", path,
[asyncResp, thisUser, effectiveUserPrivileges](
@@ -1801,7 +1799,7 @@ inline void processAfterCreateUser(
// created, but the password set
// failed.Something is wrong, so delete the user
// that we've already created
- sdbusplus::message::object_path tempObjPath(rootUserDbusPath);
+ sdbusplus::object_path tempObjPath(rootUserDbusPath);
tempObjPath /= username;
const std::string userPath(tempObjPath);
@@ -2029,7 +2027,7 @@ inline void handleAccountGet(
}
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/user");
+ sdbusplus::object_path path("/xyz/openbmc_project/user");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.User.Manager", path,
[asyncResp,
@@ -2043,7 +2041,7 @@ inline void handleAccountGet(
const auto userIt = std::ranges::find_if(
users,
[accountName](
- const std::pair<sdbusplus::message::object_path,
+ const std::pair<sdbusplus::object_path,
dbus::utility::DBusInterfacesMap>& user) {
return accountName == user.first.filename();
});
@@ -2174,7 +2172,7 @@ inline void handleAccountDelete(
messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
return;
}
- sdbusplus::message::object_path tempObjPath(rootUserDbusPath);
+ sdbusplus::object_path tempObjPath(rootUserDbusPath);
tempObjPath /= username;
const std::string userPath(tempObjPath);
diff --git a/redfish-core/lib/assembly.hpp b/redfish-core/lib/assembly.hpp
index 5a29055cb5..b4a6cbb925 100644
--- a/redfish-core/lib/assembly.hpp
+++ b/redfish-core/lib/assembly.hpp
@@ -202,7 +202,7 @@ inline void getAssemblyProperties(
"/redfish/v1/Chassis/{}/Assembly#/Assemblies/{}", chassisId,
std::to_string(assemblyIndex));
item["MemberId"] = std::to_string(assemblyIndex);
- item["Name"] = sdbusplus::message::object_path(assembly).filename();
+ item["Name"] = sdbusplus::object_path(assembly).filename();
asyncResp->res.jsonValue["Assemblies"].emplace_back(item);
diff --git a/redfish-core/lib/cable.hpp b/redfish-core/lib/cable.hpp
index 4927916169..87ada35737 100644
--- a/redfish-core/lib/cable.hpp
+++ b/redfish-core/lib/cable.hpp
@@ -174,7 +174,7 @@ inline void afterHandleCableGet(
for (const auto& [objectPath, serviceMap] : subtree)
{
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
if (path.filename() != cableId)
{
continue;
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index a18df0b7ad..6af003c59c 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -273,7 +273,7 @@ inline void getCertificateList(
links = nlohmann::json::array();
for (const auto& certPath : certPaths)
{
- sdbusplus::message::object_path objPath(certPath);
+ sdbusplus::object_path objPath(certPath);
std::string certId = objPath.filename();
if (certId.empty())
{
@@ -418,8 +418,7 @@ inline void getCertificateProperties(
inline void deleteCertificate(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service,
- const sdbusplus::message::object_path& objectPath)
+ const std::string& service, const sdbusplus::object_path& objectPath)
{
dbus::utility::async_method_call(
asyncResp,
@@ -570,15 +569,14 @@ inline void handleReplaceCertificateAction(
}
std::string id;
- sdbusplus::message::object_path objectPath;
+ sdbusplus::object_path objectPath;
std::string name;
std::string service;
if (crow::utility::readUrlSegments(*parsedUrl, "redfish", "v1", "Managers",
"bmc", "NetworkProtocol", "HTTPS",
"Certificates", std::ref(id)))
{
- objectPath = sdbusplus::message::object_path(certs::httpsObjectPath) /
- id;
+ objectPath = sdbusplus::object_path(certs::httpsObjectPath) / id;
name = "HTTPS certificate";
service = certs::httpsServiceName;
}
@@ -586,8 +584,7 @@ inline void handleReplaceCertificateAction(
"AccountService", "LDAP",
"Certificates", std::ref(id)))
{
- objectPath = sdbusplus::message::object_path(certs::ldapObjectPath) /
- id;
+ objectPath = sdbusplus::object_path(certs::ldapObjectPath) / id;
name = "LDAP certificate";
service = certs::ldapServiceName;
}
@@ -595,8 +592,7 @@ inline void handleReplaceCertificateAction(
"Managers", "bmc", "Truststore",
"Certificates", std::ref(id)))
{
- objectPath =
- sdbusplus::message::object_path(certs::authorityObjectPath) / id;
+ objectPath = sdbusplus::object_path(certs::authorityObjectPath) / id;
name = "TrustStore certificate";
service = certs::authorityServiceName;
}
@@ -881,7 +877,7 @@ inline void handleGenerateCSRAction(
timeout.cancel();
dbus::utility::DBusInterfacesMap interfacesProperties;
- sdbusplus::message::object_path csrObjectPath;
+ sdbusplus::object_path csrObjectPath;
m.read(csrObjectPath, interfacesProperties);
BMCWEB_LOG_DEBUG("CSR object added{}", csrObjectPath.str);
for (const auto& interface : interfacesProperties)
@@ -1013,7 +1009,7 @@ inline void handleHTTPSCertificateCollectionPost(
return;
}
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
std::string certId = path.filename();
const boost::urls::url certURL = boost::urls::format(
"/redfish/v1/Managers/{}/NetworkProtocol/HTTPS/Certificates/{}",
@@ -1049,7 +1045,7 @@ inline void handleHTTPSCertificateGet(
"/redfish/v1/Managers/{}/NetworkProtocol/HTTPS/Certificates/{}",
BMCWEB_REDFISH_MANAGER_URI_NAME, certId);
std::string objPath =
- sdbusplus::message::object_path(certs::httpsObjectPath) / certId;
+ sdbusplus::object_path(certs::httpsObjectPath) / certId;
getCertificateProperties(asyncResp, objPath, certs::httpsServiceName,
certId, certURL, "HTTPS Certificate");
}
@@ -1129,7 +1125,7 @@ inline void handleLDAPCertificateCollectionPost(
return;
}
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
std::string certId = path.filename();
const boost::urls::url certURL = boost::urls::format(
"/redfish/v1/AccountService/LDAP/Certificates/{}", certId);
@@ -1155,8 +1151,7 @@ inline void handleLDAPCertificateGet(
BMCWEB_LOG_DEBUG("LDAP Certificate ID={}", id);
const boost::urls::url certURL = boost::urls::format(
"/redfish/v1/AccountService/LDAP/Certificates/{}", id);
- std::string objPath =
- sdbusplus::message::object_path(certs::ldapObjectPath) / id;
+ std::string objPath = sdbusplus::object_path(certs::ldapObjectPath) / id;
getCertificateProperties(asyncResp, objPath, certs::ldapServiceName, id,
certURL, "LDAP Certificate");
}
@@ -1171,8 +1166,7 @@ inline void handleLDAPCertificateDelete(
}
BMCWEB_LOG_DEBUG("Delete LDAP Certificate ID={}", id);
- std::string objPath =
- sdbusplus::message::object_path(certs::ldapObjectPath) / id;
+ std::string objPath = sdbusplus::object_path(certs::ldapObjectPath) / id;
deleteCertificate(asyncResp, certs::ldapServiceName, objPath);
}
@@ -1268,7 +1262,7 @@ inline void handleTrustStoreCertificateCollectionPost(
return;
}
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
std::string certId = path.filename();
const boost::urls::url certURL = boost::urls::format(
"/redfish/v1/Managers/{}/Truststore/Certificates/{}",
@@ -1304,7 +1298,7 @@ inline void handleTrustStoreCertificateGet(
"/redfish/v1/Managers/{}/Truststore/Certificates/{}",
BMCWEB_REDFISH_MANAGER_URI_NAME, certId);
std::string objPath =
- sdbusplus::message::object_path(certs::authorityObjectPath) / certId;
+ sdbusplus::object_path(certs::authorityObjectPath) / certId;
getCertificateProperties(asyncResp, objPath, certs::authorityServiceName,
certId, certURL, "TrustStore Certificate");
}
@@ -1327,7 +1321,7 @@ inline void handleTrustStoreCertificateDelete(
BMCWEB_LOG_DEBUG("Delete TrustStore Certificate ID={}", certId);
std::string objPath =
- sdbusplus::message::object_path(certs::authorityObjectPath) / certId;
+ sdbusplus::object_path(certs::authorityObjectPath) / certId;
deleteCertificate(asyncResp, certs::authorityServiceName, objPath);
}
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 9ae4b6c547..f51955d03b 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -110,7 +110,7 @@ inline chassis::ChassisType translateChassisTypeToRedfish(
* @return None.
*/
inline void getStorageLink(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const sdbusplus::message::object_path& path)
+ const sdbusplus::object_path& path)
{
dbus::utility::getProperty<std::vector<std::string>>(
"xyz.openbmc_project.ObjectMapper", (path / "storage").str,
@@ -126,8 +126,7 @@ inline void getStorageLink(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
nlohmann::json::array_t storages;
for (const std::string& storagePath : storageList)
{
- std::string id =
- sdbusplus::message::object_path(storagePath).filename();
+ std::string id = sdbusplus::object_path(storagePath).filename();
if (id.empty())
{
continue;
@@ -305,8 +304,7 @@ inline void getChassisContainedBy(
return;
}
- sdbusplus::message::object_path upstreamChassisPath(
- upstreamChassisPaths[0]);
+ sdbusplus::object_path upstreamChassisPath(upstreamChassisPaths[0]);
std::string upstreamChassis = upstreamChassisPath.filename();
if (upstreamChassis.empty())
{
@@ -345,7 +343,7 @@ inline void getChassisContains(
}
for (const auto& p : downstreamChassisPaths)
{
- sdbusplus::message::object_path downstreamChassisPath(p);
+ sdbusplus::object_path downstreamChassisPath(p);
std::string downstreamChassis = downstreamChassisPath.filename();
if (downstreamChassis.empty())
{
@@ -369,13 +367,13 @@ inline void getChassisConnectivity(
dbus::utility::getAssociatedSubTreePaths(
chassisPath + "/contained_by",
- sdbusplus::message::object_path("/xyz/openbmc_project/inventory"), 0,
+ sdbusplus::object_path("/xyz/openbmc_project/inventory"), 0,
chassisInterfaces,
std::bind_front(getChassisContainedBy, asyncResp, chassisId));
dbus::utility::getAssociatedSubTreePaths(
chassisPath + "/containing",
- sdbusplus::message::object_path("/xyz/openbmc_project/inventory"), 0,
+ sdbusplus::object_path("/xyz/openbmc_project/inventory"), 0,
chassisInterfaces,
std::bind_front(getChassisContains, asyncResp, chassisId));
}
@@ -552,7 +550,7 @@ inline void handleChassisGetSubTree(
const std::vector<std::pair<std::string, std::vector<std::string>>>&
connectionNames = object.second;
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
if (objPath.filename() != chassisId)
{
continue;
@@ -802,7 +800,7 @@ inline void handleChassisPatch(
std::pair<std::string, std::vector<std::string>>>&
connectionNames = object.second;
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
if (objPath.filename() != chassisId)
{
continue;
diff --git a/redfish-core/lib/environment_metrics.hpp b/redfish-core/lib/environment_metrics.hpp
index 81fcce0232..584253720a 100644
--- a/redfish-core/lib/environment_metrics.hpp
+++ b/redfish-core/lib/environment_metrics.hpp
@@ -254,7 +254,7 @@ inline void afterGetFanSpeedsPercent(
for (const std::string& fanPath : fanPaths)
{
- sdbusplus::message::object_path endpointPath{fanPath};
+ sdbusplus::object_path endpointPath{fanPath};
fan_utils::getFanSensorObjects(
asyncResp, endpointPath,
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index cf2ad1718b..94cbff399c 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -405,12 +405,10 @@ inline bool extractEthernetInterfaceData(
}
}
- sdbusplus::message::object_path path(
- "/xyz/openbmc_project/network");
- sdbusplus::message::object_path dhcp4Path =
- path / ethifaceId / "dhcp4";
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path dhcp4Path = path / ethifaceId / "dhcp4";
- if (sdbusplus::message::object_path(objpath.first) == dhcp4Path)
+ if (sdbusplus::object_path(objpath.first) == dhcp4Path)
{
if (ifacePair.first ==
"xyz.openbmc_project.Network.DHCPConfiguration")
@@ -457,10 +455,9 @@ inline bool extractEthernetInterfaceData(
}
}
- sdbusplus::message::object_path dhcp6Path =
- path / ethifaceId / "dhcp6";
+ sdbusplus::object_path dhcp6Path = path / ethifaceId / "dhcp6";
- if (sdbusplus::message::object_path(objpath.first) == dhcp6Path)
+ if (sdbusplus::object_path(objpath.first) == dhcp6Path)
{
if (ifacePair.first ==
"xyz.openbmc_project.Network.DHCPConfiguration")
@@ -736,8 +733,7 @@ inline void updateIPv4DefaultGateway(
{
setDbusProperty(
asyncResp, "Gateway", "xyz.openbmc_project.Network",
- sdbusplus::message::object_path("/xyz/openbmc_project/network") /
- ifaceId,
+ sdbusplus::object_path("/xyz/openbmc_project/network") / ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "DefaultGateway",
gateway);
}
@@ -900,7 +896,7 @@ inline void createIPv6(const std::string& ifaceId, uint8_t prefixLength,
const std::string& address,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
auto createIpHandler =
@@ -940,7 +936,7 @@ inline void deleteIPv6Gateway(
std::string_view ifaceId, std::string_view gatewayId,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
path /= gatewayId;
dbus::utility::async_method_call(
@@ -968,7 +964,7 @@ inline void createIPv6DefaultGateway(
std::string_view ifaceId, const std::string& gateway,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
auto createIpHandler = [asyncResp](const boost::system::error_code& ec) {
if (ec)
@@ -999,7 +995,7 @@ inline void deleteAndCreateIPv6DefaultGateway(
const std::string& gateway,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
path /= gatewayId;
dbus::utility::async_method_call(
@@ -1121,7 +1117,7 @@ template <typename CallbackFunc>
void getEthernetIfaceData(const std::string& ethifaceId,
CallbackFunc&& callback)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Network", path,
[ethifaceId{std::string{ethifaceId}},
@@ -1179,7 +1175,7 @@ void getEthernetIfaceData(const std::string& ethifaceId,
template <typename CallbackFunc>
void getEthernetIfaceList(CallbackFunc&& callback)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Network", path,
[callback = std::forward<CallbackFunc>(callback)](
@@ -1238,7 +1234,7 @@ inline void handleHostnamePatch(
}
setDbusProperty(
asyncResp, "HostName", "xyz.openbmc_project.Network",
- sdbusplus::message::object_path("/xyz/openbmc_project/network/config"),
+ sdbusplus::object_path("/xyz/openbmc_project/network/config"),
"xyz.openbmc_project.Network.SystemConfiguration", "HostName",
hostname);
}
@@ -1247,7 +1243,7 @@ inline void handleMTUSizePatch(
const std::string& ifaceId, const size_t mtuSize,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path objPath("/xyz/openbmc_project/network");
+ sdbusplus::object_path objPath("/xyz/openbmc_project/network");
objPath /= ifaceId;
setDbusProperty(asyncResp, "MTUSize", "xyz.openbmc_project.Network",
objPath, "xyz.openbmc_project.Network.EthernetInterface",
@@ -1261,8 +1257,7 @@ inline void handleDomainnamePatch(
std::vector<std::string> vectorDomainname = {domainname};
setDbusProperty(
asyncResp, "FQDN", "xyz.openbmc_project.Network",
- sdbusplus::message::object_path("/xyz/openbmc_project/network") /
- ifaceId,
+ sdbusplus::object_path("/xyz/openbmc_project/network") / ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "DomainName",
vectorDomainname);
}
@@ -1332,8 +1327,7 @@ inline void handleMACAddressPatch(
{
setDbusProperty(
asyncResp, "MACAddress", "xyz.openbmc_project.Network",
- sdbusplus::message::object_path("/xyz/openbmc_project/network") /
- ifaceId,
+ sdbusplus::object_path("/xyz/openbmc_project/network") / ifaceId,
"xyz.openbmc_project.Network.MACAddress", "MACAddress", macAddress);
}
@@ -1345,8 +1339,7 @@ inline void setDHCPEnabled(const std::string& ifaceId,
const std::string dhcp = getDhcpEnabledEnumeration(v4Value, v6Value);
setDbusProperty(
asyncResp, "DHCPv4", "xyz.openbmc_project.Network",
- sdbusplus::message::object_path("/xyz/openbmc_project/network") /
- ifaceId,
+ sdbusplus::object_path("/xyz/openbmc_project/network") / ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", propertyName, dhcp);
}
@@ -1362,7 +1355,7 @@ inline void setDHCPConfig(const std::string& propertyName, const bool& value,
{
BMCWEB_LOG_DEBUG("{} = {}", propertyName, value);
std::string redfishPropertyName;
- sdbusplus::message::object_path path("/xyz/openbmc_project/network/");
+ sdbusplus::object_path path("/xyz/openbmc_project/network/");
path /= ethifaceId;
if (type == NetworkType::dhcp4)
@@ -1385,7 +1378,7 @@ inline void handleSLAACAutoConfigPatch(
const std::string& ifaceId, bool ipv6AutoConfigEnabled,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
setDbusProperty(asyncResp,
"StatelessAddressAutoConfig/IPv6AutoConfigEnabled",
@@ -1761,8 +1754,7 @@ inline void handleStaticNameServersPatch(
{
setDbusProperty(
asyncResp, "StaticNameServers", "xyz.openbmc_project.Network",
- sdbusplus::message::object_path("/xyz/openbmc_project/network") /
- ifaceId,
+ sdbusplus::object_path("/xyz/openbmc_project/network") / ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "StaticNameServers",
updatedStaticNameServers);
}
@@ -2475,7 +2467,7 @@ inline void requestEthernetInterfacesRoutes(App& app)
setDbusProperty(
asyncResp, "InterfaceEnabled",
"xyz.openbmc_project.Network",
- sdbusplus::message::object_path(
+ sdbusplus::object_path(
"/xyz/openbmc_project/network") /
ifaceId,
"xyz.openbmc_project.Network.EthernetInterface",
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 39b166db95..50ac80f088 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -247,7 +247,7 @@ inline void doSubscriptionCollection(
nlohmann::json& memberArray = asyncResp->res.jsonValue["Members"];
for (const auto& objpath : resp)
{
- sdbusplus::message::object_path path(objpath.first);
+ sdbusplus::object_path path(objpath.first);
const std::string snmpId = path.filename();
if (snmpId.empty())
{
diff --git a/redfish-core/lib/fabric.hpp b/redfish-core/lib/fabric.hpp
index 4b0cad5f07..cae4e6ef8e 100644
--- a/redfish-core/lib/fabric.hpp
+++ b/redfish-core/lib/fabric.hpp
@@ -75,8 +75,7 @@ inline void handleFabricSwitchPaths(
for (const auto& path : object)
{
- std::string switchName =
- sdbusplus::message::object_path(path).filename();
+ std::string switchName = sdbusplus::object_path(path).filename();
if (switchName == switchId)
{
if (!switchPath.empty())
diff --git a/redfish-core/lib/fabric_adapters.hpp b/redfish-core/lib/fabric_adapters.hpp
index 7d20302d81..45270c4f93 100644
--- a/redfish-core/lib/fabric_adapters.hpp
+++ b/redfish-core/lib/fabric_adapters.hpp
@@ -165,7 +165,7 @@ inline void afterGetValidFabricAdapterPath(
for (const auto& [adapterPath, serviceMap] : subtree)
{
std::string fabricAdapterName =
- sdbusplus::message::object_path(adapterPath).filename();
+ sdbusplus::object_path(adapterPath).filename();
if (fabricAdapterName == adapterId)
{
fabricAdapterPath = adapterPath;
diff --git a/redfish-core/lib/fabric_ports.hpp b/redfish-core/lib/fabric_ports.hpp
index 524e5d2511..b983c4040d 100644
--- a/redfish-core/lib/fabric_ports.hpp
+++ b/redfish-core/lib/fabric_ports.hpp
@@ -186,8 +186,7 @@ inline void afterGetValidFabricPortPath(
}
const auto& it =
std::ranges::find_if(portSubTreePaths, [portId](const auto& portPath) {
- return portId ==
- sdbusplus::message::object_path(portPath).filename();
+ return portId == sdbusplus::object_path(portPath).filename();
});
if (it == portSubTreePaths.end())
{
@@ -377,8 +376,7 @@ inline void doHandleFabricPortCollectionGet(
std::vector<std::string> portIdNames;
for (const std::string& portPath : portSubTreePaths)
{
- std::string portId =
- sdbusplus::message::object_path(portPath).filename();
+ std::string portId = sdbusplus::object_path(portPath).filename();
if (!portId.empty())
{
portIdNames.emplace_back(std::move(portId));
diff --git a/redfish-core/lib/fan.hpp b/redfish-core/lib/fan.hpp
index 16592831db..3d95898c0e 100644
--- a/redfish-core/lib/fan.hpp
+++ b/redfish-core/lib/fan.hpp
@@ -48,8 +48,7 @@ inline void updateFanList(
nlohmann::json& fanList = asyncResp->res.jsonValue["Members"];
for (const std::string& fanPath : fanPaths)
{
- std::string fanName =
- sdbusplus::message::object_path(fanPath).filename();
+ std::string fanName = sdbusplus::object_path(fanPath).filename();
if (fanName.empty())
{
continue;
@@ -135,7 +134,7 @@ inline void handleFanCollectionGet(
inline bool checkFanId(const std::string& fanPath, const std::string& fanId)
{
- std::string fanName = sdbusplus::message::object_path(fanPath).filename();
+ std::string fanName = sdbusplus::object_path(fanPath).filename();
return !(fanName.empty() || fanName != fanId);
}
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 03b1f12091..5cfa7ce92e 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -328,7 +328,7 @@ template <typename CallbackFunc>
void getHypervisorIfaceData(const std::string& ethIfaceId,
CallbackFunc&& callback)
{
- sdbusplus::message::object_path path("/");
+ sdbusplus::object_path path("/");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Settings", path,
[ethIfaceId{std::string{ethIfaceId}},
@@ -415,12 +415,12 @@ inline void setHypervisorIPv4Gateway(
BMCWEB_LOG_DEBUG(
"Setting the DefaultGateway to the last configured gateway");
- setDbusProperty(asyncResp, "IPv4StaticAddresses/1/Gateway",
- "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/network/hypervisor"),
- "xyz.openbmc_project.Network.SystemConfiguration",
- "DefaultGateway", gateway);
+ setDbusProperty(
+ asyncResp, "IPv4StaticAddresses/1/Gateway",
+ "xyz.openbmc_project.Settings",
+ sdbusplus::object_path("/xyz/openbmc_project/network/hypervisor"),
+ "xyz.openbmc_project.Network.SystemConfiguration", "DefaultGateway",
+ gateway);
}
/**
@@ -507,8 +507,7 @@ inline void setDHCPEnabled(const std::string& ifaceId, bool ipv4DHCPEnabled,
setDbusProperty(
asyncResp, "DHCPv4/DHCPEnabled", "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/network/hypervisor") /
+ sdbusplus::object_path("/xyz/openbmc_project/network/hypervisor") /
ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "DHCPEnabled", dhcp);
@@ -610,11 +609,11 @@ inline void handleHypervisorHostnamePatch(
}
asyncResp->res.jsonValue["HostName"] = hostName;
- setDbusProperty(asyncResp, "HostName", "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/network/hypervisor"),
- "xyz.openbmc_project.Network.SystemConfiguration",
- "HostName", hostName);
+ setDbusProperty(
+ asyncResp, "HostName", "xyz.openbmc_project.Settings",
+ sdbusplus::object_path("/xyz/openbmc_project/network/hypervisor"),
+ "xyz.openbmc_project.Network.SystemConfiguration", "HostName",
+ hostName);
}
inline void setIPv4InterfaceEnabled(
@@ -664,7 +663,7 @@ inline void handleHypervisorEthernetInterfaceCollectionGet(
ifaceArray = nlohmann::json::array();
for (const std::string& iface : ifaceList)
{
- sdbusplus::message::object_path path(iface);
+ sdbusplus::object_path path(iface);
std::string name = path.filename();
if (name.empty())
{
@@ -925,8 +924,7 @@ inline void handleHypervisorSystemResetPost(
setDbusPropertyAction(
asyncResp, "xyz.openbmc_project.State.Hypervisor",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/state/hypervisor0"),
+ sdbusplus::object_path("/xyz/openbmc_project/state/hypervisor0"),
"xyz.openbmc_project.State.Host", "RequestedHostTransition",
"ResetType", "ComputerSystem.Reset", command);
}
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index a3dc1c98e7..42cef4d925 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -147,7 +147,7 @@ inline void setIndicatorLedState(
setDbusProperty(
asyncResp, "IndicatorLED",
"xyz.openbmc_project.LED.GroupManager",
- sdbusplus::message::object_path(
+ sdbusplus::object_path(
"/xyz/openbmc_project/led/groups/enclosure_identify"),
"xyz.openbmc_project.Led.Group", "Asserted", ledBlinkng);
});
@@ -236,7 +236,7 @@ inline void setSystemLocationIndicatorActive(
setDbusProperty(
asyncResp, "LocationIndicatorActive",
"xyz.openbmc_project.LED.GroupManager",
- sdbusplus::message::object_path(
+ sdbusplus::object_path(
"/xyz/openbmc_project/led/groups/enclosure_identify"),
"xyz.openbmc_project.Led.Group", "Asserted", ledState);
}
@@ -291,12 +291,11 @@ inline void getLedGroupPath(
{
static constexpr const char* ledObjectPath =
"/xyz/openbmc_project/led/groups";
- sdbusplus::message::object_path ledGroupAssociatedPath =
- objPath + "/identifying";
+ sdbusplus::object_path ledGroupAssociatedPath = objPath + "/identifying";
dbus::utility::getAssociatedSubTree(
- ledGroupAssociatedPath, sdbusplus::message::object_path(ledObjectPath),
- 0, ledGroupInterface,
+ ledGroupAssociatedPath, sdbusplus::object_path(ledObjectPath), 0,
+ ledGroupInterface,
[asyncResp, objPath, callback{std::move(callback)}](
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index e2ca01049e..4b2ab67cdc 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -255,7 +255,7 @@ inline void getDumpEntryCollection(
return;
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/dump");
+ sdbusplus::object_path path("/xyz/openbmc_project/dump");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Dump.Manager", path,
[asyncResp, entriesPath,
@@ -365,7 +365,7 @@ inline void getDumpEntryById(
return;
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/dump");
+ sdbusplus::object_path path("/xyz/openbmc_project/dump");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Dump.Manager", path,
[asyncResp, entryID, dumpType,
@@ -551,7 +551,7 @@ inline DumpCreationProgress getDumpCompletionStatus(
inline void createDumpTaskCallback(
task::Payload&& payload,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const sdbusplus::message::object_path& createdObjPath)
+ const sdbusplus::object_path& createdObjPath)
{
const std::string dumpId = createdObjPath.filename();
@@ -763,7 +763,7 @@ inline void createDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
[asyncResp, payload(task::Payload(req)),
dumpPath](const boost::system::error_code& ec,
const sdbusplus::message_t& msg,
- const sdbusplus::message::object_path& objPath) mutable {
+ const sdbusplus::object_path& objPath) mutable {
if (ec)
{
BMCWEB_LOG_ERROR("CreateDump resp_handler got error {}", ec);
@@ -1860,7 +1860,7 @@ inline void requestRoutesCrashdumpEntryCollection(App& app)
for (const std::string& path : resp)
{
- const sdbusplus::message::object_path objPath(path);
+ const sdbusplus::object_path objPath(path);
// Get the log ID
std::string logID = objPath.filename();
if (logID.empty())
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 06fe3e71aa..485cc17206 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -408,7 +408,7 @@ inline void setActiveFirmwareImage(
std::string firmwareId = runningFirmwareTarget.substr(idPos);
// Make sure the image is valid before setting priority
- sdbusplus::message::object_path objPath("/xyz/openbmc_project/software");
+ sdbusplus::object_path objPath("/xyz/openbmc_project/software");
dbus::utility::getManagedObjects(
getBMCUpdateServiceName(), objPath,
[asyncResp, firmwareId, runningFirmwareTarget](
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 36ab8eac0a..1b5dc07d01 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -744,7 +744,7 @@ inline void afterGetDimmData(
bool found = false;
for (const auto& [objectPath, serviceMap] : subtree)
{
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
bool dimmInterface = false;
bool associationInterface = false;
@@ -859,7 +859,7 @@ inline void afterGetValidDimmPath(
for (const auto& objectPath : subtree)
{
// Ignore any objects which don't end with our desired dimm name
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
if (path.filename() == dimmId)
{
callback(path);
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index 6c84497d5f..f14e75516f 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -60,9 +60,9 @@ namespace redfish
namespace telemetry
{
-using ReadingParameters = std::vector<std::tuple<
- std::vector<std::tuple<sdbusplus::message::object_path, std::string>>,
- std::string, std::string, uint64_t>>;
+using ReadingParameters = std::vector<
+ std::tuple<std::vector<std::tuple<sdbusplus::object_path, std::string>>,
+ std::string, std::string, uint64_t>>;
inline bool formatMessageOnError(crow::Response& res, const std::string& id,
const boost::system::error_code& ec)
@@ -241,11 +241,11 @@ inline std::string toDbusReportUpdates(std::string_view redfishValue)
}
inline std::optional<nlohmann::json::array_t> getLinkedTriggers(
- std::span<const sdbusplus::message::object_path> triggerPaths)
+ std::span<const sdbusplus::object_path> triggerPaths)
{
nlohmann::json::array_t triggers;
- for (const sdbusplus::message::object_path& path : triggerPaths)
+ for (const sdbusplus::object_path& path : triggerPaths)
{
if (path.parent_path() !=
"/xyz/openbmc_project/Telemetry/Triggers/TelemetryService")
@@ -283,7 +283,7 @@ inline void fillReportDefinition(
uint64_t appendLimit = 0;
uint64_t interval = 0;
bool enabled = false;
- std::vector<sdbusplus::message::object_path> triggers;
+ std::vector<sdbusplus::object_path> triggers;
const bool success = sdbusplus::unpackPropertiesNoThrow(
dbus_utils::UnpackErrorPrinter(), properties, "ReportingType",
@@ -805,8 +805,7 @@ class AddReport
for (const auto& metric : args.metrics)
{
- std::vector<
- std::tuple<sdbusplus::message::object_path, std::string>>
+ std::vector<std::tuple<sdbusplus::object_path, std::string>>
sensorParams;
sensorParams.reserve(metric.uris.size());
@@ -864,14 +863,13 @@ class AddReport
};
inline std::optional<
- std::vector<std::tuple<sdbusplus::message::object_path, std::string>>>
+ std::vector<std::tuple<sdbusplus::object_path, std::string>>>
sensorPathToUri(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
std::span<const std::string> uris,
const std::map<std::string, std::string>& metricPropertyToDbusPaths)
{
- std::vector<std::tuple<sdbusplus::message::object_path, std::string>>
- result;
+ std::vector<std::tuple<sdbusplus::object_path, std::string>> result;
for (const std::string& uri : uris)
{
@@ -929,8 +927,8 @@ inline void setReadingParams(
{
std::span<const std::string> newUris = readingParamsUris[index];
- const std::optional<std::vector<
- std::tuple<sdbusplus::message::object_path, std::string>>>
+ const std::optional<
+ std::vector<std::tuple<sdbusplus::object_path, std::string>>>
readingParam =
sensorPathToUri(asyncResp, newUris, metricPropertyToDbusPaths);
@@ -939,8 +937,8 @@ inline void setReadingParams(
return;
}
- for (const std::tuple<sdbusplus::message::object_path, std::string>&
- value : *readingParam)
+ for (const std::tuple<sdbusplus::object_path, std::string>& value :
+ *readingParam)
{
std::get<0>(readingParams[index]).emplace_back(value);
}
@@ -992,8 +990,7 @@ class UpdateMetrics
}
void emplace(
- std::span<
- const std::tuple<sdbusplus::message::object_path, std::string>>
+ std::span<const std::tuple<sdbusplus::object_path, std::string>>
pathAndUri,
const AddReportArgs::MetricArgs& metricArgs)
{
@@ -1236,8 +1233,7 @@ inline void setReportMetrics(
}
AddReportArgs::MetricArgs metricArgs;
- std::vector<
- std::tuple<sdbusplus::message::object_path, std::string>>
+ std::vector<std::tuple<sdbusplus::object_path, std::string>>
pathAndUri;
if (index < readingParams.size())
diff --git a/redfish-core/lib/network_adapter.hpp b/redfish-core/lib/network_adapter.hpp
index 8c8cf5b7e0..9619c2445d 100644
--- a/redfish-core/lib/network_adapter.hpp
+++ b/redfish-core/lib/network_adapter.hpp
@@ -49,7 +49,7 @@ inline void handleNetworkAdapterPortMetricsPathsPortMetricsGet(
continue;
}
- sdbusplus::message::object_path objectPah(path);
+ sdbusplus::object_path objectPah(path);
const std::string metricType = objectPah.parent_path().filename();
const std::string metricName = objectPah.filename();
@@ -173,7 +173,7 @@ inline void handleNetworkAdapterPortMetricsPathsPortMetricsGet(
inline void handleNetworkAdapterPortPathPortMetricsGet(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& chassisId, const std::string& networkAdapterId,
- const std::string& portId, const sdbusplus::message::object_path& portPath,
+ const std::string& portId, const sdbusplus::object_path& portPath,
[[maybe_unused]] const std::string& serviceName)
{
asyncResp->res.jsonValue["@odata.type"] = "#PortMetrics.v1_7_0.PortMetrics";
@@ -186,9 +186,8 @@ inline void handleNetworkAdapterPortPathPortMetricsGet(
const std::string associationPath = portPath / "measured_by";
dbus::utility::getAssociatedSubTree(
- associationPath,
- sdbusplus::message::object_path("/xyz/openbmc_project/metric"), 0,
- std::array<std::string_view, 1>{"xyz.openbmc_project.Metric.Value"},
+ associationPath, sdbusplus::object_path("/xyz/openbmc_project/metric"),
+ 0, std::array<std::string_view, 1>{"xyz.openbmc_project.Metric.Value"},
std::bind_front(handleNetworkAdapterPortMetricsPathsPortMetricsGet,
asyncResp));
}
@@ -237,7 +236,7 @@ inline void afterNetworkAdapterPortPaths(
std::string serviceName;
for (const auto& [path, service] : object)
{
- std::string portName = sdbusplus::message::object_path(path).filename();
+ std::string portName = sdbusplus::object_path(path).filename();
if (portName == portId)
{
portPath = path;
@@ -270,7 +269,7 @@ inline void getNetworkAdapterPortPath(
std::string associationPath = path + "/connecting";
dbus::utility::getAssociatedSubTree(
associationPath,
- sdbusplus::message::object_path{"/xyz/openbmc_project/inventory"}, 0,
+ sdbusplus::object_path{"/xyz/openbmc_project/inventory"}, 0,
std::array<std::string_view, 1>{
"xyz.openbmc_project.Inventory.Connector.Port"},
std::bind_front(afterNetworkAdapterPortPaths, asyncResp, portId,
@@ -301,7 +300,7 @@ inline void handleNetworkAdapterPortPathPortCollection(
nlohmann::json::array_t members;
for (const std::string& path : object)
{
- std::string name = sdbusplus::message::object_path(path).filename();
+ std::string name = sdbusplus::object_path(path).filename();
nlohmann::json::object_t member;
member["@odata.id"] =
std::format("/redfish/v1/Chassis/{}/NetworkAdapters/{}/Ports/{}",
@@ -320,7 +319,7 @@ inline void getNetworkAdapterPortPaths(
std::string associationPath = networkAdapterPath + "/connecting";
dbus::utility::getAssociatedSubTreePaths(
associationPath,
- sdbusplus::message::object_path{"/xyz/openbmc_project/inventory"}, 0,
+ sdbusplus::object_path{"/xyz/openbmc_project/inventory"}, 0,
std::array<std::string_view, 1>{
"xyz.openbmc_project.Inventory.Connector.Port"},
std::bind_front(handleNetworkAdapterPortPathPortCollection, asyncResp,
@@ -367,7 +366,7 @@ inline void handleNetworkAdapterPaths(
for (const auto& path : object)
{
- std::string name = sdbusplus::message::object_path(path).filename();
+ std::string name = sdbusplus::object_path(path).filename();
if (name == networkAdapterId)
{
callback(path);
@@ -416,7 +415,7 @@ inline void handleNetworkAdapterPathsNetworkAdapterCollection(
members = nlohmann::json::array();
for (const std::string& path : object)
{
- std::string name = sdbusplus::message::object_path(path).filename();
+ std::string name = sdbusplus::object_path(path).filename();
nlohmann::json member;
member["@odata.id"] = std::format(
"/redfish/v1/Chassis/{}/NetworkAdapters/{}", chassisId, name);
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 86b5d64677..9525c0c83b 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -115,7 +115,7 @@ inline void extractNTPServersAndDomainNamesData(
template <typename CallbackFunc>
void getEthernetIfaceData(CallbackFunc&& callback)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/network");
+ sdbusplus::object_path path("/xyz/openbmc_project/network");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.Network", path,
[callback = std::forward<CallbackFunc>(callback)](
@@ -462,8 +462,7 @@ inline void getNTPProtocolEnabled(
inline std::string encodeServiceObjectPath(std::string_view serviceName)
{
- sdbusplus::message::object_path objPath(
- "/xyz/openbmc_project/control/service");
+ sdbusplus::object_path objPath("/xyz/openbmc_project/control/service");
objPath /= serviceName;
return objPath.str;
}
diff --git a/redfish-core/lib/openbmc/openbmc_managers.hpp b/redfish-core/lib/openbmc/openbmc_managers.hpp
index 335eb3274f..b760a1577e 100644
--- a/redfish-core/lib/openbmc/openbmc_managers.hpp
+++ b/redfish-core/lib/openbmc/openbmc_managers.hpp
@@ -58,7 +58,7 @@ inline void asyncPopulatePid(
const std::vector<std::string>& supportedProfiles,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
dbus::utility::getManagedObjects(
connection, objPath,
[asyncResp, currentProfile, supportedProfiles](
@@ -179,8 +179,7 @@ inline void asyncPopulatePid(
BMCWEB_REDFISH_MANAGER_URI_NAME));
if (intfPair.first == pidZoneConfigurationIface)
{
- sdbusplus::message::object_path pidPath(
- pathPair.first.str);
+ sdbusplus::object_path pidPath(pathPair.first.str);
std::string chassis = pidPath.filename();
if (chassis.empty())
{
@@ -515,7 +514,7 @@ inline const dbus::utility::ManagedObjectType::value_type* findChassis(
return nullptr;
}
// /xyz/openbmc_project/inventory/system/chassis/<chassis-name>
- sdbusplus::message::object_path path(it->first.str);
+ sdbusplus::object_path path(it->first.str);
chassis = path.filename();
return &(*it);
@@ -1167,8 +1166,7 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
// todo(james): might make sense to do a mapper call here if this
// interface gets more traction
- sdbusplus::message::object_path objPath(
- "/xyz/openbmc_project/inventory");
+ sdbusplus::object_path objPath("/xyz/openbmc_project/inventory");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.EntityManager", objPath,
[self](const boost::system::error_code& ec,
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 4fb8b8ca40..c1f855e4d9 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -58,7 +58,7 @@ inline void handlePCIeDevicePath(
for (const std::string& pcieDevicePath : pcieDevicePaths)
{
std::string pcieDeviceName =
- sdbusplus::message::object_path(pcieDevicePath).filename();
+ sdbusplus::object_path(pcieDevicePath).filename();
if (pcieDeviceName.empty() || pcieDeviceName != pcieDeviceId)
{
continue;
@@ -188,7 +188,7 @@ inline void afterGetAssociatedSubTreePaths(
for (const std::string& processorPath : processorPaths)
{
std::string processorName =
- sdbusplus::message::object_path(processorPath).filename();
+ sdbusplus::object_path(processorPath).filename();
if (processorName.empty())
{
continue;
@@ -215,7 +215,7 @@ inline void linkAssociatedProcessor(
dbus::utility::getAssociatedSubTreePaths(
pcieDevicePath + "/connected_to",
- sdbusplus::message::object_path("/xyz/openbmc_project/inventory"), 0,
+ sdbusplus::object_path("/xyz/openbmc_project/inventory"), 0,
processorInterfaces,
std::bind_front(afterGetAssociatedSubTreePaths, asyncResp));
}
@@ -291,7 +291,7 @@ inline void getPCIeDeviceSlotPath(
std::function<void(const std::string& pcieDeviceSlot)>&& callback)
{
std::string associationPath = pcieDevicePath + "/contained_by";
- sdbusplus::message::object_path path("/xyz/openbmc_project/inventory");
+ sdbusplus::object_path path("/xyz/openbmc_project/inventory");
static constexpr std::array<std::string_view, 1> pcieSlotInterface = {
"xyz.openbmc_project.Inventory.Item.PCIeSlot"};
dbus::utility::getAssociatedSubTreePaths(
diff --git a/redfish-core/lib/pcie_slots.hpp b/redfish-core/lib/pcie_slots.hpp
index e658e3c2cf..07ffd0c5f5 100644
--- a/redfish-core/lib/pcie_slots.hpp
+++ b/redfish-core/lib/pcie_slots.hpp
@@ -154,7 +154,7 @@ inline void onMapperAssociationDone(
return;
}
- sdbusplus::message::object_path path(pcieSlotChassis[0]);
+ sdbusplus::object_path path(pcieSlotChassis[0]);
std::string chassisName = path.filename();
if (chassisName != chassisID)
{
@@ -204,8 +204,7 @@ inline void onMapperSubtreeDone(
for (const auto& connectionInterfacePair : pathServicePair.second)
{
const std::string& connectionName = connectionInterfacePair.first;
- sdbusplus::message::object_path pcieSlotAssociationPath(
- pcieSlotPath);
+ sdbusplus::object_path pcieSlotAssociationPath(pcieSlotPath);
pcieSlotAssociationPath /= "chassis";
// The association of this PCIeSlot is used to determine whether
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 1d7a59f61d..6e02ef9ec4 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -60,12 +60,11 @@ inline void afterGetPowerCapEnable(
return;
}
- setDbusProperty(sensorsAsyncResp->asyncResp, "PowerControl",
- "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/control/host0/power_cap"),
- "xyz.openbmc_project.Control.Power.Cap", "PowerCap",
- valueToSet);
+ setDbusProperty(
+ sensorsAsyncResp->asyncResp, "PowerControl",
+ "xyz.openbmc_project.Settings",
+ sdbusplus::object_path("/xyz/openbmc_project/control/host0/power_cap"),
+ "xyz.openbmc_project.Control.Power.Cap", "PowerCap", valueToSet);
}
inline void afterGetChassisPath(
diff --git a/redfish-core/lib/power_supply.hpp b/redfish-core/lib/power_supply.hpp
index 0336ddcee9..a74c48ffbc 100644
--- a/redfish-core/lib/power_supply.hpp
+++ b/redfish-core/lib/power_supply.hpp
@@ -51,7 +51,7 @@ inline void updatePowerSupplyList(
for (const std::string& powerSupplyPath : powerSupplyPaths)
{
std::string powerSupplyName =
- sdbusplus::message::object_path(powerSupplyPath).filename();
+ sdbusplus::object_path(powerSupplyPath).filename();
if (powerSupplyName.empty())
{
continue;
@@ -191,7 +191,7 @@ inline void afterGetValidPowerSupplyPath(
}
for (const auto& [objectPath, service] : subtree)
{
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
if (path.filename() == powerSupplyId)
{
callback(path, service.begin()->first);
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 6b7db66263..987956005d 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -232,7 +232,7 @@ inline void getCpuDataByService(
{
BMCWEB_LOG_DEBUG("Get available system cpu resources by service.");
- sdbusplus::message::object_path path("/xyz/openbmc_project/inventory");
+ sdbusplus::object_path path("/xyz/openbmc_project/inventory");
dbus::utility::getManagedObjects(
service, path,
[cpuId, service, objPath, asyncResp{std::move(asyncResp)}](
@@ -600,7 +600,7 @@ inline void getCpuConfigData(
nlohmann::json& json = asyncResp->res.jsonValue;
- const sdbusplus::message::object_path* appliedConfig = nullptr;
+ const sdbusplus::object_path* appliedConfig = nullptr;
const bool* baseSpeedPriorityEnabled = nullptr;
const bool success = sdbusplus::unpackPropertiesNoThrow(
@@ -753,7 +753,7 @@ inline void handleProcessorSubtree(
for (const auto& [objectPath, serviceMap] : subtree)
{
// Ignore any objects which don't end with our desired cpu name
- sdbusplus::message::object_path path(objectPath);
+ sdbusplus::object_path path(objectPath);
if (path.filename() == processorId)
{
// Filter out objects that don't have the CPU-specific
@@ -942,7 +942,7 @@ inline void patchAppliedOperatingConfig(
// append to the CPU's path.
std::string configBaseName =
appliedConfigUri.buffer().substr(expectedPrefix.buffer().size());
- sdbusplus::message::object_path configPath(cpuObjectPath);
+ sdbusplus::object_path configPath(cpuObjectPath);
configPath /= configBaseName;
BMCWEB_LOG_INFO("Setting config to {}", configPath.str);
diff --git a/redfish-core/lib/redfish_util.hpp b/redfish-core/lib/redfish_util.hpp
index ec905dd861..701088016c 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -57,8 +57,8 @@ enum NetworkProtocolListenResponseElements
*/
using UnitStruct =
std::tuple<std::string, std::string, std::string, std::string, std::string,
- std::string, sdbusplus::message::object_path, uint32_t,
- std::string, sdbusplus::message::object_path>;
+ std::string, sdbusplus::object_path, uint32_t, std::string,
+ sdbusplus::object_path>;
template <typename CallbackFunc>
void getMainChassisId(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 97ee5faac1..d3ee9264ac 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -453,7 +453,7 @@ void getChassis(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string* chassisPath = nullptr;
for (const std::string& chassis : chassisPaths)
{
- sdbusplus::message::object_path path(chassis);
+ sdbusplus::object_path path(chassis);
std::string chassisName = path.filename();
if (chassisName.empty())
{
@@ -623,8 +623,7 @@ inline void populateFanRedundancy(
return;
}
- sdbusplus::message::object_path objectPath(
- path);
+ sdbusplus::object_path objectPath(path);
std::string name = objectPath.filename();
if (name.empty())
{
@@ -655,8 +654,7 @@ inline void populateFanRedundancy(
.jsonValue["Fans"];
for (const std::string& item : *collection)
{
- sdbusplus::message::object_path itemPath(
- item);
+ sdbusplus::object_path itemPath(item);
std::string itemName = itemPath.filename();
if (itemName.empty())
{
@@ -1031,7 +1029,7 @@ void getInventoryItemsData(
const std::string& invConnection = *it;
// Get all object paths and their interfaces for current connection
- sdbusplus::message::object_path path("/xyz/openbmc_project/inventory");
+ sdbusplus::object_path path("/xyz/openbmc_project/inventory");
dbus::utility::getManagedObjects(
invConnection, path,
[sensorsAsyncResp, inventoryItems, invConnections,
@@ -1187,7 +1185,7 @@ void getInventoryItemAssociations(
BMCWEB_LOG_DEBUG("getInventoryItemAssociations enter");
// Call GetManagedObjects on the ObjectMapper to get all associations
- sdbusplus::message::object_path path("/");
+ sdbusplus::object_path path("/");
dbus::utility::getManagedObjects(
"xyz.openbmc_project.ObjectMapper", path,
[callback = std::forward<Callback>(callback), sensorsAsyncResp,
@@ -1885,8 +1883,7 @@ inline void getSensorData(
// Get managed objects from all services exposing sensors
for (const std::string& connection : connections)
{
- sdbusplus::message::object_path sensorPath(
- "/xyz/openbmc_project/sensors");
+ sdbusplus::object_path sensorPath("/xyz/openbmc_project/sensors");
dbus::utility::getManagedObjects(
connection, sensorPath,
[sensorsAsyncResp, sensorNames,
@@ -2175,7 +2172,7 @@ inline bool findSensorNameUsingSensorPath(
{
for (const auto& chassisSensor : sensorsList)
{
- sdbusplus::message::object_path path(chassisSensor);
+ sdbusplus::object_path path(chassisSensor);
std::string thisSensorName = path.filename();
if (thisSensorName.empty())
{
@@ -2284,7 +2281,7 @@ inline void setSensorsOverride(
}
for (const auto& item : objectsWithConnection)
{
- sdbusplus::message::object_path path(item.first);
+ sdbusplus::object_path path(item.first);
std::string sensorName = path.filename();
if (sensorName.empty())
{
@@ -2374,7 +2371,7 @@ inline void getChassisCallback(
{
BMCWEB_LOG_DEBUG("Adding sensor: {}", sensor);
- sdbusplus::message::object_path path(sensor);
+ sdbusplus::object_path path(sensor);
std::string sensorName = path.filename();
if (sensorName.empty())
{
@@ -2457,7 +2454,7 @@ inline void getSensorFromDbus(
messages::internalError(asyncResp->res);
return;
}
- sdbusplus::message::object_path path(sensorPath);
+ sdbusplus::object_path path(sensorPath);
std::string name = path.filename();
path = path.parent_path();
std::string type = path.filename();
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 4a08d3404f..4b6e6b1c79 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -104,7 +104,7 @@ inline void afterChassisDriveCollectionSubtree(
for (const std::string& drive : driveList)
{
- sdbusplus::message::object_path object(drive);
+ sdbusplus::object_path object(drive);
if (object.filename().empty())
{
BMCWEB_LOG_ERROR("Failed to find filename in {}", drive);
@@ -145,8 +145,7 @@ inline void afterSystemsStorageGetSubtree(
subtree,
[&storageId](const std::pair<std::string,
dbus::utility::MapperServiceMap>& object) {
- return sdbusplus::message::object_path(object.first).filename() ==
- storageId;
+ return sdbusplus::object_path(object.first).filename() == storageId;
});
if (storage == subtree.end())
{
@@ -209,8 +208,7 @@ inline void afterSubtree(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
subtree,
[&storageId](const std::pair<std::string,
dbus::utility::MapperServiceMap>& object) {
- return sdbusplus::message::object_path(object.first).filename() ==
- storageId;
+ return sdbusplus::object_path(object.first).filename() == storageId;
});
if (storage == subtree.end())
{
diff --git a/redfish-core/lib/storage_chassis.hpp b/redfish-core/lib/storage_chassis.hpp
index 15d8ca76d9..9d025e423a 100644
--- a/redfish-core/lib/storage_chassis.hpp
+++ b/redfish-core/lib/storage_chassis.hpp
@@ -320,8 +320,7 @@ inline void afterGetSubtreeSystemsStorageDrive(
subtree,
[&driveId](const std::pair<std::string,
dbus::utility::MapperServiceMap>& object) {
- return sdbusplus::message::object_path(object.first).filename() ==
- driveId;
+ return sdbusplus::object_path(object.first).filename() == driveId;
});
if (drive == subtree.end())
@@ -381,7 +380,7 @@ inline void afterChassisDriveCollectionSubtreeGet(
// Iterate over all retrieved ObjectPaths.
for (const auto& [path, connectionNames] : subtree)
{
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
if (objPath.filename() != chassisId)
{
continue;
@@ -415,7 +414,7 @@ inline void afterChassisDriveCollectionSubtreeGet(
std::vector<std::string> leafNames;
for (const auto& drive : resp)
{
- sdbusplus::message::object_path drivePath(drive);
+ sdbusplus::object_path drivePath(drive);
leafNames.push_back(drivePath.filename());
}
@@ -473,7 +472,7 @@ inline void buildDrive(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
// Iterate over all retrieved ObjectPaths.
for (const auto& [path, connectionNames] : subtree)
{
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
if (objPath.filename() != driveName)
{
continue;
@@ -511,7 +510,7 @@ inline void matchAndFillDrive(
{
for (const std::string& drivePath : resp)
{
- sdbusplus::message::object_path path(drivePath);
+ sdbusplus::object_path path(drivePath);
std::string leaf = path.filename();
if (leaf != driveName)
{
@@ -555,7 +554,7 @@ inline void handleChassisDriveGet(
// Iterate over all retrieved ObjectPaths.
for (const auto& [path, connectionNames] : subtree)
{
- sdbusplus::message::object_path objPath(path);
+ sdbusplus::object_path objPath(path);
if (objPath.filename() != chassisId)
{
continue;
diff --git a/redfish-core/lib/storage_controller.hpp b/redfish-core/lib/storage_controller.hpp
index 7aa574b3c9..f773e82090 100644
--- a/redfish-core/lib/storage_controller.hpp
+++ b/redfish-core/lib/storage_controller.hpp
@@ -62,7 +62,7 @@ inline void getStorageControllerHandler(
for (const auto& [path, interfaceDict] : subtree)
{
- sdbusplus::message::object_path object(path);
+ sdbusplus::object_path object(path);
std::string id = object.filename();
if (id.empty())
{
@@ -104,7 +104,7 @@ inline void populateStorageControllerCollection(
for (const std::string& path : controllerList)
{
- std::string id = sdbusplus::message::object_path(path).filename();
+ std::string id = sdbusplus::object_path(path).filename();
if (id.empty())
{
BMCWEB_LOG_ERROR("Failed to find filename in {}", path);
diff --git a/redfish-core/lib/switch_port.hpp b/redfish-core/lib/switch_port.hpp
index e378c6debc..c80b642ec4 100644
--- a/redfish-core/lib/switch_port.hpp
+++ b/redfish-core/lib/switch_port.hpp
@@ -157,8 +157,7 @@ inline void populateMetricsProperty(
inline void getMetricProperty(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& serviceName,
- const sdbusplus::message::object_path& objectPath,
+ const std::string& serviceName, const sdbusplus::object_path& objectPath,
const nlohmann::json::json_pointer& jsonPtr)
{
dbus::utility::getProperty<double>(
@@ -185,7 +184,7 @@ inline void handleFabricSwitchPortMetricsPathPortMetricsGet(
continue;
}
- sdbusplus::message::object_path objectPah(path);
+ sdbusplus::object_path objectPah(path);
const std::string metricType = objectPah.parent_path().filename();
const std::string metricName = objectPah.filename();
@@ -260,12 +259,11 @@ inline void handleFabricSwitchPortPathPortMetricsGet(
asyncResp->res.jsonValue["Name"] =
std::format("{} {} Port Metrics", switchId, portId);
- const sdbusplus::message::object_path associationPath =
- sdbusplus::message::object_path(portPath) / "measured_by";
+ const sdbusplus::object_path associationPath =
+ sdbusplus::object_path(portPath) / "measured_by";
dbus::utility::getAssociatedSubTree(
- associationPath,
- sdbusplus::message::object_path("/xyz/openbmc_project/metric"), 0,
- std::array<std::string_view, 1>{"xyz.openbmc_project.Metric.Value"},
+ associationPath, sdbusplus::object_path("/xyz/openbmc_project/metric"),
+ 0, std::array<std::string_view, 1>{"xyz.openbmc_project.Metric.Value"},
std::bind_front(handleFabricSwitchPortMetricsPathPortMetricsGet,
asyncResp));
}
@@ -317,7 +315,7 @@ inline void afterHandleFabricSwitchPortPaths(
std::string serviceName;
for (const auto& [path, service] : object)
{
- std::string portName = sdbusplus::message::object_path(path).filename();
+ std::string portName = sdbusplus::object_path(path).filename();
if (portName == portId)
{
portPath = path;
@@ -350,7 +348,7 @@ inline void getAssociatedPortPath(
std::string associationPath = switchPath + "/connecting";
dbus::utility::getAssociatedSubTree(
associationPath,
- sdbusplus::message::object_path{"/xyz/openbmc_project/inventory"}, 0,
+ sdbusplus::object_path{"/xyz/openbmc_project/inventory"}, 0,
std::array<std::string_view, 1>{
"xyz.openbmc_project.Inventory.Connector.Port"},
std::bind_front(afterHandleFabricSwitchPortPaths, asyncResp, portId,
@@ -380,7 +378,7 @@ inline void handleFabricSwitchPathPortCollection(
nlohmann::json::array_t members;
for (const std::string& path : object)
{
- std::string name = sdbusplus::message::object_path(path).filename();
+ std::string name = sdbusplus::object_path(path).filename();
nlohmann::json::object_t member;
member["@odata.id"] =
boost::urls::format("/redfish/v1/Fabrics/{}/Switches/{}/Ports/{}",
@@ -399,7 +397,7 @@ inline void getFabricSwitchPortPaths(
std::string associationPath = switchPath + "/connecting";
dbus::utility::getAssociatedSubTreePaths(
associationPath,
- sdbusplus::message::object_path{"/xyz/openbmc_project/inventory"}, 0,
+ sdbusplus::object_path{"/xyz/openbmc_project/inventory"}, 0,
std::array<std::string_view, 1>{
"xyz.openbmc_project.Inventory.Connector.Port"},
std::bind_front(handleFabricSwitchPathPortCollection, asyncResp,
@@ -430,7 +428,7 @@ inline void handleFabricSwitchPortPathsSwitchCollection(
for (const std::string& path : object)
{
nlohmann::json::object_t member;
- std::string name = sdbusplus::message::object_path(path).filename();
+ std::string name = sdbusplus::object_path(path).filename();
member["@odata.id"] = boost::urls::format(
"/redfish/v1/Fabrics/{}/Switches/{}", fabricId, name);
members.emplace_back(std::move(member));
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index c277f1d64c..b1fa85ab3f 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -453,7 +453,7 @@ inline void getHostState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
BMCWEB_LOG_DEBUG("Get host information.");
- sdbusplus::message::object_path path =
+ sdbusplus::object_path path =
systems_utils::getHostStateObjectPath(computerSystemIndex);
dbus::utility::getProperty<std::string>(
systems_utils::getHostStateServiceName(computerSystemIndex), path,
@@ -757,7 +757,7 @@ inline int assignBootParameters(
inline void getBootProgress(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path =
+ sdbusplus::object_path path =
systems_utils::getHostStateObjectPath(computerSystemIndex);
dbus::utility::getProperty<std::string>(
systems_utils::getHostStateServiceName(computerSystemIndex), path,
@@ -790,7 +790,7 @@ inline void getBootProgressLastStateTime(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path =
+ sdbusplus::object_path path =
systems_utils::getHostStateObjectPath(computerSystemIndex);
dbus::utility::getProperty<uint64_t>(
systems_utils::getHostStateServiceName(computerSystemIndex), path,
@@ -827,8 +827,8 @@ inline void getBootOverrideType(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
dbus::utility::getProperty<std::string>(
@@ -872,8 +872,8 @@ inline void getBootOverrideMode(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
dbus::utility::getProperty<std::string>(
"xyz.openbmc_project.Settings", path,
@@ -927,8 +927,8 @@ inline void getBootOverrideSource(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
dbus::utility::getProperty<std::string>(
@@ -987,8 +987,8 @@ inline void processBootOverrideEnable(
return;
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
path /= "one_time";
@@ -1030,8 +1030,8 @@ inline void getBootOverrideEnable(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
dbus::utility::getProperty<bool>(
@@ -1093,7 +1093,7 @@ inline void getLastResetTime(
const uint64_t computerSystemIndex)
{
BMCWEB_LOG_DEBUG("Getting System Last Reset Time");
- sdbusplus::message::object_path path =
+ sdbusplus::object_path path =
systems_utils::getChassisStateObjectPath(computerSystemIndex);
dbus::utility::getProperty<uint64_t>(
systems_utils::getChassisStateServiceName(computerSystemIndex), path,
@@ -1134,7 +1134,7 @@ inline void getAutomaticRebootAttempts(
const uint64_t computerSystemIndex)
{
BMCWEB_LOG_DEBUG("Get Automatic Retry policy");
- sdbusplus::message::object_path path =
+ sdbusplus::object_path path =
systems_utils::getHostStateObjectPath(computerSystemIndex);
dbus::utility::getAllProperties(
systems_utils::getHostStateServiceName(computerSystemIndex), path,
@@ -1197,8 +1197,8 @@ inline void getAutomaticRetryPolicy(
{
BMCWEB_LOG_DEBUG("Get Automatic Retry policy");
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "auto_reboot";
dbus::utility::getProperty<bool>(
@@ -1305,8 +1305,8 @@ inline void getPowerRestorePolicy(
{
BMCWEB_LOG_DEBUG("Get power restore policy");
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "power_restore_policy";
dbus::utility::getProperty<std::string>(
@@ -1596,8 +1596,8 @@ inline void setBootType(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
// Act on validated parameters
BMCWEB_LOG_DEBUG("DBUS boot type: {}", bootTypeStr);
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
setDbusProperty(asyncResp, "Boot/BootSourceOverrideMode",
"xyz.openbmc_project.Settings", path,
@@ -1655,8 +1655,8 @@ inline void setBootEnable(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
// Act on validated parameters
BMCWEB_LOG_DEBUG("DBUS boot override enable: {}", bootOverrideEnable);
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
setDbusProperty(asyncResp, "Boot/BootSourceOverrideEnabled",
"xyz.openbmc_project.Settings", path,
@@ -1720,8 +1720,8 @@ inline void setBootModeOrSource(
BMCWEB_LOG_DEBUG("DBUS boot source: {}", bootSourceStr);
BMCWEB_LOG_DEBUG("DBUS boot mode: {}", bootModeStr);
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "boot";
setDbusProperty(asyncResp, "Boot/BootSourceOverrideTarget",
"xyz.openbmc_project.Settings", path,
@@ -1869,12 +1869,11 @@ inline void setStopBootOnFault(
return;
}
- setDbusProperty(asyncResp, "Boot/StopBootOnFault",
- "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/logging/settings"),
- "xyz.openbmc_project.Logging.Settings", "QuiesceOnHwError",
- *stopBootEnabled);
+ setDbusProperty(
+ asyncResp, "Boot/StopBootOnFault", "xyz.openbmc_project.Settings",
+ sdbusplus::object_path("/xyz/openbmc_project/logging/settings"),
+ "xyz.openbmc_project.Logging.Settings", "QuiesceOnHwError",
+ *stopBootEnabled);
}
/**
@@ -1912,8 +1911,8 @@ inline void setAutomaticRetry(
return;
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "auto_reboot";
setDbusProperty(asyncResp, "Boot/AutomaticRetryConfig",
"xyz.openbmc_project.Settings", path,
@@ -1962,8 +1961,8 @@ inline void setPowerRestorePolicy(
return;
}
- sdbusplus::message::object_path path("/xyz/openbmc_project/control/host" +
- std::to_string(computerSystemIndex));
+ sdbusplus::object_path path("/xyz/openbmc_project/control/host" +
+ std::to_string(computerSystemIndex));
path /= "power_restore_policy";
setDbusProperty(asyncResp, "PowerRestorePolicy",
"xyz.openbmc_project.Settings", path,
@@ -2503,22 +2502,21 @@ inline void setWDTProperties(
return;
}
- setDbusProperty(asyncResp, "HostWatchdogTimer/TimeoutAction",
- "xyz.openbmc_project.Watchdog",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/watchdog/host0"),
- "xyz.openbmc_project.State.Watchdog", "ExpireAction",
- wdtTimeOutActStr);
+ setDbusProperty(
+ asyncResp, "HostWatchdogTimer/TimeoutAction",
+ "xyz.openbmc_project.Watchdog",
+ sdbusplus::object_path("/xyz/openbmc_project/watchdog/host0"),
+ "xyz.openbmc_project.State.Watchdog", "ExpireAction",
+ wdtTimeOutActStr);
}
if (wdtEnable)
{
- setDbusProperty(asyncResp, "HostWatchdogTimer/FunctionEnabled",
- "xyz.openbmc_project.Watchdog",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/watchdog/host0"),
- "xyz.openbmc_project.State.Watchdog", "Enabled",
- *wdtEnable);
+ setDbusProperty(
+ asyncResp, "HostWatchdogTimer/FunctionEnabled",
+ "xyz.openbmc_project.Watchdog",
+ sdbusplus::object_path("/xyz/openbmc_project/watchdog/host0"),
+ "xyz.openbmc_project.State.Watchdog", "Enabled", *wdtEnable);
}
}
@@ -3527,7 +3525,7 @@ inline void getAllowedHostTransitions(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const uint64_t computerSystemIndex)
{
- sdbusplus::message::object_path path =
+ sdbusplus::object_path path =
systems_utils::getHostStateObjectPath(computerSystemIndex);
dbus::utility::getProperty<std::vector<std::string>>(
systems_utils::getHostStateServiceName(computerSystemIndex), path,
diff --git a/redfish-core/lib/trigger.hpp b/redfish-core/lib/trigger.hpp
index 28abe52a89..cc9d708554 100644
--- a/redfish-core/lib/trigger.hpp
+++ b/redfish-core/lib/trigger.hpp
@@ -63,7 +63,7 @@ using DiscreteThresholdParams =
std::tuple<std::string, std::string, uint64_t, std::string>;
using TriggerSensorsParams =
- std::vector<std::pair<sdbusplus::message::object_path, std::string>>;
+ std::vector<std::pair<sdbusplus::object_path, std::string>>;
inline triggers::TriggerActionEnum toRedfishTriggerAction(
std::string_view dbusValue)
@@ -213,9 +213,8 @@ struct Context
std::string id;
std::string name;
std::vector<std::string> actions;
- std::vector<std::pair<sdbusplus::message::object_path, std::string>>
- sensors;
- std::vector<sdbusplus::message::object_path> reports;
+ std::vector<std::pair<sdbusplus::object_path, std::string>> sensors;
+ std::vector<sdbusplus::object_path> reports;
std::vector<NumericThresholdParams> numericThresholds;
std::vector<DiscreteThresholdParams> discreteThresholds;
std::optional<DiscreteCondition> discreteCondition;
@@ -223,7 +222,7 @@ struct Context
std::optional<std::vector<std::string>> metricProperties;
};
-inline std::optional<sdbusplus::message::object_path>
+inline std::optional<sdbusplus::object_path>
getReportPathFromReportDefinitionUri(const std::string& uri)
{
boost::system::result<boost::urls::url_view> parsed =
@@ -242,8 +241,7 @@ inline std::optional<sdbusplus::message::object_path>
return std::nullopt;
}
- return sdbusplus::message::object_path(
- "/xyz/openbmc_project/Telemetry/Reports") /
+ return sdbusplus::object_path("/xyz/openbmc_project/Telemetry/Reports") /
"TelemetryService" / id;
}
@@ -532,7 +530,7 @@ inline bool parseLinks(crow::Response& res,
ctx.reports.reserve(metricReportDefinitions.size());
for (const std::string& reportDefinionUri : metricReportDefinitions)
{
- std::optional<sdbusplus::message::object_path> reportPath =
+ std::optional<sdbusplus::object_path> reportPath =
getReportPathFromReportDefinitionUri(reportDefinionUri);
if (!reportPath)
{
@@ -790,11 +788,11 @@ inline std::optional<nlohmann::json::object_t> getNumericThresholds(
}
inline std::optional<nlohmann::json> getMetricReportDefinitions(
- const std::vector<sdbusplus::message::object_path>& reportPaths)
+ const std::vector<sdbusplus::object_path>& reportPaths)
{
nlohmann::json reports = nlohmann::json::array();
- for (const sdbusplus::message::object_path& path : reportPaths)
+ for (const sdbusplus::object_path& path : reportPaths)
{
std::string reportId = path.filename();
if (reportId.empty())
@@ -833,7 +831,7 @@ inline bool fillTrigger(nlohmann::json& json, const std::string& id,
const std::string* name = nullptr;
const bool* discrete = nullptr;
const TriggerSensorsParams* sensors = nullptr;
- const std::vector<sdbusplus::message::object_path>* reports = nullptr;
+ const std::vector<sdbusplus::object_path>* reports = nullptr;
const std::vector<std::string>* triggerActions = nullptr;
const std::vector<DiscreteThresholdParams>* discreteThresholds = nullptr;
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index da00f7ca8e..e89365ab2e 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -249,7 +249,7 @@ inline bool handleCreateTask(const boost::system::error_code& ec2,
inline void createTask(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
task::Payload&& payload,
- const sdbusplus::message::object_path& objPath)
+ const sdbusplus::object_path& objPath)
{
std::shared_ptr<task::TaskData> task = task::TaskData::createTask(
std::bind_front(handleCreateTask),
@@ -269,7 +269,7 @@ inline void softwareInterfaceAdded(
{
dbus::utility::DBusInterfacesMap interfacesProperties;
- sdbusplus::message::object_path objPath;
+ sdbusplus::object_path objPath;
m.read(objPath, interfacesProperties);
@@ -418,7 +418,7 @@ inline void afterUpdateErrorMatcher(
sdbusplus::message_t& m)
{
dbus::utility::DBusInterfacesMap interfacesProperties;
- sdbusplus::message::object_path objPath;
+ sdbusplus::object_path objPath;
m.read(objPath, interfacesProperties);
BMCWEB_LOG_DEBUG("obj path = {}", objPath.str);
for (const std::pair<std::string, dbus::utility::DBusPropertiesMap>&
@@ -681,11 +681,11 @@ inline void setApplyTime(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return;
}
- setDbusProperty(asyncResp, "ApplyTime", "xyz.openbmc_project.Settings",
- sdbusplus::message::object_path(
- "/xyz/openbmc_project/software/apply_time"),
- "xyz.openbmc_project.Software.ApplyTime",
- "RequestedApplyTime", applyTimeNewVal);
+ setDbusProperty(
+ asyncResp, "ApplyTime", "xyz.openbmc_project.Settings",
+ sdbusplus::object_path("/xyz/openbmc_project/software/apply_time"),
+ "xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime",
+ applyTimeNewVal);
}
struct MultiPartUpdate
@@ -852,7 +852,7 @@ inline std::optional<MultiPartUpdate> extractMultipartUpdateParameters(
inline void handleStartUpdate(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, task::Payload payload,
const std::string& objectPath, const boost::system::error_code& ec,
- const sdbusplus::message::object_path& retPath)
+ const sdbusplus::object_path& retPath)
{
if (ec)
{
@@ -876,7 +876,7 @@ inline void startUpdate(
asyncResp,
[asyncResp, payload = std::move(payload),
objectPath](const boost::system::error_code& ec1,
- const sdbusplus::message::object_path& retPath) mutable {
+ const sdbusplus::object_path& retPath) mutable {
handleStartUpdate(asyncResp, std::move(payload), objectPath, ec1,
retPath);
},
@@ -890,8 +890,9 @@ inline void getSwInfo(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree)
{
- using SwInfoMap = std::unordered_map<
- std::string, std::pair<sdbusplus::message::object_path, std::string>>;
+ using SwInfoMap =
+ std::unordered_map<std::string,
+ std::pair<sdbusplus::object_path, std::string>>;
SwInfoMap swInfoMap;
if (ec)
@@ -905,7 +906,7 @@ inline void getSwInfo(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
for (const auto& entry : subtree)
{
- sdbusplus::message::object_path path(entry.first);
+ sdbusplus::object_path path(entry.first);
std::string swId = path.filename();
swInfoMap.emplace(swId, make_pair(path, entry.second[0].first));
}
@@ -1372,7 +1373,7 @@ inline void handleUpdateServiceFirmwareInventoryGetCallback(
std::vector<std::pair<std::string, std::vector<std::string>>>>&
obj : subtree)
{
- sdbusplus::message::object_path path(obj.first);
+ sdbusplus::object_path path(obj.first);
std::string id = path.filename();
if (id.empty())
{
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 3cfdc4f1c1..495d284ba4 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -47,8 +47,8 @@ enum class VmMode
Proxy
};
-inline VmMode parseObjectPathAndGetMode(
- const sdbusplus::message::object_path& itemPath, const std::string& resName)
+inline VmMode parseObjectPathAndGetMode(const sdbusplus::object_path& itemPath,
+ const std::string& resName)
{
std::string thisPath = itemPath.filename();
BMCWEB_LOG_DEBUG("Filename: {}, ThisPath: {}", itemPath.str, thisPath);
@@ -90,7 +90,7 @@ inline VmMode parseObjectPathAndGetMode(
using CheckItemHandler =
std::function<void(const std::string& service, const std::string& resName,
const std::shared_ptr<bmcweb::AsyncResp>&,
- const std::pair<sdbusplus::message::object_path,
+ const std::pair<sdbusplus::object_path,
dbus::utility::DBusInterfacesMap>&)>;
inline void findAndParseObject(
@@ -98,7 +98,7 @@ inline void findAndParseObject(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
CheckItemHandler&& handler)
{
- sdbusplus::message::object_path path("/xyz/openbmc_project/VirtualMedia");
+ sdbusplus::object_path path("/xyz/openbmc_project/VirtualMedia");
dbus::utility::getManagedObjects(
service, path,
[service, resName, asyncResp, handler = std::move(handler)](
@@ -277,8 +277,7 @@ inline void getVmResourceList(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
const std::string& name)
{
BMCWEB_LOG_DEBUG("Get available Virtual Media resources.");
- sdbusplus::message::object_path objPath(
- "/xyz/openbmc_project/VirtualMedia");
+ sdbusplus::object_path objPath("/xyz/openbmc_project/VirtualMedia");
dbus::utility::getManagedObjects(
service, objPath,
[name, asyncResp{std::move(asyncResp)}](
@@ -313,8 +312,8 @@ inline void afterGetVmData(
const std::string& name, const std::string& /*service*/,
const std::string& resName,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::pair<sdbusplus::message::object_path,
- dbus::utility::DBusInterfacesMap>& item)
+ const std::pair<sdbusplus::object_path, dbus::utility::DBusInterfacesMap>&
+ item)
{
VmMode mode = parseObjectPathAndGetMode(item.first, resName);
if (mode == VmMode::Invalid)
@@ -498,8 +497,7 @@ inline void doMountVmLegacy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
sdbusplus::message::unix_fd unixFd(fd);
- sdbusplus::message::object_path path(
- "/xyz/openbmc_project/VirtualMedia/Legacy");
+ sdbusplus::object_path path("/xyz/openbmc_project/VirtualMedia/Legacy");
path /= name;
dbus::utility::async_method_call(
asyncResp,
@@ -753,8 +751,7 @@ inline void handleManagersVirtualMediaActionInsertPost(
std::string service = getObjectType.begin()->first;
BMCWEB_LOG_DEBUG("GetObjectType: {}", service);
- sdbusplus::message::object_path path(
- "/xyz/openbmc_project/VirtualMedia");
+ sdbusplus::object_path path("/xyz/openbmc_project/VirtualMedia");
dbus::utility::getManagedObjects(
service, path,
[service, resName, action, actionParams, asyncResp](
@@ -823,8 +820,7 @@ inline void handleManagersVirtualMediaActionEject(
std::string service = getObjectType.begin()->first;
BMCWEB_LOG_DEBUG("GetObjectType: {}", service);
- sdbusplus::message::object_path path(
- "/xyz/openbmc_project/VirtualMedia");
+ sdbusplus::object_path path("/xyz/openbmc_project/VirtualMedia");
dbus::utility::getManagedObjects(
service, path,
[resName, service, action,
diff --git a/redfish-core/src/dbus_log_watcher.cpp b/redfish-core/src/dbus_log_watcher.cpp
index 53d35edd5b..76d1a7d19b 100644
--- a/redfish-core/src/dbus_log_watcher.cpp
+++ b/redfish-core/src/dbus_log_watcher.cpp
@@ -79,7 +79,7 @@ static void onDbusEventLogCreated(sdbusplus::message_t& msg)
{
BMCWEB_LOG_DEBUG("Handling new DBus Event Log Entry");
- sdbusplus::message::object_path objectPath;
+ sdbusplus::object_path objectPath;
dbus::utility::DBusInterfacesMap interfaces;
msg.read(objectPath, interfaces);
@@ -111,7 +111,7 @@ DbusEventLogMonitor::DbusEventLogMonitor() :
static void getReadingsForReport(sdbusplus::message_t& msg)
{
- sdbusplus::message::object_path path(msg.get_path());
+ sdbusplus::object_path path(msg.get_path());
std::string id = path.filename();
if (id.empty())
{
diff --git a/src/dbus_utility.cpp b/src/dbus_utility.cpp
index 236faa57de..9112f3e243 100644
--- a/src/dbus_utility.cpp
+++ b/src/dbus_utility.cpp
@@ -108,8 +108,8 @@ void getSubTreePaths(
}
void getAssociatedSubTree(
- const sdbusplus::message::object_path& associatedPath,
- const sdbusplus::message::object_path& path, int32_t depth,
+ const sdbusplus::object_path& associatedPath,
+ const sdbusplus::object_path& path, int32_t depth,
std::span<const std::string_view> interfaces,
std::function<void(const boost::system::error_code&,
const MapperGetSubTreeResponse&)>&& callback)
@@ -125,8 +125,8 @@ void getAssociatedSubTree(
}
void getAssociatedSubTreePaths(
- const sdbusplus::message::object_path& associatedPath,
- const sdbusplus::message::object_path& path, int32_t depth,
+ const sdbusplus::object_path& associatedPath,
+ const sdbusplus::object_path& path, int32_t depth,
std::span<const std::string_view> interfaces,
std::function<void(const boost::system::error_code&,
const MapperGetSubTreePathsResponse&)>&& callback)
@@ -207,7 +207,7 @@ void getAssociationEndPoints(
}
void getManagedObjects(const std::string& service,
- const sdbusplus::message::object_path& path,
+ const sdbusplus::object_path& path,
std::function<void(const boost::system::error_code&,
const ManagedObjectType&)>&& callback)
{