History log of /openbmc/telemetry/tests/src/params/ (Results 1 – 25 of 34)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
b3e03d2d28-Jun-2024 Michal Orzel <michalx.orzel@intel.com>

Address Valgrind issues in CI

Fixes "uninitialized values" errors reported by Valgrind. Problem
occurred from lack of specializations of googletest's PrintTo functions
for several custom types.

Tes

Address Valgrind issues in CI

Fixes "uninitialized values" errors reported by Valgrind. Problem
occurred from lack of specializations of googletest's PrintTo functions
for several custom types.

Tested:
On local CI container. After applying this patch issues stopped
appearing.

Change-Id: I98d9fd19724bee15add7b19422a9ddc2e4cbef09
Signed-off-by: Michal Orzel <michalx.orzel@intel.com>

show more ...


/openbmc/telemetry/.clang-format
/openbmc/telemetry/.gitignore
/openbmc/telemetry/OWNERS
/openbmc/telemetry/meson.build
/openbmc/telemetry/meson.options
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/metrics/collection_function.cpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/sensor.cpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/types/readings.cpp
/openbmc/telemetry/src/types/report_types.cpp
/openbmc/telemetry/src/utils/conversion.hpp
/openbmc/telemetry/src/utils/conversion_trigger.cpp
/openbmc/telemetry/src/utils/labeled_tuple.hpp
/openbmc/telemetry/src/utils/make_id_name.cpp
/openbmc/telemetry/src/utils/messanger_service.cpp
/openbmc/telemetry/src/utils/threshold_operations.hpp
/openbmc/telemetry/subprojects/nlohmann_json.wrap
/openbmc/telemetry/tests/meson.build
/openbmc/telemetry/tests/src/dbus_environment.hpp
/openbmc/telemetry/tests/src/helpers.hpp
/openbmc/telemetry/tests/src/helpers/report_params_helpers.hpp
/openbmc/telemetry/tests/src/helpers/trigger_helpers.hpp
/openbmc/telemetry/tests/src/helpers/types/container_types_helpers.hpp
/openbmc/telemetry/tests/src/mocks/report_factory_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_factory_mock.hpp
report_params.hpp
/openbmc/telemetry/tests/src/test_discrete_threshold.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_numeric_threshold.cpp
/openbmc/telemetry/tests/src/test_on_change_threshold.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_sensor_cache.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_manager.cpp
cff70c1427-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 ...

3a1c297a10-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 ...


