Commit 24cdfd2
committed
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]>1 parent 5028d9d commit 24cdfd2
File tree
5 files changed
+111
-8
lines changed- vpd-manager
- include
- utility
- src
5 files changed
+111
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
190 | 202 | | |
191 | 203 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
457 | 483 | | |
458 | 484 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
472 | 485 | | |
473 | 486 | | |
474 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| 390 | + | |
390 | 391 | | |
391 | 392 | | |
392 | 393 | | |
| |||
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | | - | |
417 | | - | |
| 417 | + | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
450 | 461 | | |
451 | 462 | | |
452 | 463 | | |
| |||
480 | 491 | | |
481 | 492 | | |
482 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
483 | 509 | | |
484 | 510 | | |
485 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| 836 | + | |
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
839 | 850 | | |
840 | 851 | | |
841 | 852 | | |
| |||
1138 | 1149 | | |
1139 | 1150 | | |
1140 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
1141 | 1156 | | |
1142 | 1157 | | |
1143 | 1158 | | |
| |||
1470 | 1485 | | |
1471 | 1486 | | |
1472 | 1487 | | |
1473 | | - | |
| 1488 | + | |
1474 | 1489 | | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
1480 | 1495 | | |
1481 | 1496 | | |
1482 | 1497 | | |
| |||
1683 | 1698 | | |
1684 | 1699 | | |
1685 | 1700 | | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
1686 | 1712 | | |
0 commit comments