From ecd3d5cadcfa69e4a524e9cd4805cff9fcf30ba7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 24 Jun 2024 09:04:17 -0400 Subject: [PATCH] Restore UEFI configuration to IMM systems The work to migrate newer systems to redfish unfortunately broke ability to work with older IMM based systems. Use the lack of redfish in the class to indicate that the system predates this and should use IPMI. Change-Id: I8ca2782e81984a86ddb5f2ded358bbfad07be46d --- pyghmi/ipmi/oem/lenovo/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index a8747562..3a4475c8 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -272,7 +272,9 @@ class LenovoFirmwareConfig(object): cfgfilename = "config" options = {} data = None - if self.connection: + if not hasattr(self.xc, 'grab_redfish_response_with_status'): + rsp = ({}, 500) + elif self.connection: rsp = ({}, 200) else: rsp = self.xc.grab_redfish_response_with_status(