/openbmc/telemetry/.clang-format
/openbmc/telemetry/.gitignore
/openbmc/telemetry/README.md
/openbmc/telemetry/meson.build
/openbmc/telemetry/meson_options.txt
/openbmc/telemetry/redfish-tests/README.md
/openbmc/telemetry/redfish-tests/conftest.py
/openbmc/telemetry/redfish-tests/redfish_requests.py
/openbmc/telemetry/redfish-tests/test_telemetry.py
/openbmc/telemetry/src/errors.cpp
/openbmc/telemetry/src/errors.hpp
/openbmc/telemetry/src/interfaces/metric.hpp
/openbmc/telemetry/src/main.cpp
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/metric.hpp
/openbmc/telemetry/src/metric_value.hpp
/openbmc/telemetry/src/metrics/collection_data.cpp
/openbmc/telemetry/src/metrics/collection_function.cpp
/openbmc/telemetry/src/numeric_threshold.cpp
/openbmc/telemetry/src/persistent_json_storage.cpp
/openbmc/telemetry/src/persistent_json_storage.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/sensor.cpp
/openbmc/telemetry/src/sensor.hpp
/openbmc/telemetry/src/state.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/types/collection_time_scope.hpp
/openbmc/telemetry/src/types/error_message.hpp
/openbmc/telemetry/src/types/error_type.hpp
/openbmc/telemetry/src/types/operation_type.hpp
/openbmc/telemetry/src/types/readings.cpp
/openbmc/telemetry/src/types/report_action.hpp
/openbmc/telemetry/src/types/report_types.cpp
/openbmc/telemetry/src/types/report_types.hpp
/openbmc/telemetry/src/types/report_updates.hpp
/openbmc/telemetry/src/types/reporting_type.hpp
/openbmc/telemetry/src/types/trigger_types.hpp
/openbmc/telemetry/src/utils/circular_vector.hpp
/openbmc/telemetry/src/utils/contains.hpp
/openbmc/telemetry/src/utils/conversion.hpp
/openbmc/telemetry/src/utils/conversion_trigger.cpp
/openbmc/telemetry/src/utils/conversion_trigger.hpp
/openbmc/telemetry/src/utils/dbus_path_utils.cpp
/openbmc/telemetry/src/utils/dbus_path_utils.hpp
/openbmc/telemetry/src/utils/ensure.hpp
/openbmc/telemetry/src/utils/labeled_tuple.hpp
/openbmc/telemetry/src/utils/make_id_name.cpp
/openbmc/telemetry/src/utils/messanger_service.cpp
/openbmc/telemetry/src/utils/messanger_service.hpp
/openbmc/telemetry/src/utils/threshold_operations.hpp
/openbmc/telemetry/src/utils/transform.hpp
/openbmc/telemetry/src/utils/variant_utils.hpp
/openbmc/telemetry/subprojects/boost.wrap
/openbmc/telemetry/subprojects/googletest.wrap
/openbmc/telemetry/subprojects/packagefiles/boost/meson.build
/openbmc/telemetry/tests/meson.build
/openbmc/telemetry/tests/src/dbus_environment.hpp
/openbmc/telemetry/tests/src/helpers/interfaces/json_storage_helpers.hpp
/openbmc/telemetry/tests/src/helpers/interfaces/sensor_id_helpers.hpp
/openbmc/telemetry/tests/src/helpers/metric_value_helpers.hpp
/openbmc/telemetry/tests/src/mocks/metric_mock.hpp
/openbmc/telemetry/tests/src/mocks/report_factory_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_factory_mock.hpp
trigger_params.hpp
/openbmc/telemetry/tests/src/stubs/dbus_sensor_object.cpp
/openbmc/telemetry/tests/src/test_conversion.cpp
/openbmc/telemetry/tests/src/test_discrete_threshold.cpp
/openbmc/telemetry/tests/src/test_ensure.cpp
/openbmc/telemetry/tests/src/test_labeled_tuple.cpp
/openbmc/telemetry/tests/src/test_make_id_name.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_persistent_json_storage.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_sensor_cache.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_actions.cpp
/openbmc/telemetry/tests/src/test_trigger_manager.cpp
/openbmc/telemetry/tests/src/utils/string_utils.cpp
/openbmc/telemetry/tests/src/utils/string_utils.hpp
/openbmc/telemetry/xyz.openbmc_project.Telemetry.service.in
32305f1405-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 ...

1cdd7e4f08-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 ...


/openbmc/telemetry/meson.build
/openbmc/telemetry/src/discrete_threshold.cpp
/openbmc/telemetry/src/discrete_threshold.hpp
/openbmc/telemetry/src/numeric_threshold.cpp
/openbmc/telemetry/src/numeric_threshold.hpp
/openbmc/telemetry/src/on_change_threshold.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_manager.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger.hpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/trigger_manager.hpp
/openbmc/telemetry/src/utils/dbus_path_utils.cpp
/openbmc/telemetry/src/utils/dbus_path_utils.hpp
/openbmc/telemetry/src/utils/generate_id.cpp
/openbmc/telemetry/src/utils/threshold_operations.hpp
/openbmc/telemetry/tests/meson.build
/openbmc/telemetry/tests/src/dbus_environment.cpp
/openbmc/telemetry/tests/src/helpers.hpp
/openbmc/telemetry/tests/src/helpers/types/object_path_helpers.hpp
/openbmc/telemetry/tests/src/main.cpp
trigger_params.hpp
/openbmc/telemetry/tests/src/stubs/dbus_sensor_object.cpp
/openbmc/telemetry/tests/src/test_conversion.cpp
/openbmc/telemetry/tests/src/test_ensure.cpp
/openbmc/telemetry/tests/src/test_generate_id.cpp
/openbmc/telemetry/tests/src/test_numeric_threshold.cpp
/openbmc/telemetry/tests/src/test_path_append.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_actions.cpp
/openbmc/telemetry/tests/src/test_trigger_manager.cpp
/openbmc/telemetry/tests/src/utils/generate_unique_mock_id.cpp
973b4bb025-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 ...


