Redfish TelemetryService schema implementation
Now user is able to communicate with Telemetry service using Redfish.
Added TelemetryService, MetricReports, MetricReportCollection,
MetricReportDefinition and MetricReportDefinitionCollection nodes
with GET method support. Added TelemetryService URI to root service.
Implemented communication with backend - Telemetry:
https://github.com/openbmc/telemetry
Added schemes attributes that are supported by Telemetry service
design, ref.:
https://github.com/openbmc/docs/blob/master/designs/telemetry.md
Change introduces function that converts decimal value into
duration format that is described by ISO 8601 and Redfish
specification.
Tested:
- Tested using romulus and s2600wf images on QEMU
- Verified DBus method calls to Telemetry service from bmcweb
- Verified bmcweb responses from new nodes in different cases:
- Report collection is empty
- Report collection is filled with artificial data
- Telemetry service is disabled
- Verified time_utils::toDurationString() output
- Passed RedfishServiceValidator.py
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Adrian Ambrożewicz <adrian.ambrozewicz@linux.intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: Ie6b0b49f4ef5eeaef07d1209b6c349270c04d570
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
index 629280c..3df5ec5 100644
--- a/redfish-core/lib/service_root.hpp
+++ b/redfish-core/lib/service_root.hpp
@@ -68,6 +68,8 @@
res.jsonValue["Tasks"] = {{"@odata.id", "/redfish/v1/TaskService"}};
res.jsonValue["EventService"] = {
{"@odata.id", "/redfish/v1/EventService"}};
+ res.jsonValue["TelemetryService"] = {
+ {"@odata.id", "/redfish/v1/TelemetryService"}};
res.end();
}