| commit | 0b236ab80ad8169ba3c517166a84a77183dc5eb8 | [log] [tgz] |
|---|---|---|
| author | James Feist <james.feist@linux.intel.com> | Wed Oct 02 09:09:16 2019 -0700 |
| committer | James Feist <james.feist@linux.intel.com> | Wed Oct 23 15:29:16 2019 -0700 |
| tree | ca3948c4e247f4021b7ae8e288550dac8cf162b5 | |
| parent | 244f32361c4b6fa62a1e1c202bbe53764693b9e3 [diff] [blame] |
Create associations for drives with inventory
This creates associations so that redfish can know which
drives map to which configuration items.
Tested:
root@intel-obmc:~# busctl introspect xyz.openbmc_project.HsbpManager /xyz/openbmc_project/inventory/item/drive/Drive_2 --no-pager
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Association.Definitions interface - - -
.Associations property a(sss) 1 "inventory" "drive" "/xyz/openbmc_p... emits-change
xyz.openbmc_project.Inventory.Item interface - - -
.Present property b true emits-change
.PrettyName property s "Drive 2" emits-change
xyz.openbmc_project.State.Decorator.OperationalStatus interface - - -
.Functional property b true emits-change
xyz.openbmc_project.State.Drive interface - - -
.Rebuilding property b false emits-change
Also show up in mapper
Change-Id: Ia050316ac55faa89aad86567c93f9a74594e9180
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/hsbp-manager/include/utils.hpp b/hsbp-manager/include/utils.hpp index eec2cd6..8e63bfe 100644 --- a/hsbp-manager/include/utils.hpp +++ b/hsbp-manager/include/utils.hpp
@@ -25,6 +25,7 @@ using BasicVariantType = std::variant<std::vector<std::string>, std::string, int64_t, uint64_t, double, int32_t, uint32_t, int16_t, uint16_t, uint8_t, bool>; +using Association = std::tuple<std::string, std::string, std::string>; namespace mapper {