/openbmc/telemetry/meson.build
/openbmc/telemetry/src/discrete_threshold.cpp
/openbmc/telemetry/src/discrete_threshold.hpp
/openbmc/telemetry/src/interfaces/metric.hpp
/openbmc/telemetry/src/interfaces/trigger_action.hpp
/openbmc/telemetry/src/interfaces/trigger_factory.hpp
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/metric.hpp
/openbmc/telemetry/src/numeric_threshold.cpp
/openbmc/telemetry/src/numeric_threshold.hpp
/openbmc/telemetry/src/on_change_threshold.cpp
/openbmc/telemetry/src/on_change_threshold.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/state.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger.hpp
/openbmc/telemetry/src/trigger_actions.cpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_factory.hpp
/openbmc/telemetry/src/types/error_message.hpp
/openbmc/telemetry/src/types/error_type.hpp
/openbmc/telemetry/src/types/trigger_types.hpp
/openbmc/telemetry/src/utils/conversion_trigger.cpp
/openbmc/telemetry/src/utils/conversion_trigger.hpp
/openbmc/telemetry/src/utils/ensure.hpp
/openbmc/telemetry/src/utils/generate_id.cpp
/openbmc/telemetry/subprojects/nlohmann.wrap
/openbmc/telemetry/subprojects/phosphor-logging.wrap
/openbmc/telemetry/subprojects/sdbusplus.wrap
/openbmc/telemetry/tests/src/mocks/clock_mock.hpp
/openbmc/telemetry/tests/src/mocks/metric_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_action_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_factory_mock.hpp
report_params.hpp
/openbmc/telemetry/tests/src/test_discrete_threshold.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_numeric_threshold.cpp
/openbmc/telemetry/tests/src/test_on_change_threshold.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_actions.cpp
493e62eb14-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 ...

f7ea299727-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 ...

fdb06a1411-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 ...

60fee07713-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 ...

e6d4887408-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 ...


/openbmc/telemetry/meson.build
/openbmc/telemetry/src/interfaces/report.hpp
/openbmc/telemetry/src/interfaces/report_factory.hpp
/openbmc/telemetry/src/interfaces/report_manager.hpp
/openbmc/telemetry/src/interfaces/trigger.hpp
/openbmc/telemetry/src/interfaces/trigger_manager.hpp
/openbmc/telemetry/src/messages/collect_trigger_id.hpp
/openbmc/telemetry/src/messages/presence.hpp
/openbmc/telemetry/src/messages/trigger_presence_changed_ind.hpp
/openbmc/telemetry/src/messages/update_report_ind.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_factory.hpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/report_manager.hpp
/openbmc/telemetry/src/telemetry.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger.hpp
/openbmc/telemetry/src/trigger_actions.cpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_factory.hpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/trigger_manager.hpp
/openbmc/telemetry/src/types/report_types.hpp
/openbmc/telemetry/src/utils/messanger.hpp
/openbmc/telemetry/src/utils/messanger_service.cpp
/openbmc/telemetry/src/utils/messanger_service.hpp
/openbmc/telemetry/subprojects/googletest.wrap
/openbmc/telemetry/tests/meson.build
/openbmc/telemetry/tests/src/mocks/report_factory_mock.hpp
/openbmc/telemetry/tests/src/mocks/report_manager_mock.hpp
/openbmc/telemetry/tests/src/mocks/report_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_manager_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_mock.hpp
report_params.hpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_actions.cpp
b4ef22e407-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 ...

94f71c5110-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 ...


