| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Remove a number of unused files.
Change-Id: If7e40d2be7eb3f5d84538a3c86f911df268a1f34
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Prefer implicit conversion for readability.
Change-Id: I64d04b926edea0531a5414a416c04b36ae3d5e2a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Switch from sd_bus process to sd_event run so that sd event
handlers are invoked.
Change-Id: If7c1f046f30cc845c6e9fcc72eb99c5bdfb36052
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow watch class users to explicitly invoke the watch
callback.
Since watches and callbacks share a common pool of state
all watches must complete their initialization prior to
invoking their callback methods.
Change-Id: I62ebad64da88a145f3d5006b07c01381b0eb6728
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Add a simple test that invokes all the callbacks. There
are no assertions but there is some value in ensuring
the application will at least run without crashing.
Change-Id: I117bff261202ae7e642094a659a954328351eac1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Id6e14414c6f15c11d1476039e3781d719f693d21
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Add an sd-event interface abstraction to facilitate
mocking and unit test.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5880617565fc6eab54335adc30033d4b132568f8
|
|
|
|
|
|
|
|
|
|
|
| |
Add C++ wrappers around select sd-event APIs, for a more C++ like
programming API.
Includes support for core sd_event and timer related sd_event_source
APIs.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I10ac5406c9f8831b4efb294d3aef36026469d4a5
|
|
|
|
|
| |
Change-Id: Id4157b9f40c80c5bb7d54d10f74ba7ecdeb199e5
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add core support for rendering argument lists. Add a number of
decorators like:
-literal: Render a literal value.
-cast: Render a C++ cast.
-fixbool: Work around yaml boolean capitalization.
-quote: Quote a string literal.
Change-Id: I4364d9f7a8cb7bb932d347d34bfabb88e694020a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Callbacks must ultimately be triggered when a property
is updated by a watch. Add that support.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I20130a11c19ddcf2c4ae45800f2068b31950bcd6
|
|
|
|
|
| |
Change-Id: I94059c0be78d5b97e7e0e11c78d4a164a98a483e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Enable conditional application of callbacks.
Change-Id: I9d765e5f585aac40994b65da3b51ea891beae9bf
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: Icbdc8612d73bed065227d9edfde1426206886652
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Allow named collections of callbacks to be defined and used anywhere
callbacks are used.
Change-Id: I3224aa06b2250e9a055bc70d20c186caecd033af
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: Iff1ddb9c18b5384d05a4d2dbfba95ade8cc1783c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Callbacks are the response in the PDM 'trigger->response' model.
Add general support for implementing callbacks and implement
a log to systemd journal using that framework.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I8bead5368ee5472a02b47e8bba9e9df3a1f346bc
|
|
|
|
|
|
|
|
| |
Add a template for obtaining a format string at build for a
built-in C++ type.
Change-Id: I8e5d26d4481b3ddafb5ffddbb058a1c75b3a2257
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I9e9266901414c71a34d9686f2a45bc4764602d53
|
|
|
|
|
|
|
|
|
| |
Property watches cache DBus property values given an externally
supplied index of property names and paths, in an externally
supplied storage location.
Change-Id: I155081da88c3ab0e4f6a13b012fc9719203b1888
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Add a DBus interface abstraction to facilitate
mocking and unit test.
Change-Id: I914cba7500d79bc4d3022cb12e4c02adf6a78c19
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I4b30d0729a704d6833c840ea08daeee961a5730b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Add support for defining groups of DBus properties. Groups are
a list of property/interface/metadata tuples. Metadata can be used to
give a property context when required.
Change-Id: I5fc27f4d815b53332a2ddea2d270fde8e355dcbc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I296de0e0cb30e0e25f6677a06bd04fe15c2fd015
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
Add support for defining groups of object paths. Groups are
a list of path/metadata tuples. Metadata can be used to
give a path context when required.
Change-Id: I355ebf76b40f2ffc8d783e94e888b930cde8ee9c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add logic to parse each yaml file in three stages.
1 - Invoke factory methods for config file directives, generating
more factory methods.
2 - Invoke factory methods from 1 for the full set of renderable
items.
3 - Run 'setup' on all renderable items to resolve item cross
references.
Change-Id: I428a9ae1c41cf65e1efc05f3ec7177375822d772
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add convenience type aliases for working with references:
RefKeyMap: A map with references as keys.
TupleRefMap: A map with a tuple of references as keys.
RefVector: A vector or references.
TupleOfRefs: A tuple of references.
Add DBus related convenience type aliases:
MapperPath: The Phosphor mapper currently uses a std::string for
object paths. This is a bug and will someday be switched
to sdbusplus::message::object_path. Add an alias for easy
refactoring.
InterfacesAdded: The C++ type for the
org.freedesktop.DBus.ObjectManager.InterfacesAdded signal
argument.
PropertiesChanged: The C++ type for the
org.freedesktop.DBus.Properties.PropertiesChanged signal
argument.
GetObject: The C++ type for the
xyz.openbmc_project.ObjectMapper.GetMethod method response.
Change-Id: I719aa7c610b3312ce8e52825cb07b33a348bf896
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Add a test directory to host future unit tests.
Change-Id: I5072cb3055386f7b1718edc45241c723d9e63a54
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add vars.mk for variable sharing across makefiles.
Stub and rename example YAML file and template.
Content to be re-introduced as support is added.
Move generated C++ to a header file.
Add input YAML path option to configure.
Change-Id: Ia06e392e8b120b1e1d8614046064fa432a6f9e18
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
| |
Add an option for specifying an alternate template for testcases.
Update the output option to include the desired output filename as
well as the directory.
Add an option for specifying the mako template search path.
Change-Id: I88634fee193409b25988eb1e7d7680aa866cc2e9
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a basic load/render skeleton.
Add docstrings.
Add multiple file parsing.
Steal indent utility from phosphor-inventory-manager.
Scan YAML for syntax and discard.
Change-Id: I48e5a3923dc1fadceae6241dd6f757388a2f1c51
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Rename to pdmgen.py in the spirit of phosphor-inventory-manager.
Change-Id: Iaa0a2dadb8c051342e62c9126e5c7b7bef2fcdde
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Monitoring source generation script with mako template to
generate an empty set of events. The events will be parsed and added
under openbmc/openbmc#1493
Resolves openbmc/openbmc#1343
Change-Id: I40225f070212af36f410d99bc7ead95961e70997
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Added copyrights and comments within headers
Change-Id: Iebb17ba34b82a6c80718ad32338105a5245e640c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Have dbus monitoring application build under phosphor-hwmon and use
the generated events source
Change-Id: Ic3f74192a3c65a79c4bc2657d42f196c15840cff
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Process signal event triggers' list of conditions on a group and perform
the defined actions.
This re-uses the following struct directly from
phosphor-inventory-manager:
--struct PropertyChangedCondition
Change-Id: I98552f3d168cfcd9f0c1c357289b7000374ae60e
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Process application start event triggers' list of conditions on a group
and perform the defined actions.
This re-uses the following structs(and their necessary functions)
directly from phosphor-inventory-manager:
--struct PropertyConditionBase
--struct PropertyCondition
Change-Id: If4090299fe887ef940320091d4d4be9f6aa7dd29
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Application is created allowing for a log_error action to be performed
Change-Id: I6890fff7ace708e80c79607beceedc926c05ec3d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Include supported data types for item groups:
--Start event trigger
--Signal event trigger
--A countAtOrAbove condition
--A log_error action
Change-Id: I1ae5ba60e4d9c06155885d52d98a44b31fd73207
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Example YAML framework and the future resulting generated source from
what's defined in the YAML file for groups, triggers, conditions, and
actions in an event.
Change-Id: I390cb2bb26a1f43d84d9a71c923fa88e63f00fac
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I914baaca789fd975a9ed08d94471134ea1b01bd4
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|