Add association interface
Make the virtual sensor inherit association interface, so that a sensor
could be associated with an inventory.
This is needed for Redfish to get the virtual sensor.
The json config could add optional "Association" config, that is an
array of tuples with three strings.
The virtual sensor will parse the config and create the association
accordingly.
Tested: Add below json config, and verify the virtual sensor has the
association with the inventory DBus object, and the Redfish
could show the sensor.
"Associations":
[
[
"chassis",
"all_sensors",
"/xyz/openbmc_project/inventory/system/board/xxxx"
]
],
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ife4b6c38449ed0f29ab6d37f80b87c31df9ee24e
3 files changed