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 ...
|
2efa95d8 | 19-Oct-2024 |
Ed Tanous <ed@tanous.net> |
Remove variant from Thresholds interface
The Thresholds property on the Trigger interface is currently defined as a relatively complex type: variant< array<discrete struct> array<numeric struc
Remove variant from Thresholds interface
The Thresholds property on the Trigger interface is currently defined as a relatively complex type: variant< array<discrete struct> array<numeric struct> >
This causes some oddities in unpacking given that Dbus properties are already a variant, applications consuming this interface have to double wrap the variant. This was confusing enough that bmcweb has to keep the trigger types separate, and cannot use the common typing.
This commit changes by adding two new parameters NumericThresholds: array<numeric struct> DiscreteThresholds: array<discrete struct>
Which deduplicates the double wrapped variant.
The intent is that this duplicated interface will exist for a transition period of a week or two, while bmcweb (the only user of this) transitions the code to use the new properties, then a followup common will drop the thresholds properly.
Tested: WIP
Change-Id: I6717d4075de53c91aa179a90c7a844c4a13534cc Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
c7935fa1 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I016cb74930cc475843c30bd604e739058effa504 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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 ...
|
3a1c297a | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I1ac255c58971ac5cc4697b8bb1069067aad02d18 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
62c08e9b | 16-Sep-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Redesigned error handling
Current error handling send only error code, which is not enough to display detailed information. New error handling in additional to error code send property name. This al
Redesigned error handling
Current error handling send only error code, which is not enough to display detailed information. New error handling in additional to error code send property name. This allows to send meaningful messages back to used about errors.
Tested: - Old redfish code properly handles errors (reads only error_code) - Redfish version which read property name from error displays more detailed error information
Change-Id: I54caa20881ac3f3e38cb295a3aa95ddab491303f Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
bcf045a4 | 16-Sep-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Fix clang errors
- structs used in emplace_back now have defined constructor - removed dead code from ensure
Testing done: - CI tests are passing - UTs are passing
Signed-off-by: Szymon Dompke <sz
Fix clang errors
- structs used in emplace_back now have defined constructor - removed dead code from ensure
Testing done: - CI tests are passing - UTs are passing
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I3f56a3796e45d608c7a5d3da1f8c2d674d62f567
show more ...
|
a8182beb | 04-Jul-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
added Enabled to AddReportFutureVersion API
- New parameter added to API - Changed API to be more flexible in the future
Tested: - Unit tests are passing - Tested together with: https://gerrit.op
added Enabled to AddReportFutureVersion API
- New parameter added to API - Changed API to be more flexible in the future
Tested: - Unit tests are passing - Tested together with: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/49796/23 POST, PATCH, PUT for MetricReportDefinitions are working correctly
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Change-Id: Ic988446d283a581dc6866418b1b27a989c3bc9a0
show more ...
|
973b4bb0 | 25-Apr-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
fixing Set on report properties
Setting valid value for property which is incorrect for current configuration will result in OK response, but will change ErrorMessages property. ErrorMessages will c
fixing Set on report properties
Setting valid value for property which is incorrect for current configuration will result in OK response, but will change ErrorMessages property. ErrorMessages will contain information about error type and property name.
Tested: - Change interval from 1000 to 0 for periodic report changes status from Enabled to Disabled. - Change interval from 0 to 1000 for periodic report changes status from Disabled to Enabled.
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I34add1ed0308b3da0850b1db6a67a217d11b6956
show more ...
|
b7b7e1b6 | 19-May-2022 |
Szymon Dompke <szymon.dompke@intel.com> |
Update Trigger Actions implementation
Dbus trigger action names were modified to reflect separation of Telemetry Service from Redfish: - LogToLogService is renamed to LogToJournal, - RedfishEvent wa
Update Trigger Actions implementation
Dbus trigger action names were modified to reflect separation of Telemetry Service from Redfish: - LogToLogService is renamed to LogToJournal, - RedfishEvent was renamed to LogToRedfishEventLog
Both of those logging actions, now also include trigger id and threshold name. Threshold naming logic: - For discrete triggers, it can be specified by user, if left empty it will be changed to "{Severity} condition". - Numeric triggers have no way of naming threshold, instead its type will be converted to string, example "UpperWarning" - Discrete OnChange threshold will always be named "OnChange"
Additionally, defect was found with timestamp attached to Trigger Logs: it was a steady_clock timestamp instead of system_clock. The function which was supposed to format it was also working incorrectly, and was improved to work with milliseconds. This change required major refactor of unit tests, especially for numeric threshold.
Testing done: - LogToJournal action is working properly, - LogToRedfishEventLog action is working properly, - UTs are passing.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: Iae2490682f0e9e2a610b45fd8af5cc5e21e66f35
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 ...
|
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 ...
|
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 ...
|
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 ...
|
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 ...
|
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 ...
|
2001301a | 23-Jul-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
Modify Trigger dbus api
'AddTrigger' method is now using array of strings for actions instead of boolean flags. The action names are following: - 'UpdateReport' (same as old flag) - 'LogToLogService
Modify Trigger dbus api
'AddTrigger' method is now using array of strings for actions instead of boolean flags. The action names are following: - 'UpdateReport' (same as old flag) - 'LogToLogService' (old 'LogToJournal' flag) - 'RedfishEvent' (old 'LogToRedfish' flag) Additionally, isDiscrete flag was removed from 'AddTrigger' call, as this value can be extracted depending on threshold.
As a result new 'AddTrigger" signature is: "sasa{os}asv" Example call parameters: - TestTrigger 1 UpdateReport 0 0 "a(stsd)" 1 LowerWarning 1000 Either 42.7' - TestTrigger 2 UpdateReport RedfishEvent 0 0 "a(ssts)" 1 userId_1 Warning 10 15.2'
'Trigger' properties were also modified. Instead of action bool properties (same as mentioned above), new property was introduced 'TriggerActions' - which has same values as those used in 'AddTrigger' method. This also affects persistence: store/load functionality was modified accordingly.
As a side change - isDiscrete is no longer stored, as this can be easily recreated in the runtime.
Tested: - Trigger was successfully created using dbus. - busctl introspect was called on test trigger and properties are modified and working as intended. - persistency mechanic is working propetly.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: Icd64d4032fd6d446d9b6ad248e28e9031af1fed7
show more ...
|
8069771c | 04-Mar-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
added support for Collection Functions
new supported operations: min,max,sum,avg new supported time scopes: interval,startup
added unit test to verify that each collection function returns correct
added support for Collection Functions
new supported operations: min,max,sum,avg new supported time scopes: interval,startup
added unit test to verify that each collection function returns correct timestamp and value
Tested: - POST/GET on telemetry features in bmcweb, no regression detected - Using dbus API metric with collection function works as expected
Change-Id: Ib364c433915e07fd7a102f00109525362c40ab8a Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
show more ...
|
e702a5de | 06-Aug-2021 |
Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> |
Modify severity text for discrete Triggers
Changed text string representation of severity for discrete Triggers, needed to conform to Redfish Schema: https://redfish.dmtf.org/schemas/v1/Triggers.v1_
Modify severity text for discrete Triggers
Changed text string representation of severity for discrete Triggers, needed to conform to Redfish Schema: https://redfish.dmtf.org/schemas/v1/Triggers.v1_1_4.json AND https://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Health
Tested: - Creating various discrete Triggers and retrieving information about them from Telemetry (via bmcweb by POST/GET, via QEMU cli by busctl) - Verifying retrieved Redfish data by using Redfish-Service-Validator
Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> Change-Id: Ic24cb163a3e7a7ab6228999f6f9d71f6277c7d78
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 ...
|
9f9ff90a | 05-Mar-2021 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Revert "created AddReportFutureVersion dbus method"
This reverts commit 753e4b3c843dd5d1068949c4106a6389f0e0ffbc.
Reason for revert: Breaks bmcweb, same approach is needed for changed properties
C
Revert "created AddReportFutureVersion dbus method"
This reverts commit 753e4b3c843dd5d1068949c4106a6389f0e0ffbc.
Reason for revert: Breaks bmcweb, same approach is needed for changed properties
Change-Id: Id868159df916fcf0bdd7fc5062f8c51187fcc7e2
show more ...
|