History log of /openbmc/phosphor-dbus-monitor/src/pdmgen.py (Results 1 – 25 of 38)
Revision Date Author Comments
# ab375eca 08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

black: re-format

black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.

Change-Id: I7a9a44a76ef51aa

black: re-format

black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.

Change-Id: I7a9a44a76ef51aa6cc0236839c6c6bf652fcc2da
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 18447acb 05-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

python: fix flake8 warnings

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic66ab9f3ce1a4bd384ae219945a3a5919750f1b8


# a1709e4a 05-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

python: format with black

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I88b0551fd0e0ddb28641cf41762dcccba53e564a


# 04267b4f 04-Aug-2022 Matt Johnston <matt@codeconstruct.com.au>

Add argument for errors.hpp to pdmgen.py, fix race

pdmgen.py is now given a "-e" argument to specify where to write
errors.hpp.

Previously it was hardcoded to 'errors.hpp', this could
hit a race wh

Add argument for errors.hpp to pdmgen.py, fix race

pdmgen.py is now given a "-e" argument to specify where to write
errors.hpp.

Previously it was hardcoded to 'errors.hpp', this could
hit a race where the src/test run of pdmgen.py could overwrite
the actual errors.hpp with an empty file.
That resulted in missing definitions with a compile error such as
...phosphor-dbus-monitor/1.0+gitAUTOINC+413a485715-r1/recipe-sysroot/usr/include/c++/12.1.0/type_traits:1447:38: error: invalid use of incomplete type 'struct sdbusplus::xyz::openbmc_project::Sensor::Threshold::Error::CriticalHigh'

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Change-Id: Ib982631e506ade18c587a3e6552e4109760758ef

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


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


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


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


# 80c70610 12-Apr-2018 Marri Devender Rao <devenrao@in.ibm.com>

Modify parser and add mako scripts for watch on object path

Added support for watch and callback on 'interface added'
signal for the specified object paths.

Added mako scripts for events to auto cr

Modify parser and add mako scripts for watch on object path

Added support for watch and callback on 'interface added'
signal for the specified object paths.

Added mako scripts for events to auto create callback
and watch objects for the specified object path groups.

Clients specify object paths to watch and callbacks to
invoke in the config.yaml file

Change-Id: I3fa2ea1520649120b927c0cb83a16e5cace2f24e
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>

show more ...


# 06fdaff4 08-Apr-2018 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I78f19

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I78f191f26da14203dc21c97d4fc4a31f95ffc95f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 3c5318d8 19-Feb-2018 Matt Spinler <spinler@us.ibm.com>

Add ElogWithMetaDataCapture class

This callback class will create an error log with
exactly 1 metadata field, which takes a string. This
metadata field will be filled in with the property paths,
na

Add ElogWithMetaDataCapture class

This callback class will create an error log with
exactly 1 metadata field, which takes a string. This
metadata field will be filled in with the property paths,
names, and values of the properties that passed the
condition checks that caused the callback to be called
in the first place.

Tested: Ran with YAML rules that used this callback and
checked that everything worked as specified.

Change-Id: Ib37206c63385939c583a09e7ba979d6e016691f6
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# c458deea 19-Feb-2018 Matt Spinler <spinler@us.ibm.com>

Add oneshot support to count conditions

When a count condition is a oneshot, it will only
trigger the callback the first time the condition
is true. The condition needs to evaluate to false
at leas

Add oneshot support to count conditions

When a count condition is a oneshot, it will only
trigger the callback the first time the condition
is true. The condition needs to evaluate to false
at least once to rearm the callback.

A use case for this would be when a group of properties
is being watched for a subset of them hit a certain value.
Even though every properties changed signal for every property
in the group would check the condition, only the first time
the condition is true would the callback be issued.

This behavior is specified with a 'oneshot: true' entry in
the YAML. If not present, it defaults to false which is
the original behavior.

Tested: Verify this does indeed do what is advertised by
modifying condition rules to consistently pass
and checking behavior.

Change-Id: Ie185621e86c605234bf329a5f38317267dbb6fb6
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 90bfaea4 06-Oct-2017 Ratan Gupta <ratagupt@in.ibm.com>

Initial support for event callbacks

