GPU inventory property fields
Changes:
- Add GPU yaml fields to generate inventory.py.
- Generate inventory.py for prodution test usage.
Resolves openbmc/openbmc-test-automation#1136
Change-Id: I0a7d7223862a901a4d56e8d074a4440d20a930df
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/bin/generate_inventory b/bin/generate_inventory
index ce5973d..3aea623 100755
--- a/bin/generate_inventory
+++ b/bin/generate_inventory
@@ -13,7 +13,7 @@
from gen_print import *
# This list will be longer when more development codes are available.
-inventory_items = ['fru', 'core', 'fan']
+inventory_items = ['fru', 'core', 'fan', 'gpu']
print_var(inventory_items)
fru_inventory_file_path = 'inventory.py'
print_var(fru_inventory_file_path)
@@ -46,10 +46,15 @@
yaml_fan_list = [ 'Inventory/Item.interface.yaml',
'State/Decorator/OperationalStatus.interface.yaml',
]
+# yaml file paths for GPU.
+yaml_gpu_list = [ 'Inventory/Item.interface.yaml',
+ 'State/Decorator/OperationalStatus.interface.yaml',
+ ]
# Append to master list
yaml_master_list.append(yaml_fru_list)
yaml_master_list.append(yaml_core_list)
yaml_master_list.append(yaml_fan_list)
+yaml_master_list.append(yaml_gpu_list)
print_var(yaml_master_list)
diff --git a/data/inventory.py b/data/inventory.py
index 9d2674d..5cdac4a 100644
--- a/data/inventory.py
+++ b/data/inventory.py
@@ -21,5 +21,10 @@
"FieldReplaceable",
"Cached",
"Functional"
+ ],
+ "gpu":[
+ "PrettyName",
+ "Present",
+ "Functional"
]
-}
\ No newline at end of file
+}