From 79b894c9f554df8980a212ff0ddac250884bc737 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 24 Jan 2023 10:59:56 -0500 Subject: [PATCH] Allow fast setting retrieval for Purley While it must not be used with redfish, it is ok to use the fast path even though setting requires IPMI. Change-Id: I57de25e0ed0bb125adab42916429eca1e29f2392 --- pyghmi/ipmi/oem/lenovo/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index 818db0c7..8b598517 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -271,8 +271,11 @@ class LenovoFirmwareConfig(object): cfgfilename = "config" options = {} data = None - rsp = self.xc.grab_redfish_response_with_status( - '/redfish/v1/Managers/1') + if self.connection: + rsp = (None, 200) + else: + rsp = self.xc.grab_redfish_response_with_status( + '/redfish/v1/Managers/1') if rsp[1] == 200: if 'purley' not in rsp[0].get('Oem', {}).get('Lenovo', {}).get( 'release_name', 'purley'):