36de0563 | 27-May-2022 |
Ed Tanous <edtanous@google.com> |
Include-what-you-use
This fixes a build error on the latest rebase by following the coding standard, and including the headers of the resources used. In this case, std::find is in the algorithm lib
Include-what-you-use
This fixes a build error on the latest rebase by following the coding standard, and including the headers of the resources used. In this case, std::find is in the algorithm library, so add that include.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icd62174faf57c769e114583c841181f2229c9c79
show more ...
|
e0ed508c | 20-May-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Fix AddressSanitizer issue in UTs
There was one stack-use-after-scope in report test lambda.
Testing done: - UTs are passing with AddressSanitizer enabled.
Signed-off-by: Szymon Dompke <szymon.dom
Fix AddressSanitizer issue in UTs
There was one stack-use-after-scope in report test lambda.
Testing done: - UTs are passing with AddressSanitizer enabled.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I82aafd23038cb999f1a143d31e969e1e5b175279
show more ...
|
620c65ad | 23-Mar-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
OnChange trigger should not handle first reading
When OnChange trigger register for updates, it gets current sensor value as an update. This reading fires trigger actions and is undesirable.
This c
OnChange trigger should not handle first reading
When OnChange trigger register for updates, it gets current sensor value as an update. This reading fires trigger actions and is undesirable.
This change skips handling of first reading update for OnChange trigger.
Testing done: - UTs updated and are passing, - OnChange trigger is not doing an action on first reading update.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: Ief2d1edd5923fd332f3ea3234a9988e1967d972f
show more ...
|
aa572361 | 23-Mar-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Preserve original discrete trigger value
Currently, there are no 'real' discrete sensors, so discrete trigger is working with numeric ones. Dbus api is using string as thresholdValue, but internally
Preserve original discrete trigger value
Currently, there are no 'real' discrete sensors, so discrete trigger is working with numeric ones. Dbus api is using string as thresholdValue, but internally service is converting it to double. This resulted in side-effect of malformed value of Thresholds property, e.g., 90.0 being represented as 90.000000. This change stores original value in order to not confuse potential users.
Additionally, check was added to validate whole string of thesholdValue. Now, it must consist only of numeric characters, values like '12.3FOO' will be rejected on AddTrigger call.
Testing done: - UTs added and are passing, - dbus get-property on Thresholds confirms unchanged initial value.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: Iec3514ac1479587e610f8da31ecf9ba6fc0bdb62
show more ...
|
f8ae65ca | 21-Mar-2022 |
Patrick Williams <patrick@stwcx.xyz> |
meson: simplify dependencies
Leverage wrapfile `[provide]` directives to simplify the dependency searching in the meson.build.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5bbde5
meson: simplify dependencies
Leverage wrapfile `[provide]` directives to simplify the dependency searching in the meson.build.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5bbde5732df9604b6ea45eaae519bdf64c27ee3c
show more ...
|
f670b026 | 16-Mar-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Remove code duplication from trigger actions
Logging actions were using duplicated functions for discrete::Severity and numeric::Type conversion. They were replaced with common utility functions.
T
Remove code duplication from trigger actions
Logging actions were using duplicated functions for discrete::Severity and numeric::Type conversion. They were replaced with common utility functions.
Testing done: - UTs are passing. - Logging actions are unchanged and working properly.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I353d5f58fc82809c59bc2c1fb3b926d1a6579098
show more ...
|
55824558 | 18-Feb-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Fixed issue with displaying empty triggers
It was not possible to display empty triggers due to one of the property handlers returning error. This fixes handlers and proper value is returned instead
Fixed issue with displaying empty triggers
It was not possible to display empty triggers due to one of the property handlers returning error. This fixes handlers and proper value is returned instead.
Tested: - All unit tests are passing. - Can introspect empty triggers - Empty triggers are correctly listed in redfish
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I1ce9a9a43faac5446911f0e44c638b4ca91adb82
show more ...
|
9e8da546 | 17-Feb-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
fixed issue with invalid readings being visible
Before this change readings for sensors that are not yet available were displayed as value 0.0 with timestamp 1970-01-01 which was meant to represent
fixed issue with invalid readings being visible
Before this change readings for sensors that are not yet available were displayed as value 0.0 with timestamp 1970-01-01 which was meant to represent invalid readings. This behaviour is undesired in case of periodic report with appendLimit set. After this change invalid readings are no longer visible.
Tested: - Readings for sensors that is currently not available are not present on redfish. - Confirmed in new unit tests that sensor readings can appear in any order. And produce correct results.
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I340b85017530d120f2da2cc8ac4ae1840177e78c
show more ...
|
493e62eb | 14-Feb-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
made MetricValues persistent
MetricValues are persistent for reportUpdates AppendStopsWhenFull and reportingType different than OnRequest.
Tested: - New unit tests are passing - Confirmed MetricVal
made MetricValues persistent
MetricValues are persistent for reportUpdates AppendStopsWhenFull and reportingType different than OnRequest.
Tested: - New unit tests are passing - Confirmed MetricValues are preserved after restarting telemetry service
Change-Id: I7e1990fb391da9debb0d7df2f1dbda86473350cc Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
f7ea2997 | 27-Jan-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
added support for onChange report
Report is now notified when metric changes and updates reading values.
Tested: - Added new unit tests - OnChange report updates Readings when metric values cha
added support for onChange report
Report is now notified when metric changes and updates reading values.
Tested: - Added new unit tests - OnChange report updates Readings when metric values changes
Change-Id: I3be9ef7aa0486cb15bac627aa1de5cc632613b3b Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
fdb06a14 | 11-Feb-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Report: make dbus properties writable
ReadingParametersFutureVersion interface for Reports is enhanced from read-only to read write and supports modification of readingParameteres, which is done by
Report: make dbus properties writable
ReadingParametersFutureVersion interface for Reports is enhanced from read-only to read write and supports modification of readingParameteres, which is done by updating metrics at the first place and re-registering them for sensors updates. Similar ReportActions interface is enhanced to read write. Additionally reportActions policy was modified that reports always contain 'LogToMetricReportsCollection' action. The whole change enables Redfish support for PATCH method added on webserver side.
Tested: - New unit tests were created, ran all new and previous UTs, all passed - Tested under QEMU, interface was checked for RW via dbus cli commands, checked if Reading Parameters of the Report can be read or written, if metrics are properly updated and registration/unregistration for updates works properly, checked if actions of Report can be read or written, if actions are properly updated and related action behavior follows the change accordingly - Tested under QEMU, verified if 'LogToMetricReportsCollection' action is always added when Report is created or when actions of Report are updated by dbus interface - Tested via webserver if it communicates properly with dbus interfaces of Telemetry and read/write operations via Redfish can be successfully executed
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> Change-Id: I7f2fe8eae1631c436cf61a516d5fd0b8358a76bd
show more ...
|
60fee077 | 13-Jan-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
added property SupportedOperationTypes
- removed OperationType::single - for backward compatibility incomming OperationType::single alted to produce same output functionality - added property Supp
added property SupportedOperationTypes
- removed OperationType::single - for backward compatibility incomming OperationType::single alted to produce same output functionality - added property SupportedOperationTypes to ReportManager interface
Tested: - In cases where OperationType::single is used same MetricValues are produced - New property is visible on dbus
Change-Id: I838581c954abc0d8401e0ed530ce7e9c8013860b Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
e6d48874 | 08-Feb-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Removed dependency to TriggerManager
introduces Messanger class which allows to send messages directly to subscribed targets, which allows to break dependencies between classes.
Testes: - All unit
Removed dependency to TriggerManager
introduces Messanger class which allows to send messages directly to subscribed targets, which allows to break dependencies between classes.
Testes: - All unit tests are passing - Links are correctly updated - Report is correctly updated by Trigger Action
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I32d3aaba22f9ec07e611f53fe553bd27e1c04c6d
show more ...
|
ae9bd58a | 14-Feb-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
updated google test version
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I0d48bfa6a19e604fb3a4d07fc4cdb4220924329f |
b4ef22e4 | 07-Feb-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Report: Add TriggerIds property
This change is adding TriggerIds property for Report interface. It is an array of strings, each representing id of trigger which may update given report Readings prop
Report: Add TriggerIds property
This change is adding TriggerIds property for Report interface. It is an array of strings, each representing id of trigger which may update given report Readings property, due to UpdateReport action. This properly is read-only, but it can be changed in the runtime, when: - New Trigger is made using AddTrigger dbus method, when ReportId argument contains id of given report. - Trigger is deleted from dbus, and its ReportNames property included id of given report. - ReportNames property of any trigger is updated to include (or not) id of given report.
When this property is modified by service, signal will be emitted on dbus for property change.
When there is existing trigger with id of non-existing report in its ReportNames property, its id will be added to TriggerIds property of such report, the moment it is created by user.
Testing done: - new UTs were made, all UTs are passing. - manual testing on dbus interface was successful.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I1c4c94ce751ddaee001e3cadde3ea60aa8e1c224
show more ...
|
94f71c51 | 10-Dec-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
Trigger: make dbus properties writable
This change allows to modify 'Sensors', 'ReportNames' and 'Thresholds' dbus properties of Trigger interface. They are required by Redfish to implement PATCH fu
Trigger: make dbus properties writable
This change allows to modify 'Sensors', 'ReportNames' and 'Thresholds' dbus properties of Trigger interface. They are required by Redfish to implement PATCH functionality for Trigger schema.
Some backend changes were required to enable this functionality, and as such few improvements were made for existing code: - NumericThreshold and DiscreteThreshold now have common implementation where it was possible. - Internal sensor info structure for Trigger is now the same as the one used for Report. This resulted in breaking compatibility with previous Trigger persistency data. - Added getInfo / getParams methods for Sensor and Threshold interfaces. They are used by Trigger dbus getters and persistency mechanism now, instead of storing this data in Trigger object.
Testing done: - Unit tests were expanded and are passing - dbus setters for Sensors and Thresholds are working and modifications are reflected by calling appropriate getters.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I7a14c15a30d78ce872342b5f938aba43c77be9c0
show more ...
|
e6c417cf | 02-Feb-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Fixed handling maxAppendLimit
maxLimit prevented using numeric_limits<uint64_t>::max as a way to let telemetry service deduce appendLimit. This commit fixes constrain to allow passing this special v
Fixed handling maxAppendLimit
maxLimit prevented using numeric_limits<uint64_t>::max as a way to let telemetry service deduce appendLimit. This commit fixes constrain to allow passing this special value.
Tested: - Added new unit tests that confirm numeric_limits<uint64_t>::max is correctly handled in telemetry service
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I5d67e83475cdfcbb58a71b783ac9eef1e5ad7010
show more ...
|
cd5b0b7e | 20-Jan-2022 |
Ankita Vilas Gawade <ankita.gawade@intel.com> |
Add limit to Metric URIs to avoid buffer overflow
This commit Limits the Number of Metrics to 150 URIs to avoid overpopulating the Event to be Sent. This is Necessary to avoid Buffer Overflow Durin
Add limit to Metric URIs to avoid buffer overflow
This commit Limits the Number of Metrics to 150 URIs to avoid overpopulating the Event to be Sent. This is Necessary to avoid Buffer Overflow During Creation of Periodic MetricReport (RedfishEvent) via Event Service Subscription. This Buffer overflow occurs as the max size of buffer used to send Events is limited to 1024*64
This commit also removes max-reading-parameter as max-number-metrics indirectly places constraint over number of reading parameters (which makes them mutually exclusive).The parameter max-number-metrics provides a better control over size of the metrics compared to max-reading-parameter as it restricts the number of overall uris instead of number of metrics.
Additional limit for appendLimit was added to ensure we can store all metric values in persistent memory.
Tested: - Created Metric Report Defination by POST to /redfish/v1/TelemetryService/MetricReportDefinitions/ with <150, =150 and >150 Metric Uris Successfully returned error for metric uris>150. - Observed no buffer overflow for Maximum of 150 Metric Uris. - Verified buffer Overflow by Subscribing to Metric Reports using SSE. - Test case Passed [ RUN ] TestReportManager.failToAddReportWith MoreSensorParametersThanExpected [ OK ] TestReportManager.failToAddReportWith MoreSensorParametersThanExpected (10 ms) [ RUN ] TestReportManager.failToAddReportWith MoreMetricsThanExpected [ OK ] TestReportManager.failToAddReportWith MoreMetricsThanExpected (20 ms) [ RUN ] TestReportManager.failToAddReportWith AppendLimitGreaterThanMax [ OK ] TestReportManager.failToAddReportWith AppendLimitGreaterThanMax (20 ms)
Signed-off-by: Ankita Vilas Gawade <ankita.gawade@intel.com> Change-Id: I113c15c7b1054364d827f39582c7d3fbe9495d12
show more ...
|
a950e42b | 31-Dec-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Added constrains to id generator
This commit prevents id with more than one '/'. Slash can be used to create namespaces to avoid id conflicts between multiple users.
Changed generator logic to take
Added constrains to id generator
This commit prevents id with more than one '/'. Slash can be used to create namespaces to avoid id conflicts between multiple users.
Changed generator logic to take provided id as a name if no name was provided.
Tested: - Tested that id and name generates correctly - It is no longer possible to add id with more than one '/'
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: Ieef32ddb71b5a4870117aab0d624cbd46b5893e6
show more ...
|
fbeb5bf4 | 03-Jan-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
fixed clang-tidy errors
fixed clang compilation error and few clang-tidy issues
Tested: - Code compiles, all unit tests are passing - Number of reported clang-tidy issues decreased
Change-Id: Ie3f
fixed clang-tidy errors
fixed clang compilation error and few clang-tidy issues
Tested: - Code compiles, all unit tests are passing - Number of reported clang-tidy issues decreased
Change-Id: Ie3f88db6e2dffb26ec6c56dbdc1ce5bad288dccd Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
51f0fd50 | 28-Dec-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Fixed issue with wrong timestamp
Telemetry service used steady_clock for generating timestamps, but it produced incorrect time. This change makes telemetry service use steady_clock for intervals and
Fixed issue with wrong timestamp
Telemetry service used steady_clock for generating timestamps, but it produced incorrect time. This change makes telemetry service use steady_clock for intervals and system_clock for timestamps.
Changed readings timestamp to display current timestamp instead of a time when reading was received.
Tested: - correct timestamp is visible on dbus - other telemetry service features are still working
Change-Id: Ic49f45640532cfffaeff5e0bd5591e6d99e5def5 Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
31db7f71 | 21-Dec-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Added missing const
No functional changes.
Tested: - Compiles and unit tests are passing
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3b22bdf1b99fe5893459bb0fa57b26
Added missing const
No functional changes.
Tested: - Compiles and unit tests are passing
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I3b22bdf1b99fe5893459bb0fa57b261b272700a2
show more ...
|
3e2cc9d4 | 14-Dec-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
Update subprojects versions
Local meson + ninja build was failing, because phosphor-logging was set to old version without meson.build file.
Sdbusplus was also updated, and setters have been update
Update subprojects versions
Local meson + ninja build was failing, because phosphor-logging was set to old version without meson.build file.
Sdbusplus was also updated, and setters have been updated to reflect its latest changes.
Testing done: - local build is working properly. - UTs are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I71d5a4bbf7aae4573dcfa014fc46a9f7862ecec8
show more ...
|
b8cc78dd | 29-Nov-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Api changes in AddReportFuture version
Added support for CollectionFunction, CollectionDuration, CollectionTimeScope, ReportUpdates, AppendLimit.
New API separates Id and Name, user can decide to p
Api changes in AddReportFuture version
Added support for CollectionFunction, CollectionDuration, CollectionTimeScope, ReportUpdates, AppendLimit.
New API separates Id and Name, user can decide to pass only Name to auto generate Id or pass Id which needs to be unique.
Tested: - No functional changes to old API, everything works as before - All use cases can be replaced with new API to achieve same results - New features which require new API work as expected
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I647efab36d90a548754f89968223e162a087481e
show more ...
|
51497a0c | 09-Nov-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Using enum class instead of string in more places
ReportingType and ReportUpdates are now used as enum class in more places than before. Changed how this two fields are stored in persistent configur
Using enum class instead of string in more places
ReportingType and ReportUpdates are now used as enum class in more places than before. Changed how this two fields are stored in persistent configuration. Increased Report::Version to break backward compatibility. Updated unit tests to verify changed functionality.
Tested: - All existing tests are passing
Change-Id: I55db205aefbe2b5a69fb7a31ccf11885aaecaaf2 Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|