Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement CollectionStatus for each inventory FRU
This commit implements CollectionStatus D-bus property under com.ibm.VPD.Collection D-bus interface for each inventory D-bus object path which represents a FRU. The property tells the current status of VPD collection for a given FRU's D-bus object path. The property takes the below enum values: >>>com.ibm.VPD.Collection.Status.Success ------------------------------------- This value is assigned when VPD collection is successful. >>>com.ibm.VPD.Collection.Status.Failure ------------------------------------- This value is assigned when we hit prime inventory path on VPD collection failure due to VPD exceptions and also when single FRU VPD collection fails. >>>com.ibm.VPD.Collection.Status.InProgress ---------------------------------------- This value is assigned before single FRU VPD collection starts for the given FRU. >>>com.ibm.VPD.Collection.Status.NotStarted ---------------------------------------- This value is assigned when we hit prime inventory path when the VPD collection is not started as the FRU itself is not present. Test: 1. busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard NAME TYPE SIGNATURE RESULT/VALUE FLAGS com.ibm.VPD.Collection interface - - - .CollectionStatus property s "com.ibm.VPD.Collection.Status.Success" emits-change writable 2. busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0 NAME TYPE SIGNATURE RESULT/VALUE FLAGS com.ibm.VPD.Collection interface - - - .CollectionStatus property s "com.ibm.VPD.Collection.Status.NotSta... emits-change writable 3. busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson NAME TYPE SIGNATURE RESULT/VALUE FLAGS com.ibm.VPD.Collection interface - - - .CollectionStatus property s "com.ibm.VPD.Collection.Status.Failure" emits-change writable 4. Previous state is Failure && perform singleFRUVPDCollect busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson com.ibm.VPD.Collection CollectionStatus s "com.ibm.VPD.Collection.Status.Failure" root@testhostname2:~# busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectFRUVPD o /xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson root@testhostname2:~# busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/tpm_wilson com.ibm.VPD.Collection CollectionStatus s "com.ibm.VPD.Collection.Status.Failure" 5. Previous state is Success && perform singleFRUVPDCollect busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/lcd_op_panel_hill com.ibm.VPD.Collection CollectionStatus s "com.ibm.VPD.Collection.Status.Success" root@testhostname2:~# busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectFRUVPD o /xyz/openbmc_project/inventory/system/chassis/motherboard/lcd_op_panel_hill root@testhostname2:~# busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/lcd_op_panel_hill com.ibm.VPD.Collection CollectionStatus s "com.ibm.VPD.Collection.Status.Success" 6. Previous state is NotStarted && perform singleFRUVPDCollect busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0 com.ibm.VPD.Collection CollectionStatus s "com.ibm.VPD.Collection.Status.NotStarted" root@testhostname2:~# busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager CollectFRUVPD o /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0 root@testhostname2:~# busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0 com.ibm.VPD.Collection CollectionStatus s "com.ibm.VPD.Collection.Status.NotStarted" Change-Id: Ia5010a181f720454bb51538d6fcf308daf6b75ca Signed-off-by: Priyanga Ramasamy <[email protected]>
- Loading branch information