/openbmc/telemetry/meson.build
/openbmc/telemetry/meson_options.txt
/openbmc/telemetry/src/discrete_threshold.cpp
/openbmc/telemetry/src/discrete_threshold.hpp
/openbmc/telemetry/src/interfaces/sensor.hpp
/openbmc/telemetry/src/interfaces/threshold.hpp
/openbmc/telemetry/src/interfaces/trigger_factory.hpp
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/numeric_threshold.cpp
/openbmc/telemetry/src/numeric_threshold.hpp
/openbmc/telemetry/src/on_change_threshold.cpp
/openbmc/telemetry/src/on_change_threshold.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_factory.hpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/report_manager.hpp
/openbmc/telemetry/src/sensor.cpp
/openbmc/telemetry/src/sensor.hpp
/openbmc/telemetry/src/telemetry.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger.hpp
/openbmc/telemetry/src/trigger_actions.cpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_factory.hpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/trigger_manager.hpp
/openbmc/telemetry/src/types/report_types.cpp
/openbmc/telemetry/src/types/report_types.hpp
/openbmc/telemetry/src/types/report_updates.hpp
/openbmc/telemetry/src/types/sensor_types.hpp
/openbmc/telemetry/src/types/trigger_types.hpp
/openbmc/telemetry/src/utils/circular_vector.hpp
/openbmc/telemetry/src/utils/conversion_trigger.cpp
/openbmc/telemetry/src/utils/conversion_trigger.hpp
/openbmc/telemetry/src/utils/dbus_mapper.hpp
/openbmc/telemetry/src/utils/generate_id.cpp
/openbmc/telemetry/src/utils/generate_id.hpp
/openbmc/telemetry/src/utils/labeled_tuple.hpp
/openbmc/telemetry/src/utils/threshold_operations.hpp
/openbmc/telemetry/tests/src/dbus_environment.hpp
/openbmc/telemetry/tests/src/mocks/report_factory_mock.hpp
/openbmc/telemetry/tests/src/mocks/report_mock.hpp
/openbmc/telemetry/tests/src/mocks/sensor_mock.hpp
/openbmc/telemetry/tests/src/mocks/threshold_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_factory_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_mock.hpp
report_params.hpp
trigger_params.hpp
/openbmc/telemetry/tests/src/test_discrete_threshold.cpp
/openbmc/telemetry/tests/src/test_generate_id.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_numeric_threshold.cpp
/openbmc/telemetry/tests/src/test_on_change_threshold.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_sensor.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_actions.cpp
/openbmc/telemetry/tests/src/test_trigger_manager.cpp
51f0fd5028-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 ...


/openbmc/telemetry/src/details/collection_function.cpp
/openbmc/telemetry/src/details/collection_function.hpp
/openbmc/telemetry/src/discrete_threshold.cpp
/openbmc/telemetry/src/discrete_threshold.hpp
/openbmc/telemetry/src/interfaces/clock.hpp
/openbmc/telemetry/src/interfaces/sensor_listener.hpp
/openbmc/telemetry/src/interfaces/trigger_action.hpp
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/metric.hpp
/openbmc/telemetry/src/numeric_threshold.cpp
/openbmc/telemetry/src/numeric_threshold.hpp
/openbmc/telemetry/src/on_change_threshold.cpp
/openbmc/telemetry/src/on_change_threshold.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_manager.hpp
/openbmc/telemetry/src/sensor.cpp
/openbmc/telemetry/src/sensor.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger_actions.cpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_manager.hpp
/openbmc/telemetry/src/types/collection_duration.hpp
/openbmc/telemetry/src/types/duration_types.hpp
/openbmc/telemetry/src/utils/clock.hpp
/openbmc/telemetry/src/utils/detached_timer.hpp
/openbmc/telemetry/subprojects/phosphor-logging.wrap
/openbmc/telemetry/subprojects/sdbusplus.wrap
/openbmc/telemetry/tests/src/dbus_environment.hpp
/openbmc/telemetry/tests/src/fakes/clock_fake.hpp
/openbmc/telemetry/tests/src/helpers.hpp
/openbmc/telemetry/tests/src/helpers/types/duration_types_helpers.hpp
/openbmc/telemetry/tests/src/mocks/sensor_listener_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_action_mock.hpp
trigger_params.hpp
/openbmc/telemetry/tests/src/test_discrete_threshold.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_numeric_threshold.cpp
/openbmc/telemetry/tests/src/test_on_change_threshold.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_sensor.cpp
/openbmc/telemetry/tests/src/test_trigger_actions.cpp
b8cc78dd29-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 ...


/openbmc/telemetry/meson.build
/openbmc/telemetry/src/discrete_threshold.cpp
/openbmc/telemetry/src/discrete_threshold.hpp
/openbmc/telemetry/src/interfaces/report.hpp
/openbmc/telemetry/src/interfaces/report_factory.hpp
/openbmc/telemetry/src/interfaces/report_manager.hpp
/openbmc/telemetry/src/interfaces/sensor.hpp
/openbmc/telemetry/src/interfaces/trigger_factory.hpp
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/metric.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_factory.hpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/report_manager.hpp
/openbmc/telemetry/src/sensor.cpp
/openbmc/telemetry/src/sensor.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger.hpp
/openbmc/telemetry/src/trigger_actions.cpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_factory.hpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/trigger_manager.hpp
/openbmc/telemetry/src/types/operation_type.hpp
/openbmc/telemetry/src/types/report_types.cpp
/openbmc/telemetry/src/types/report_types.hpp
/openbmc/telemetry/src/types/trigger_types.hpp
/openbmc/telemetry/src/utils/conversion.hpp
/openbmc/telemetry/src/utils/conversion_trigger.cpp
/openbmc/telemetry/src/utils/generate_id.cpp
/openbmc/telemetry/src/utils/generate_id.hpp
/openbmc/telemetry/src/utils/labeled_tuple.hpp
/openbmc/telemetry/src/utils/tstring.hpp
/openbmc/telemetry/tests/meson.build
/openbmc/telemetry/tests/src/mocks/report_factory_mock.hpp
/openbmc/telemetry/tests/src/mocks/report_mock.hpp
/openbmc/telemetry/tests/src/mocks/sensor_mock.hpp
/openbmc/telemetry/tests/src/mocks/trigger_factory_mock.hpp
metric_params.hpp
report_params.hpp
trigger_params.hpp
/openbmc/telemetry/tests/src/test_conversion.cpp
/openbmc/telemetry/tests/src/test_generate_id.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_sensor.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_manager.cpp
51497a0c09-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 ...

