35e75f0a | 26-Feb-2018 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
count: Add missing functional include
std::function is not found with a GCC 7.3 runtime.
Change-Id: I4e5289794d405c42ab6291c211289d1ab175b197 Tested: Built repository with GCC 7.3 Signed-off-by: Br
count: Add missing functional include
std::function is not found with a GCC 7.3 runtime.
Change-Id: I4e5289794d405c42ab6291c211289d1ab175b197 Tested: Built repository with GCC 7.3 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
05a2ac3a | 19-Feb-2018 |
Matt Spinler <spinler@us.ibm.com> |
Save property check results in CountCondition
The CountCondition class checks each property in its index against some condition. Save the result of each of those checks in the 2nd tuple element of
Save property check results in CountCondition
The CountCondition class checks each property in its index against some condition. Save the result of each of those checks in the 2nd tuple element of the storage entry for that property so that other code may access it.
Tested: Build and run unit tests
Change-Id: Ie99f02062c28d003e588a43bf042ecd2834ad9b2 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
abe43ab4 | 19-Feb-2018 |
Matt Spinler <spinler@us.ibm.com> |
Extend storage array to contain additional data
This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra
Extend storage array to contain additional data
This array was originally just an array of objects of type 'any'. This commit changes it to be an array of tuples of type <any, any> to add an extra field for use by anything that needs it.
For example, the storage is currently used to store property values, and a future change to the CountCondition class will now also store the result of the comparisons done between the property values and another value specified in the rule YAML. Then, a callback will be able to see the result of whether each property passed the check.
Tested: Build and run unit tests
Change-Id: I58f32c9f4068b15a02b1ff7f28871161cafebddb 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 ...
|
8bbf9d2c | 06-Oct-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement event rotating
Delete the oldest event of the same type if a particular type of event reaches threshold.
Resolves openbmc/openbmc#2254
Change-Id: I2692193a027e82032f1d336515691de913bbb72
Implement event rotating
Delete the oldest event of the same type if a particular type of event reaches threshold.
Resolves openbmc/openbmc#2254
Change-Id: I2692193a027e82032f1d336515691de913bbb726 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
3e84ec66 | 06-Oct-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement create function in event manager
Implement the logging event interface.
Create the dbus event object based on the event type.
Change-Id: Idfa9e5c43f170d904fd25f22d73e0509b1785fc9 Signed-
Implement create function in event manager
Implement the logging event interface.
Create the dbus event object based on the event type.
Change-Id: Idfa9e5c43f170d904fd25f22d73e0509b1785fc9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
cd22786a | 06-Oct-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement event manager class
On handling of property change event, If callback is of type event then event manager would be asked to create the event dbus objects.
Change-Id: I7f1d365d7f44a1cca545
Implement event manager class
On handling of property change event, If callback is of type event then event manager would be asked to create the event dbus objects.
Change-Id: I7f1d365d7f44a1cca54516e9ef555bb132d6b063 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
ef69ac02 | 21-Feb-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Don't take action if the callback is of event type
When event call back is called,There could be two context 1) As part of actual D-bus signal 2) During startup of dbus-monitor if event call back is
Don't take action if the callback is of event type
When event call back is called,There could be two context 1) As part of actual D-bus signal 2) During startup of dbus-monitor if event call back is called with context as startup then don't take any action.
Corrected the index value to fetch the property name.
Change-Id: Ifaae33dc78841c8f771fe3788e75f79d9de6ec12 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
a45e086d | 21-Feb-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Add callback contexts
Add the notion of a callback context. This enables callbacks to have logic around the conditions they were invoked in.
There are two context on which call back can be invoked
Add callback contexts
Add the notion of a callback context. This enables callbacks to have logic around the conditions they were invoked in.
There are two context on which call back can be invoked 1) Startup: during startup all the call backs will be called 2) Signal: As part of condition match on the watched properties.
Callback would behave differently based on the context. eg: eventCallback 1) Startup: Don't take any action. 2) Signal: Create the Dbus Object for the event.
Change-Id: If455558798ac3e44bbd8a93de0ce1b09d2e308ae Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
882d741c | 19-Feb-2018 |
Ratan Gupta <ratagupt@in.ibm.com> |
Include missing header file
we are using the std algo's in this file but missed to include the c++ algorithm header file.
Change-Id: Ib88f810a048dba18526b7c7cf42d87ba095a27be Signed-off-by: Ratan G
Include missing header file
we are using the std algo's in this file but missed to include the c++ algorithm header file.
Change-Id: Ib88f810a048dba18526b7c7cf42d87ba095a27be Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
c3dfe617 | 17-Dec-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Change the access mode of the function getBus
GetBus function provides the same instance of the bus application in the process.
Now there is a need where we need the same bus instance at multiple p
Change the access mode of the function getBus
GetBus function provides the same instance of the bus application in the process.
Now there is a need where we need the same bus instance at multiple places.
Remove the friend loop, now it is not needed as we have changed the scope of getBus.
Change-Id: I7e8cda45f3835b1d93be36f317741bc4ae6951a2 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
40e0db46 | 13-Oct-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Adding the section for event call back.
eg:- - name: example event callback description: > 'Callbacks are actions PDM should take when instructed to do so.
Some callback types refer to a
Adding the section for event call back.
eg:- - name: example event callback description: > 'Callbacks are actions PDM should take when instructed to do so.
Some callback types refer to a group of paths and group of properties in a similar fashion as the property watch directive.
The event callback creates the event D-Bus object with the given name and the event message. eg /xyz/openbmc_project/events/test/<id>' class: callback callback: event paths: example path group properties: example property group eventName: test eventMessage: "Test configuration changed."
When fully implemented, event callbacks will create DBus objects for preconfigured DBus events.
Change-Id: I73d46a9bc630763cc1a74877803a638f3a8d1e1f Signed-off-by: Ratan Gupta <ratagupt@in.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> |
7af95886 | 01-Nov-2017 |
Matt Spinler <spinler@us.ibm.com> |
Add resolve callouts test to YAML
Change-Id: I9f21e6378f74bf9dd7d413557a80b47ec9c9f829 Signed-off-by: Matt Spinler <spinler@us.ibm.com> |
f7a6a462 | 01-Nov-2017 |
Matt Spinler <spinler@us.ibm.com> |
Add resolve callout example
Change-Id: Ie80bff38947a79cc686eaf9db9c80453d28a4fb6 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> |
f55c1eed | 01-Nov-2017 |
Matt Spinler <spinler@us.ibm.com> |
Set Resolved property on elog entry
Fill in the function that sets the Resolved property on an error log entry.
Change-Id: I78b57c413a7047508b7fc95e0cf27e1ae6e871cf Signed-off-by: Matt Spinler <spi
Set Resolved property on elog entry
Fill in the function that sets the Resolved property on an error log entry.
Change-Id: I78b57c413a7047508b7fc95e0cf27e1ae6e871cf Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
4eaa77b3 | 31-Oct-2017 |
Matt Spinler <spinler@us.ibm.com> |
Find the error logs that have a certain callout
In order to find the error logs that have a specific callout, the code needs to look in the 'endpoints' property of the '<callout>/fault' D-Bus object
Find the error logs that have a certain callout
In order to find the error logs that have a specific callout, the code needs to look in the 'endpoints' property of the '<callout>/fault' D-Bus object.
Change-Id: Idb9c06a6d815195ed47fb6ec914ba8f89539cb85 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
df1b7cfc | 31-Oct-2017 |
Matt Spinler <spinler@us.ibm.com> |
Add getBusName() utility function to SDBusPlus
Add a function to SDBusPlus to get the D-Bus bus name for an object path and interface.
Change-Id: I7d7a533c7430fcf42e1e0f6a21a2453e6c8197ea Signed-of
Add getBusName() utility function to SDBusPlus
Add a function to SDBusPlus to get the D-Bus bus name for an object path and interface.
Change-Id: I7d7a533c7430fcf42e1e0f6a21a2453e6c8197ea Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
56fd833d | 31-Oct-2017 |
Matt Spinler <spinler@us.ibm.com> |
Add ResolveCallout class
This class is a type of callback, and when triggered will resolve all error log entries that have the specified callout.
It does this by setting the Resolved property on th
Add ResolveCallout class
This class is a type of callback, and when triggered will resolve all error log entries that have the specified callout.
It does this by setting the Resolved property on the log entry.
It can be used to do things like resolve all errors against a particular part when that part is replaced, which would be done by specifying this class as a callback on a watch on the Present property for the part in the inventory.
Change-Id: I50557938c9e15a91744ee2a16d67eaa7f367ef04 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
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 ...
|
937df1a9 | 15-Aug-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Add more elog tests
Add tests to callbackgroupgentest/test.yaml
Change-Id: I0b9d4799dd3ed3a4876115594aacbd80caa3f9d0 Signed-off-by: Gunnar Mills <gmills@us.ibm.com> |
acac602d | 14-Aug-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Add elog to example.yaml
Change-Id: I97f73dd310cae4b2d67122bc51414e2a5397f0b3 Signed-off-by: Gunnar Mills <gmills@us.ibm.com> |
2c11e456 | 14-Aug-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Add tests for elog
Change-Id: I58a6ac714cfa80462ab53d4487dc727e40038b06 Signed-off-by: Gunnar Mills <gmills@us.ibm.com> |