#
f535cad6 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I956cf3cb1bbfc017c4d4dceb3195c1d0735b0605 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
9f346790 |
| 14-Jul-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
Change discrete threshold value to string
For compliance with redfish schema, trigger with discrete thresholds should use string as a value - instead of double. This will impact dbus method "AddTrig
Change discrete threshold value to string
For compliance with redfish schema, trigger with discrete thresholds should use string as a value - instead of double. This will impact dbus method "AddTrigger" for Trigger interface. As there are currently no known sensors with discrete values, telemetry service will still treat the value as a double internally.
Tested: - UT passed. - Trigger with discrete threshold value was successfully created using dbus call. - local redfish-tests for trigger persistency are passing after type modification.
Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I8201ce5e2a45647206c5ccd85fc45ea8f32961af
show more ...
|
#
4416fce6 |
| 16-Mar-2021 |
Cezary Zwolak <cezary.zwolak@intel.com> |
Read persistent triggers from storage
Read json storage file for persistent triggers. Add trigger to telemetry service. Cover code with UTs.
Tested: - Passed unit tests - Tested on QEMU * s
Read persistent triggers from storage
Read json storage file for persistent triggers. Add trigger to telemetry service. Cover code with UTs.
Tested: - Passed unit tests - Tested on QEMU * starting app without configuration * restart app with configuration stored * restart app with configuration in incorrect version * restart app with configuration malformed
Change-Id: I2cb9324abdb8323be8a7f0c932ed7f70c5bc2891 Signed-off-by: Cezary Zwolak <cezary.zwolak@intel.com> Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
show more ...
|
#
a4e67616 |
| 18-Feb-2021 |
Cezary Zwolak <cezary.zwolak@intel.com> |
Save persistent triggers to storage
Create json storage file for persistent triggers. Handle persistent dbus property. Save/remove persistent triggers on add/delete. Cover code with UTs.
Tested:
Save persistent triggers to storage
Create json storage file for persistent triggers. Handle persistent dbus property. Save/remove persistent triggers on add/delete. Cover code with UTs.
Tested: - Passed unit tests - Tested on QEMU * adding new valid and invalid trigger from cli * verifying if valid trigger is properly stored * deleting existed trigger from storage
Change-Id: I243326e84833a8cb22075fbf565573b62b205b4a Signed-off-by: Cezary Zwolak <cezary.zwolak@intel.com> Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com>
show more ...
|
#
f763c9e3 |
| 12-Mar-2021 |
Szymon Dompke <szymon.dompke@intel.com> |
Added discrete threshold trigger support
Implemented discrete threshold logic Discrete trigger with empty threshold array is handled as 'onChange' Added unit tests coverage for discrete trigger
Sup
Added discrete threshold trigger support
Implemented discrete threshold logic Discrete trigger with empty threshold array is handled as 'onChange' Added unit tests coverage for discrete trigger
Supported scenarios: -discrete threshold with value and dwell time -discrete threshold with value, without dwell time -discrete trigger without threshold ('onChange')
Tests: -Unit tests passed
Change-Id: Id60a48f4113bd955d97e154888c00d1b6e5490af Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
show more ...
|
#
9f145912 |
| 11-Feb-2021 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Match DBus Trigger with phosphor-dbus-interfaces
Matched Trigger DBus interface to the one defined in phosphor-dbus-interfaces repository. Changed enum (int) type to string to reflect enum type defi
Match DBus Trigger with phosphor-dbus-interfaces
Matched Trigger DBus interface to the one defined in phosphor-dbus-interfaces repository. Changed enum (int) type to string to reflect enum type defined in Trigger.yaml. Fixed style in boost_build_1.74.0.sh script.
Tested: - Passed unit tests - Verified manually Trigger DBus object in witherspoon image on QEMU
Change-Id: I87175fc285afd182d1383da5879f89233b9de6a0 Signed-off-by: Wludzik, Jozef <jozef.wludzik@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 ...
|
#
1477fe6a |
| 02-Jan-2021 |
Wludzik, Jozef <jozef.wludzik@intel.com> |
Implement NumericThreshold for Trigger
Implemented NumericThreshold for Trigger that allows to set expected threshold value for collection of sensors and monitors if this value is crossed. Implement
Implement NumericThreshold for Trigger
Implemented NumericThreshold for Trigger that allows to set expected threshold value for collection of sensors and monitors if this value is crossed. Implemented detection of direction when threshold value is crossed. Added initial interface that is used to commit an action when threshold value is crossed. Moved Sensor Cache from Report Factory to Telemetry class, now Sensor Cache is shared between Report Factory and Trigger Factory. Moved fetching sensor from Dbus to seperate header to have single implementation for factories. Disabled tests that uses boost coroutine because of false positive that is catched by address sanitizer.
Tested: - Passed unit tests - Built in yocto envrionment with success - Telemetry service started successfully in OpenBMC
Change-Id: I1ff7ab96174a27576786f0b9a71554fe1eeff436 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 ...
|