From f797c6a6abe0917662ab6d742273b2831863eea4 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Fri, 16 Jul 2021 12:29:59 -0500 Subject: treewide: inventory: switch ChassisType to future enum value Change Ie1a7c389edb6b7a048836a49283ceb62de51bba5 will be transitioning the 'Type' property in Inventory.Item.Chassis to an enumeration. In order to avoid crashing in PIM we need these default values in the starting YAML to be fully-qualified enumeration names that will match the values which will start in Ie1a7c. This code is safe to merge as is without any PDI or PIM changes. Prior to the PDI change, we must make a change to PIM that allows conversion automatic from string->enum, leveraging library interfaces available in sdbusplus. These will be submitted independently. I checked the codebase for usage of this string. It appears that the value is currently, effectively, write-only. There is code in bmcweb that fills in the equivalent Redfish value but currently just hard-codes the string 'RackMount'. Tested: Booted Witherspoon in a QEMU model with this change and proposed changes to sdbusplus + PIM. PIM no longer coredumps with the PDI change and yields an expected persistence file: ``` $ pwd /var/lib/phosphor-inventory-manager/xyz/openbmc_project/inventory/system/chassis $ cat xyz.openbmc_project.Inventory.Item.Chassis { "value0": { "cereal_class_version": 2, "Type": 3 } } ``` Signed-off-by: Patrick Williams Change-Id: Icaf9447f31ccdd945cdf74b3e017682e4aed686f --- .../inventory/gbs-inventory-cleanup/inventory-cleanup.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-quanta/meta-gbs/recipes-phosphor/inventory/gbs-inventory-cleanup/inventory-cleanup.yaml') diff --git a/meta-quanta/meta-gbs/recipes-phosphor/inventory/gbs-inventory-cleanup/inventory-cleanup.yaml b/meta-quanta/meta-gbs/recipes-phosphor/inventory/gbs-inventory-cleanup/inventory-cleanup.yaml index 78e03fee0..eb791630c 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/inventory/gbs-inventory-cleanup/inventory-cleanup.yaml +++ b/meta-quanta/meta-gbs/recipes-phosphor/inventory/gbs-inventory-cleanup/inventory-cleanup.yaml @@ -12,5 +12,5 @@ events: /system/chassis: xyz.openbmc_project.Inventory.Item.Chassis: Type: - value: "RackMount" + value: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount" type: string -- cgit v1.2.3