3eb5686520-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 ...

e28aa53d27-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 ...

7e098e9316-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 ...

2001301a23-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 ...

8069771c04-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 ...

dcc4e19308-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 ...


/openbmc/telemetry/meson.build
/openbmc/telemetry/src/discrete_threshold.cpp
/openbmc/telemetry/src/discrete_threshold.hpp
/openbmc/telemetry/src/interfaces/metric.hpp
/openbmc/telemetry/src/interfaces/report_factory.hpp
/openbmc/telemetry/src/interfaces/sensor.hpp
/openbmc/telemetry/src/interfaces/trigger_factory.hpp
/openbmc/telemetry/src/metric.cpp
/openbmc/telemetry/src/metric.hpp
/openbmc/telemetry/src/numeric_threshold.cpp
/openbmc/telemetry/src/numeric_threshold.hpp
/openbmc/telemetry/src/on_change_threshold.cpp
/openbmc/telemetry/src/on_change_threshold.hpp
/openbmc/telemetry/src/report.cpp
/openbmc/telemetry/src/report.hpp
/openbmc/telemetry/src/report_factory.cpp
/openbmc/telemetry/src/report_factory.hpp
/openbmc/telemetry/src/report_manager.cpp
/openbmc/telemetry/src/report_manager.hpp
/openbmc/telemetry/src/sensor.hpp
/openbmc/telemetry/src/trigger.cpp
/openbmc/telemetry/src/trigger.hpp
/openbmc/telemetry/src/trigger_actions.hpp
/openbmc/telemetry/src/trigger_factory.cpp
/openbmc/telemetry/src/trigger_factory.hpp
/openbmc/telemetry/src/trigger_manager.cpp
/openbmc/telemetry/src/types/collection_duration.hpp
/openbmc/telemetry/src/types/collection_time_scope.hpp
/openbmc/telemetry/src/types/milliseconds.hpp
/openbmc/telemetry/src/types/operation_type.hpp
/openbmc/telemetry/src/types/report_types.cpp
/openbmc/telemetry/src/types/report_types.hpp
/openbmc/telemetry/src/types/trigger_types.hpp
/openbmc/telemetry/src/utils/conversion_trigger.hpp
/openbmc/telemetry/src/utils/detached_timer.hpp
/openbmc/telemetry/src/utils/json.hpp
/openbmc/telemetry/src/utils/labeled_tuple.hpp
/openbmc/telemetry/src/utils/tstring.hpp
/openbmc/telemetry/tests/meson.build
/openbmc/telemetry/tests/src/helpers.hpp
/openbmc/telemetry/tests/src/helpers/labeled_tuple_helpers.hpp
/openbmc/telemetry/tests/src/mocks/metric_mock.hpp
/openbmc/telemetry/tests/src/mocks/report_factory_mock.hpp
metric_params.hpp
report_params.hpp
trigger_params.hpp
/openbmc/telemetry/tests/src/test_discrete_threshold.cpp
/openbmc/telemetry/tests/src/test_metric.cpp
/openbmc/telemetry/tests/src/test_numeric_threshold.cpp
/openbmc/telemetry/tests/src/test_report.cpp
/openbmc/telemetry/tests/src/test_report_manager.cpp
/openbmc/telemetry/tests/src/test_trigger.cpp
/openbmc/telemetry/tests/src/test_trigger_manager.cpp
4416fce616-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 ...

a4e6761618-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 ...

f763c9e312-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 ...

12