Add Id to Trigger

Currently, Trigger is using Name as unique identifier. By adding Id, we
can be compliant with redfish specification:
- Id will be used as unique identifier
- Name will be used as human readable, non-unique name

AddTrigger dbus method is now requiring both id and name. Each of them
can be passed as empty string and the service will fill them with
correct values. If only id is an empty string, name will be used to
generate its value.

Dbus object path and persistent storage filename are now be based on id,
instead of name.

Added validation for AddTrigger:
- correct characters in id
- max id length

Added Name property for Trigger object, which can be modified from dbus.

Testing done:
- Unit test added and passing
- Trigger was added using dbus, without errors
- Id generation is working properly
- Name property is accessible and writable from dbus

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: Ibb553586eaf51943044c93a35bc0725e6ef67ce9
diff --git a/src/report_manager.hpp b/src/report_manager.hpp
index f056f78..9c21c5d 100644
--- a/src/report_manager.hpp
+++ b/src/report_manager.hpp
@@ -4,6 +4,7 @@
 #include "interfaces/report.hpp"
 #include "interfaces/report_factory.hpp"
 #include "interfaces/report_manager.hpp"
+#include "report.hpp"
 
 #include <systemd/sd-bus-protocol.h>
 
@@ -59,7 +60,8 @@
     static constexpr size_t maxReports{TELEMETRY_MAX_REPORTS};
     static constexpr size_t maxReadingParams{TELEMETRY_MAX_READING_PARAMS};
     static constexpr size_t maxReportNameLength{
-        TELEMETRY_MAX_REPORT_NAME_LENGTH};
+        TELEMETRY_MAX_DBUS_PATH_LENGTH -
+        std::string_view(Report::reportDir).length()};
     static constexpr Milliseconds minInterval{TELEMETRY_MIN_INTERVAL};
     static constexpr const char* reportManagerIfaceName =
         "xyz.openbmc_project.Telemetry.ReportManager";