summaryrefslogtreecommitdiff
path: root/meta-quanta
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2021-07-16 20:29:59 +0300
committerPatrick Williams <patrick@stwcx.xyz>2021-07-20 21:18:16 +0300
commitf797c6a6abe0917662ab6d742273b2831863eea4 (patch)
treea3b86ca784c14d091b0c15269e30027939f2e8f3 /meta-quanta
parent4017f2a8032a5a7265a58c23400226301d89d18e (diff)
downloadopenbmc-f797c6a6abe0917662ab6d742273b2831863eea4.tar.xz
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 <patrick@stwcx.xyz> Change-Id: Icaf9447f31ccdd945cdf74b3e017682e4aed686f
Diffstat (limited to 'meta-quanta')
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/inventory/gbs-inventory-cleanup/inventory-cleanup.yaml2
-rw-r--r--meta-quanta/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml2
2 files changed, 2 insertions, 2 deletions
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
diff --git a/meta-quanta/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml b/meta-quanta/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml
index 34d8e794b..838062ec4 100644
--- a/meta-quanta/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml
+++ b/meta-quanta/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-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