Add parser support for template rendering of events.
Also defines the EventBase and Event classes.
EventBase is parent of Event.

Change-Id: I6b07b415acf510a84375

Initial support for event callbacks

Add parser support for template rendering of events.
Also defines the EventBase and Event classes.
EventBase is parent of Event.

Change-Id: I6b07b415acf510a8437529095bd489c0af73ddf5
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>

show more ...


# 80e9b65f 02-Nov-2017 Matt Spinler <spinler@us.ibm.com>

Fix pep8 errors in pdmgen.py

Change-Id: I16cbfa2a3ed646f3ca0aeee0e71b3ada39062941
Signed-off-by: Matt Spinler <spinler@us.ibm.com>


# 1d6ca484 01-Nov-2017 Matt Spinler <spinler@us.ibm.com>

Add resolve callout rule support to YAML parser

The callout to resolve is specified in the YAML.

Change-Id: If613fae1959c6a54279b2a50c7d858f3e7d831b9
Signed-off-by: Matt Spinler <spinler@us.ibm.com>


# 78199b44 25-Oct-2017 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I83c84

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I83c844373ea41d762367085cb16b01d31676e33d
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 30474cf5 11-Aug-2017 Gunnar Mills <gmills@us.ibm.com>

Add support for metadata

Added support for metadata in elog.hpp, elog mako file, and pdmgen.
This metadata will be added with the error log.

Change-Id: Iaf0fe24d71f6bdd02b51df208b2c1d66c68319d3
Sig

Add support for metadata

Added support for metadata in elog.hpp, elog mako file, and pdmgen.
This metadata will be added with the error log.

Change-Id: Iaf0fe24d71f6bdd02b51df208b2c1d66c68319d3
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# d5faea31 08-Aug-2017 Gunnar Mills <gmills@us.ibm.com>

Add support for elog callback

Added support for "callback: elog" in PDM.
templates/elog.mako.cpp is used to generate the Elog call.
templates/errors.mako.hpp is used to generate the errors.hpp
used

Add support for elog callback

Added support for "callback: elog" in PDM.
templates/elog.mako.cpp is used to generate the Elog call.
templates/errors.mako.hpp is used to generate the errors.hpp
used by generated.hpp to include any error.hpp files like
"xyz/openbmc_project/Common/error.hpp"

Change-Id: Id0ae3aca4282095f58a8939b70e398bec706d7f5
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# ec2ed2fb 31-May-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Fix bool and string templates/rendering

Fix a number of bugs related to rendering and instantiation of
string and bool templates.

Change-Id: Ic75842b4016f4d96bf5850f9c4ad778d82e075ed
Signed-off-by:

Fix bool and string templates/rendering

Fix a number of bugs related to rendering and instantiation of
string and bool templates.

Change-Id: Ic75842b4016f4d96bf5850f9c4ad778d82e075ed
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# babf3b78 31-May-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

pdmgen: Require uppercase meta keys

journald ignores lowercase metadata keys so require them
to be uppercase. Abort the config file parse when lowercase
keys are found.

Change-Id: Icffffdc6680b4d3

pdmgen: Require uppercase meta keys

journald ignores lowercase metadata keys so require them
to be uppercase. Abort the config file parse when lowercase
keys are found.

Change-Id: Icffffdc6680b4d305329c3395f8e2fda6210964f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 3539db64 30-May-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Add deferrable callbacks

Deferrable callbacks delay callback invocation until a
pre configured length of time has elapsed. One example
scenario where deferrable callbacks help is to avoid
oscillati

Add deferrable callbacks

Deferrable callbacks delay callback invocation until a
pre configured length of time has elapsed. One example
scenario where deferrable callbacks help is to avoid
oscillation when testing a condition and making callbacks
frequently.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I180c99b57ec1c9bde4da76d947a026f809341c8a

show more ...


# 0df00be0 25-May-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Method support

Add support for a method callback. The method callback enables
arbitrary DBus method calls. A sample use case could be
starting a systemd unit via the sytemd DBus API.

Change-Id: I

Method support

Add support for a method callback. The method callback enables
arbitrary DBus method calls. A sample use case could be
starting a systemd unit via the sytemd DBus API.

Change-Id: If25131d11497c82f862ae1f47da066c5fd8b2e2e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


12