#
583ba441 |
| 03-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ic2bc1d98d8ad469a3477f9059ec890fc8339907d Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ic2bc1d98d8ad469a3477f9059ec890fc8339907d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
5e7cbf42 |
| 01-Aug-2024 |
Michal Orzel <michalx.orzel@intel.com> |
Verify reading parameters on update
Adds verification of ReadingParameter's metric count when property is being updated. This brings consistency with behavior upon adding a new report, where that sa
Verify reading parameters on update
Adds verification of ReadingParameter's metric count when property is being updated. This brings consistency with behavior upon adding a new report, where that same check is being made. Also adds a unit test for that check.
Tested: On platform, by updating report's ReadingParameter with object containing metric count exceeding one specified by `max-reading-parameters` project option. With this change applied, that operation failed, as expected.
Change-Id: I06c8e21178d6bd554b62886e0e4f8cd0589f0d09 Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
#
cff70c14 |
| 27-Oct-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Removed FutureVersion from API
Instead of using FutureVersion API currently used version is updated. This change needs to be bumped together with [1]. API that utilized map of variants to be more fl
Removed FutureVersion from API
Instead of using FutureVersion API currently used version is updated. This change needs to be bumped together with [1]. API that utilized map of variants to be more flexible and backwards compatible was reverted. It was decided that straight forward API that is commonly used should be used instead.
Removed MetricId property from Metric. In telemetry it was implemented as a name for Metric, but it was supposed to work as described in [2]. Currently MetricId is not supported by telemetry service and property was removed.
Tested: - After chaging bmcweb to use new API old and new features are working as expected
[1]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/44270 [2]: https://redfish.dmtf.org/schemas/v1/MetricReportDefinition.v1_4_2.json
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I5930a466a370f268d68f575a4a3db5ee9655e574
show more ...
|
#
32305f14 |
| 05-Jul-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Add length limit for user-defined values
Previously, the only limit for most user-defined values like id or name was the one enforced by dbus, which was fairly big. In order to save space used by pe
Add length limit for user-defined values
Previously, the only limit for most user-defined values like id or name was the one enforced by dbus, which was fairly big. In order to save space used by persistent data, new meson options were added, with length limit for those fields.
This directly impacts following dbus interfaces: - TriggerManager.AddTrigger: - Id - Name - Reports - Thresholds (only name of discrete threshold) - Trigger.Name - Trigger.Reports - Trigger.Thresholds (only name of discrete threshold) - ReportManager.AddReport(FutureVersion): - Id - Name - MetricParameters (metricId) - Report.Name - Report.ReadingParameters (metricId)
For Id fields we support 'prefixes', which also are limited, but those limit are separate. So if limit for prefix is set to 5 and limit for id/name is set to 5, following Ids are fine: - 12345/12345 - 12345 and following are not: - 123456/1234 - 1/123456
Testing done: - UTs are passing. - new limits are reflected when calling mentioned dbus interfaces.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I29291a1cc56a344d92fb65491c9186fdb90a8529
show more ...
|
#
1cdd7e4f |
| 08-Jun-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
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.R
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
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
3eb56865 |
| 20-Sep-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
Add support for AppendLimit and ReportUpdates
Added 2 new properties for Report interface: AppendLimit and ReportUpdates. They were also added as arguments to the future version of AddReport method
Add support for AppendLimit and ReportUpdates
Added 2 new properties for Report interface: AppendLimit and ReportUpdates. They were also added as arguments to the future version of AddReport method of ReportManager.
ReportUpdates property defines the report update behavior: - Overwrite: Each report update overrides previous "Readings" property. "AppendLimit" set by user is not respected - "Readings" property size is equal to count of all sensor across all metrics defined in report. - AppendWrapsWhenFull: New readings are appended until limit specified by "AppendLimit" is reached. Then oldest readings are overwritten by new ones. - AppendStopsWhenFull: New readings are appended until limit specified by "AppendLimit" is reached. Then updates are stopped. - NewReport: not supported yet and will be implemented in the future.
Please note that if ReportingType is set to OnRequest, those 2 new properties are ignored, and Readings property will contain one reading per defined sensor, across all metrics. They are still stored, which means that if ReportingType will be changed in the runtime, those properties will be respected.
Tested: - Both new properties can be accessed from dbus. - Both properties are reflected in Readings property. - Old AddReport method is working as before the change. - UTs are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I8a18f7e68215f0f6e5c403b533d2c4ff479df69e
show more ...
|
#
e28aa53d |
| 27-Oct-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
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 h
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
show more ...
|
#
7e098e93 |
| 16-Sep-2021 |
Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> |
Added support for Enabled property
Enabled property is added so that user can select via dbus interface if Readings are updated and signal on Readings update is emitted, moreover Metric calculation
Added support for Enabled property
Enabled property is added so that user can select via dbus interface if Readings are updated and signal on Readings update is emitted, moreover Metric calculation on received sensor data is active only when Enabled is set to true
Tested: - New unit tests were created, ran all new and previous UTs, all passed - Tested under QEMU by adding reports for single and multiple sensors, changing Enabled property and emitting signal of value change for sensors added into the report, checking if Readings is accordingly updated or not updated - Verified persistency, if Enabled property is successfully stored and restored after Telemetry service restart and also checked if after the restart dependencies of Enabled (Readings, Metric calculation) are properly initiated
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> Change-Id: I29cf13693a48d15cb16d2ad6707f483f67f4879b
show more ...
|
#
dcc4e193 |
| 08-Mar-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
created AddReportFutureVersion dbus method
New method will support CollectionTimeScope, CollectionDuration
In order to make not breaking interface changes bmcweb will switch to AddReportFutureVersi
created AddReportFutureVersion dbus method
New method will support CollectionTimeScope, CollectionDuration
In order to make not breaking interface changes bmcweb will switch to AddReportFutureVersion, then AddReport will be changed to match AddReportFutureVersion, then redfish will switch back to use AddReport, then AddReportFutureVersion will be removed.
Tested: - Verified that current version of bmcweb works fine with old API
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: I51a9b7fb2f4da5b8d2f688ccd5e93710352b1ac7
show more ...
|
#
32859b63 |
| 19-May-2021 |
Karol Niczyj <karol.niczyj@intel.com> |
Add limit for report name length
Added limit for report name length, parametrized with max-report-name-length option, because we cannot remove reports with too long report name.
Tested: - Confirmed
Add limit for report name length
Added limit for report name length, parametrized with max-report-name-length option, because we cannot remove reports with too long report name.
Tested: - Confirmed that report with name length equal to 4096 cannot be generated via bmcweb (POST redfish/v1/TelemetryService/MetricReportDefinitions fails with code 500) - Confirmed that report with name length equal to 4095 can be generated and removed via bmcweb - Added unit-test that test that report with name length equal to max-report-name-length + 1 cannot be generated - Added unit-test that test that report with name length equal to max-report-name-length can be generated
Change-Id: I6868320f831079af903f3624d1beff648059e351 Signed-off-by: Karol Niczyj <karol.niczyj@intel.com>
show more ...
|
#
d960e1f3 |
| 08-Jan-2021 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Implement Trigger Actions
Now action is triggered when threshold is crossed. There are 3 actions: write message to journal, write message to journal as Redfish Event and update an existing Report. T
Implement Trigger Actions
Now action is triggered when threshold is crossed. There are 3 actions: write message to journal, write message to journal as Redfish Event and update an existing Report. To update an existing Report updateReading method is changed to public. Added UpdateReport to ReportManager, now object is able to update readings of any report using report name.
Tested: - Unit tests passed - Verified that logs are propagated to journal when threshold is crossed
Change-Id: Iebca7c8b9ab9b50b4c401877ccf8c2f01f1e6f36 Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
show more ...
|
#
76833cb5 |
| 21-Dec-2020 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Add TriggerManager and Trigger objects
Implemented initial version of Trigger and TriggerManager DBus interfaces. Now DBus user is able to add new Trigger and delete it. There is no support for othe
Add TriggerManager and Trigger objects
Implemented initial version of Trigger and TriggerManager DBus interfaces. Now DBus user is able to add new Trigger and delete it. There is no support for other functionality added.
Tested: - Built using yocto dependencies with success - Unit tests passed - Verified manually if Trigger and TriggerManager works as expected
Change-Id: Ie68463526ecccc3be67cc7bfaaf9a9aa7326dee6 Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
show more ...
|
#
503c1589 |
| 11-Dec-2020 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Add meson options to modify Telemetry consts
Added 'min-interval', 'max-reading-parameters' and 'max-reports' to meson_options to allow user to control Telemetry constant values. Now user is able to
Add meson options to modify Telemetry consts
Added 'min-interval', 'max-reading-parameters' and 'max-reports' to meson_options to allow user to control Telemetry constant values. Now user is able to adjust those values to platform. Fixed checking maximal number of ReadingParameters in Report. Synced type of properties with interface defined in phosphor-dbus-interface.
Tested: - Unit tests passes
Change-Id: Ie8c009931d9e5e22b30d7df82c81aaac8d68dd3e Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
show more ...
|
#
bc766b4d |
| 08-Dec-2020 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Add extra input validation for AddReport
Now AddReport checks if ReadingParams exceeds limits that is set to 200. AddReport checks if interval is less than allowed interval only for Periodic reports
Add extra input validation for AddReport
Now AddReport checks if ReadingParams exceeds limits that is set to 200. AddReport checks if interval is less than allowed interval only for Periodic reports. AddReport verify if only single sensor for each reading parameters is provided.
Tested: - Ran unit-tests with success. - Added few reports in OpenBMC environment to check if results are as expected.
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Change-Id: Ife4f8a4cf6a8dc3fa526b66e4c698a57a733de48
show more ...
|
#
d2238194 |
| 02-Dec-2020 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Review fixes for 'Created metric class'
- Changed metric to_json to dumpConfiguration returning LabeledTuple - LabeledTuple can be created and assigned directly to json - LabeledTuple can be readed
Review fixes for 'Created metric class'
- Changed metric to_json to dumpConfiguration returning LabeledTuple - LabeledTuple can be created and assigned directly to json - LabeledTuple can be readed from json using json.get<LabeledTuple> - Added PrintTo for LabeledMetricParams, LabeledSensorParams - Added helper method expectMake to ReportFactoryMock - sensorPaths are serialized to tuple<service, path> instead of single field with service and path separated via ':' - Changed configuration version from 1 to 2
Change-Id: I7c45fb584687172f88fd549a93329264793b0b8e Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
#
e2362796 |
| 27-Oct-2020 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Implement Report persistency
Now Report properties are stored in non-volatile memory. It allows to restore Report after system restart. Persistency of a report is controlled by Persistency property
Implement Report persistency
Now Report properties are stored in non-volatile memory. It allows to restore Report after system restart. Persistency of a report is controlled by Persistency property in Report interface.
Tested: - Passed unit tests - Verified that report is stored in /var/lib/telemetry dir - Verified that report is restored from storage after telemetry service start
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com> Change-Id: Iccfe21603eecffc4e174a4403f699b03de320db9
show more ...
|
#
2f9f9b87 |
| 13-Oct-2020 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Add ReportManager and Report unit tests
Introduced ReportFactory to seperate Report and ReportManager unit tests. Implemented mocks for Report, ReportManager and ReportFactory classes. Added tests f
Add ReportManager and Report unit tests
Introduced ReportFactory to seperate Report and ReportManager unit tests. Implemented mocks for Report, ReportManager and ReportFactory classes. Added tests for DBus Properties and Methods provided by telemetry service.
Tested: - Ran unit-tests with success
Change-Id: I1860e280d26ee4becc52de98dd65e5697d26b376 Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
show more ...
|