Use proper dbus path when possible.
Following methods and properties were updated to use full dbus path,
instead of internal telemetry id:
- TriggerManager.AddTrigger() - 'reportIds' arg
- Trigger.ReportIds - renamed to 'Reports'
- Report.TriggerIds - renamed to 'Triggers'
Testing done:
- UTs were updated and are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I78d812d38289fac575d25b48503cc8b9c6f736fe
diff --git a/src/report.hpp b/src/report.hpp
index 7609297..74c979b 100644
--- a/src/report.hpp
+++ b/src/report.hpp
@@ -15,6 +15,7 @@
#include "types/report_updates.hpp"
#include "types/reporting_type.hpp"
#include "utils/circular_vector.hpp"
+#include "utils/dbus_path_utils.hpp"
#include "utils/ensure.hpp"
#include "utils/messanger.hpp"
@@ -78,7 +79,7 @@
std::string getPath() const override
{
- return reportDir + id;
+ return path.str;
}
void metricUpdated() override;
@@ -113,6 +114,7 @@
std::vector<ErrorMessage> verify() const;
std::string id;
+ const sdbusplus::message::object_path path;
std::string name;
ReportingType reportingType;
Milliseconds interval;
@@ -144,8 +146,6 @@
public:
static constexpr const char* reportIfaceName =
"xyz.openbmc_project.Telemetry.Report";
- static constexpr const char* reportDir =
- "/xyz/openbmc_project/Telemetry/Reports/";
static constexpr const char* deleteIfaceName =
"xyz.openbmc_project.Object.Delete";
static constexpr size_t reportVersion = 6;