FFDC Initial OpenBMC base URI variable
The new OpenBMC URI would start with /xyz/openbmc_project ahead.
This means all our existing tests and library would be impacted.
To make the transition easier from existing /org/openbmc to newer
/xyz/openbmc_project a new variable is introduced in resource.txt
Use robot method to import variables from the resource.txt file,
in this case ${OPENBMC_BASE_URI}.
Change-Id: I1a2e09b820fe95448ff3eeac8212206f3f937a86
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index e68181e..e71f0c4 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -9,6 +9,8 @@
#############################################################
"""
+from robot.libraries.BuiltIn import BuiltIn
+
# -------------------
# FFDC default list
# -------------------
@@ -100,15 +102,24 @@
},
}
+# import variables from resource.txt file
+BuiltIn().import_resource('resource.txt')
+OPENBMC_BASE = BuiltIn().get_variable_value('${OPENBMC_BASE_URI}')
+
+ENUMERATE_SENSORS = OPENBMC_BASE + 'sensors/enumerate'
+ENUMERATE_SYSTEMS = OPENBMC_BASE + 'inventory/system/enumerate'
+ENUMERATE_EVENTS = OPENBMC_BASE + 'records/events/enumerate'
+ENUMERATE_LED = OPENBMC_BASE + 'control/led/enumerate'
+
# Add file name and correcponding Get Request
FFDC_GET_REQUEST = {
'GET REQUESTS':
{
# File Name Command
- 'BMC_sensor_list': '/org/openbmc/sensors/enumerate',
- 'BMC_inventory': '/org/openbmc/inventory/system/enumerate',
- 'BMC_led': '/org/openbmc/control/led/enumerate',
- 'BMC_record_log': '/org/openbmc/records/events/enumerate',
+ 'BMC_sensor_list': ENUMERATE_SENSORS,
+ 'BMC_inventory': ENUMERATE_SYSTEMS,
+ 'BMC_led': ENUMERATE_EVENTS,
+ 'BMC_record_log': ENUMERATE_LED,
},
}