control: get_managed_objects action
This new action adds all interfaces/properties in its groups into the
Manager's _objects cache, and then calls other actions.
It uses Manager::addObjects() which uses the GetManagedObjects
ObjectManager D-Bus method to obtain all properties provided by the
service, even ones not listed in a group.
This allows an action to run with the latest values in the cache without
having to subscribe to propertiesChanged for them all.
In the below example, the action will call the set_net_increase_target
after it's done populating the cache.
"actions": [
{
"name": "get_managed_objects",
"groups": [
{
"name": "the_temps",
"interface": "xyz.openbmc_project.Sensor.Value",
"property": {
"name": "Value"
}
}
],
"actions": [
{
"name": "set_net_increase_target",
"state": 30,
"delta": 100
}
]
}
]
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic528392139904abd16181d85138395ccfd68a9a6
3 files changed