26dc0bcb | 16-Jun-2022 |
Patrick Williams <patrick@stwcx.xyz> |
remove std::experimental usage
All of the std::experimental usages in this repository have a well supported counterpart in std as of C++17. Switch to use them.
Signed-off-by: Patrick Williams <pat
remove std::experimental usage
All of the std::experimental usages in this repository have a well supported counterpart in std as of C++17. Switch to use them.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I4cdf5cd27053ce85c7f70c215ee9456f96f79f42
show more ...
|
98d6462a | 24-May-2022 |
Lei YU <yulei.sh@bytedance.com> |
propertywatch: Add ignore_start_callback config
Add an optional `ignore_start_callback` config to indicate if the callback shall be ignored on start.
By default the callbacks in property watch are
propertywatch: Add ignore_start_callback config
Add an optional `ignore_start_callback` config to indicate if the callback shall be ignored on start.
By default the callbacks in property watch are called on start. There are cases where we do not want such behavior and only expect callbacks on property changes.
Add the `ignore_start_callback` so that we could config a watch to not trigger the start callback.
Tested: Verify the callback is not called if the watch config has `ignore_start_callback: true`
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I7e5887cc8b0d0775d9b3d689f1511250667aaa5b
show more ...
|
afa54c68 | 30-Mar-2022 |
Harvey.Wu <Harvey.Wu@quantatw.com> |
Adding to support double type
- The current OpenBMC's value dbus property type has been changed to 'double', so adding to support double type in yaml and format.
phosphor-dbus-interfaces PR: http
Adding to support double type
- The current OpenBMC's value dbus property type has been changed to 'double', so adding to support double type in yaml and format.
phosphor-dbus-interfaces PR: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/11739
Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com> Change-Id: Ic02ce6c8bf91490f7709365c9cbab57b12a264cc
show more ...
|
232f395e | 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia42c547e5f4e7644315dad6f7b13476cd8db4826
show more ...
|
74dc24ad | 10-Jan-2022 |
Paul Fertser <fercerpav@gmail.com> |
snmp_trap: send AdditionalData contents
The log messages often contain essential diagnostics information in a key-value list in AdditionalData. Add it in space-separated form to the SNMP trap.
Sign
snmp_trap: send AdditionalData contents
The log messages often contain essential diagnostics information in a key-value list in AdditionalData. Add it in space-separated form to the SNMP trap.
Signed-off-by: Paul Fertser <fercerpav@gmail.com> Change-Id: I72a49a59e6f3f9fcc24a69b0752cbb7b122be940
show more ...
|
a95e8c81 | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie65c8699ac992c3f4ef0450b9be65bb27e58cc2d |
cfdfa0da | 20-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
pdmgen: workaround restriction in sdbus++ NamedElement
sdbusplus commit dfb5642201 added a restriction to NamedElement that it can only have strings as a 'name', in order to catch bugs in malformed
pdmgen: workaround restriction in sdbus++ NamedElement
sdbusplus commit dfb5642201 added a restriction to NamedElement that it can only have strings as a 'name', in order to catch bugs in malformed YAML, but the script here relies on it being able to hold any object. Workaround this by saving/restoring the 'name' property prior to constructing NamedElement objects.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia1af62309e2af9a529dd2806b7981eebd1db5806
show more ...
|
b839c3ea | 02-Sep-2021 |
Alexander Filippov <a.filippov@yadro.com> |
format: fix logging of a boolean property
The journal callback keeps silence if the property is boolean. It happens due the mistype in the format definition.
This commit fixes the mistype in the fo
format: fix logging of a boolean property
The journal callback keeps silence if the property is boolean. It happens due the mistype in the format definition.
This commit fixes the mistype in the format definition.
Signed-off-by: Alexander Filippov <a.filippov@yadro.com> Change-Id: Ibc0fc6d0c275d4f8d6f592794813256d529e0ccd
show more ...
|
764adb5e | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If98df395e3717aa119e192457220e31ce3ea4fe7
show more ...
|
f3367686 | 16-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
size_t: ensure cstddef included
Latest upstream yocto appears to have removed a free include of cstddef. This is causing compile failures for files which do not include it properly.
Signed-off-by:
size_t: ensure cstddef included
Latest upstream yocto appears to have removed a free include of cstddef. This is causing compile failures for files which do not include it properly.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I5933ec83cfb654d000c24c49a9e4ace79c5666e3
show more ...
|
ae4c95c6 | 16-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: An
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ie93f251b00db4d4a543b361262fad2201923e2c5
show more ...
|
35b4f337 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id416fbdec0a6d6b8e9eabfe058420865db3d1f08 |
34ef1e52 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6a3e7bb043371841838d241f2c4a9579d6ead4cb |
44fd7e89 | 08-Mar-2020 |
Marri Devender Rao <devenrao@in.ibm.com> |
Switch to python 3
The python scripts in this repo supports both python2 and python3. Use python3 now since python2 is EOL.
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Change-Id: I85855
Switch to python 3
The python scripts in this repo supports both python2 and python3. Use python3 now since python2 is EOL.
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com> Change-Id: I858553eb9ec86c2010e649679dee1607006e89b3
show more ...
|
5c3a085a | 12-Nov-2019 |
Andrew Geissler <geissonator@yahoo.com> |
dbus-name: do startup work before registering name
The following commit aggravated an existing issue within OpenBMC software:
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/26476
A b
dbus-name: do startup work before registering name
The following commit aggravated an existing issue within OpenBMC software:
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/26476
A busctl pcap of the failure shows mapper trying to introspect the dbus monitor while the dbus monitor is trying to set itself up to monitor its defined dbus events. This includes calls into mapper and inventory manager.
This results in a timeout on the mapper side and the dbus monitor object never being stored within mapper.
The above commit appears to aggravate this bug by allowing mapper to start introspecting the dbus monitor sooner then it normally does.
Tested: Verified with this fix that the issue, which was 100% recreatable prior to this change, did not recreate with multiple BMC reboots
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I6c9380af8b7331bbdbbee0ea3bd0b5ff17dc4187
show more ...
|
07c35131 | 21-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Add median condition generation test entries
A median condition generates the same way a count condition does, this adds entries to the condition generation test yaml to generate median condit
test: Add median condition generation test entries
A median condition generates the same way a count condition does, this adds entries to the condition generation test yaml to generate median conditions. These median condition generation tests have separate callbacks configured to be verified by the condition generation tests.
Tested: conditiongentest.hpp generates as expected `make check` passes conditiongentest
Change-Id: I7c51e320cfeacfa92a31d3fbc42f44c7e50b6183 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
bd31f39e | 21-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Fix condition generation callbacks size test
Change-Id: I634f25726e069dfe65fe6c99e1fd1072f70b33ec Signed-off-by: Matthew Barth <msbarth@us.ibm.com> |
9b50214b | 17-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Add property watch filter tests
Create test cases to perform operand filters to the property values used within the storage array and validate against the expected any_ns::any state. Filters r
test: Add property watch filter tests
Create test cases to perform operand filters to the property values used within the storage array and validate against the expected any_ns::any state. Filters reset the any object's state when a value is configured to be filtered.
*Note: Filters are `positive` state based meaning values that pass the filter check are kept and not reset.
Tested: Non-filtered test cases still pass Altering expected filtered results fail test case based on filters Final filtered test cases pass
Change-Id: I72038c1621f6b8e3de28c50880c7e84177ebe7e4 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
39c8215d | 17-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Functionalize test state validation check
Create a function that is used as a parameter to the test that performs the verification of the expected test results. This allows for different test
test: Functionalize test state validation check
Create a function that is used as a parameter to the test that performs the verification of the expected test results. This allows for different test state validation checks to be done against the values used in testing.
Tested: No change in testing results
Change-Id: Ie14a47d7872970549dabf5dadc2cfc60062558f2 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
5288136a | 17-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
test: Rename "ExpectedValues" struct to "Values"
Additional tests will be added that utilize the same set of values and may have different expected results. So to reflect this, the "ExpectedValues"
test: Rename "ExpectedValues" struct to "Values"
Additional tests will be added that utilize the same set of values and may have different expected results. So to reflect this, the "ExpectedValues" struct is renamed as "Values" which will always be used to populate the storage array used in property watch testing.
Tested: No change in testing results
Change-Id: If07c10fdbf99d551fdac3475dc15df48954c2b24 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
efe0158c | 09-Sep-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Create Filters class to store filter functions
Enhanced the generated code to now store the filter functions within an array contained in a struct similar to other configured parameters. This allows
Create Filters class to store filter functions
Enhanced the generated code to now store the filter functions within an array contained in a struct similar to other configured parameters. This allows the generated property watches to use an index within that array to access a pointer to a Filters class containing a given set of filter functions. The set of filter functions would then be applied against all the properties being watched.
Tested: Generated code provides structure needed to access filter functions Filter functions filter property values that fail the filter(s)
Change-Id: I8f1f882704de521f2ab393530ad7ef096314975d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
ae786ef6 | 04-Sep-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add filters option to property watch class
Each property changed signal calls a defined callback, an optional set of filters can be defined to filter out property values not intended to be used with
Add filters option to property watch class
Each property changed signal calls a defined callback, an optional set of filters can be defined to filter out property values not intended to be used within the callback. These filters can be setup to eliminate property value(s) that should be ignored per property group and its configured callback.
ex.) Handle errant sensor values that could occur from a faulty device so these values do not cause unwanted results from a callback function.
Example config entry to throw out an ambient temperature less than 0C or greater than 100C:
- name: watch ambient temps description: > 'Filter the ambient temps, discarding any value that does not pass, then trigger the callback logic.' class: watch watch: property paths: ambient sensors properties: ambient temp callback: median temps filters: - op: '>=' bound: 0 - op: '<=' bound: 100000
Tested: Generate a single filter function against a group of properties Generate multiple filter functions against a group of properties Property values are cleared when it fails to pass a filter Property values that pass all filters are updated
Change-Id: Id5126263096b4787a40befdb14cf3514038df3ed Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
efdd03c2 | 04-Sep-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add median* condition
The median condition determines the median value from a configured group of properties and checks that against a defined condition to determine whether or not the callback is c
Add median* condition
The median condition determines the median value from a configured group of properties and checks that against a defined condition to determine whether or not the callback is called.
*Note: When 2 properties are used with the median condition, the property determined to be the max is used instead of the average of the 2 properties. This is for providing a "worst case" median value.
An example would be to create a group consisting of multiple ambient sensors where the median value from these ambient sensors would be used to shutdown the system if above a given temperature.
i.e.)
- name: median temps description: > 'If this condition passes the median ambient temperature is too high(>= 45C). Shut the system down.' class: condition condition: median paths: ambient sensors properties: ambient temp callback: ambient log and shutdown op: '>=' bound: 45000 oneshot: true
Tested: A defined median condition is generated according to the MedianCondition class The MedianCondition class produces a single median value from a group of property values Median value used against the given operation to determine if callback is called or not
Change-Id: Icd53e1a6e30a263b7706a935f040eea97dcc2414 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
22bf9008 | 10-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Add propertywatchtest unit tests to `make check`
Enable the propertywatchtest unit tests to be executed on a `make check`
Tested: propertywatchtest runs on a `make check`
Change-Id: I6b40c571f
Add propertywatchtest unit tests to `make check`
Enable the propertywatchtest unit tests to be executed on a `make check`
Tested: propertywatchtest runs on a `make check`
Change-Id: I6b40c571ffa5f3906ea1a694efd08bf63259a57a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
f79fc09b | 10-Oct-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Fixup propertywatchtest
The propertywatchtest unit test is not included within the makefile to be run on a `make check`. It was found that the propertywatchtest would fail when executed and needed u
Fixup propertywatchtest
The propertywatchtest unit test is not included within the makefile to be run on a `make check`. It was found that the propertywatchtest would fail when executed and needed updates to use the sdbusplus match helper functions.
Another needed update was to access the correct position within the storage tuple that was added under the following commit: abe43ab439bba463f4727a98ed0cc0c6a5e8251f
Tested: propertywatchtest executable successfully runs and passes its tests
Change-Id: Icacfe5a6d3d58fee4753d82796f03a82aaddd9fb Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|