Update GPU inventory as a FRU property
Added:
- YAML for FRU field.
- Updated inventory.py data file.
- Updated new field in the test documentation.
Resolves openbmc/openbmc-test-automation#1307
Change-Id: I55d308cf9269e5f8ff14b577b6a058a813d43831
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/bin/generate_inventory b/bin/generate_inventory
index f17025b..ab48882 100755
--- a/bin/generate_inventory
+++ b/bin/generate_inventory
@@ -47,6 +47,7 @@
'State/Decorator/OperationalStatus.interface.yaml', ]
# yaml file paths for GPU.
yaml_gpu_list = ['Inventory/Item.interface.yaml',
+ 'Inventory/Decorator/Replaceable.interface.yaml',
'State/Decorator/OperationalStatus.interface.yaml', ]
# Append to master list
yaml_master_list.append(yaml_fru_list)
diff --git a/data/inventory.py b/data/inventory.py
index a3def69..d993a60 100644
--- a/data/inventory.py
+++ b/data/inventory.py
@@ -26,6 +26,7 @@
"gpu": [
"PrettyName",
"Present",
+ "FieldReplaceable",
"Functional"
]
}
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 1ba6152..4692088 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -224,12 +224,14 @@
# Example:
# A GPU property should have the following entries:
# "gpu":[
+ # "FieldReplaceable",
# "PrettyName",
# "Present",
# "Functional"
# ]
# GPU inventory:
# "/xyz/openbmc_project/inventory/system/chassis/motherboard/gv100card2": {
+ # "FieldReplaceable": 1,
# "Functional": 1,
# "Present": 1,
# "PrettyName": ""