Searched hist:f094d4428ecad7c2c349287fb811e5d6568644a9 (Results 1 – 3 of 3) sorted by relevance
/openbmc/phosphor-inventory-manager/ |
H A D | functor.cpp | diff f094d4428ecad7c2c349287fb811e5d6568644a9 Wed Sep 26 15:06:15 CDT 2018 Matthew Barth <msbarth@us.ibm.com> Get an inventory property's value
Adds support for inventory manager to retrieve a property's value that it hosts as input to condition tests. Utilizing a provided sdbusplus server binding member function to get a property from the inventory hosted interface, a property can be read from that interface within inventory manager. After the property is read, the condition test is performed and the resulting action(s) occur.
The only currently supported condition test for using a property from within inventory manager is the `propertyIs` condition.
This is an example of the expected generated source to get a property from within inventory manager:
make_filter(functor::propertyIs( "/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", "WaterCooled", true, "xyz.openbmc_project.Inventory.Manager", make_get_property<sdbusplus::xyz::openbmc_project::Inventory:: Decorator::server::CoolingType::PropertiesVariant> ( functor::getProperty<sdbusplus::xyz::openbmc_project:: Inventory::Decorator::server::CoolingType> ( "/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", &sdbusplus::xyz::openbmc_project::Inventory:: Decorator::server::CoolingType::getPropertyByName, "WaterCooled" ) ) ))
Tested: Manually edited generated code to use property within inventory and actions occurred when condition passed Manually edited generated code to use property within inventory and actions did not run when condition failed Actions not run when get property function omitted
Change-Id: I094bbacbcdeb239d33cac343b2daeb5f86e0a58a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
H A D | functor.hpp | diff f094d4428ecad7c2c349287fb811e5d6568644a9 Wed Sep 26 15:06:15 CDT 2018 Matthew Barth <msbarth@us.ibm.com> Get an inventory property's value
Adds support for inventory manager to retrieve a property's value that it hosts as input to condition tests. Utilizing a provided sdbusplus server binding member function to get a property from the inventory hosted interface, a property can be read from that interface within inventory manager. After the property is read, the condition test is performed and the resulting action(s) occur.
The only currently supported condition test for using a property from within inventory manager is the `propertyIs` condition.
This is an example of the expected generated source to get a property from within inventory manager:
make_filter(functor::propertyIs( "/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", "WaterCooled", true, "xyz.openbmc_project.Inventory.Manager", make_get_property<sdbusplus::xyz::openbmc_project::Inventory:: Decorator::server::CoolingType::PropertiesVariant> ( functor::getProperty<sdbusplus::xyz::openbmc_project:: Inventory::Decorator::server::CoolingType> ( "/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", &sdbusplus::xyz::openbmc_project::Inventory:: Decorator::server::CoolingType::getPropertyByName, "WaterCooled" ) ) ))
Tested: Manually edited generated code to use property within inventory and actions occurred when condition passed Manually edited generated code to use property within inventory and actions did not run when condition failed Actions not run when get property function omitted
Change-Id: I094bbacbcdeb239d33cac343b2daeb5f86e0a58a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
H A D | types.hpp | diff f094d4428ecad7c2c349287fb811e5d6568644a9 Wed Sep 26 15:06:15 CDT 2018 Matthew Barth <msbarth@us.ibm.com> Get an inventory property's value
Adds support for inventory manager to retrieve a property's value that it hosts as input to condition tests. Utilizing a provided sdbusplus server binding member function to get a property from the inventory hosted interface, a property can be read from that interface within inventory manager. After the property is read, the condition test is performed and the resulting action(s) occur.
The only currently supported condition test for using a property from within inventory manager is the `propertyIs` condition.
This is an example of the expected generated source to get a property from within inventory manager:
make_filter(functor::propertyIs( "/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", "WaterCooled", true, "xyz.openbmc_project.Inventory.Manager", make_get_property<sdbusplus::xyz::openbmc_project::Inventory:: Decorator::server::CoolingType::PropertiesVariant> ( functor::getProperty<sdbusplus::xyz::openbmc_project:: Inventory::Decorator::server::CoolingType> ( "/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", &sdbusplus::xyz::openbmc_project::Inventory:: Decorator::server::CoolingType::getPropertyByName, "WaterCooled" ) ) ))
Tested: Manually edited generated code to use property within inventory and actions occurred when condition passed Manually edited generated code to use property within inventory and actions did not run when condition failed Actions not run when get property function omitted
Change-Id: I094bbacbcdeb239d33cac343b2daeb5f86e0a58a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|