Remove REST FFDC collection if Redfish is supported
Change-Id: Ife5587dbedbef569825e4e2b8eeb715513d28b9b
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index f107bb6..910bce0 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -127,6 +127,12 @@
},
}
+try:
+ redfish_support_trans_state = os.environ.get('REDFISH_SUPPORT_TRANS_STATE', 0) or \
+ int(BuiltIn().get_variable_value("${REDFISH_SUPPORT_TRANS_STATE}", default=0))
+except RobotNotRunningError:
+ pass
+
OPENBMC_BASE = '/xyz/openbmc_project/'
OPENPOWER_BASE = '/org/open_power/'
ENUMERATE_SENSORS = OPENBMC_BASE + 'sensors/enumerate'
@@ -158,6 +164,11 @@
},
}
+# Remove the REST dictionary elements.
+if redfish_support_trans_state == 1:
+ for key in list(FFDC_GET_REQUEST):
+ del FFDC_GET_REQUEST[key]
+
REDFISH_BASE = '/redfish/v1/'
REDFISH_ELOG = REDFISH_BASE + 'Systems/system/LogServices/EventLog/Entries'
REDFISH_FIRMWARE = REDFISH_BASE + 'UpdateService/FirmwareInventory'