2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-04 21:12:47 +00:00

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
This commit is contained in:
Jarrod Johnson 2023-01-24 10:59:56 -05:00
parent 25a04fd87b
commit 79b894c9f5

View File

@ -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'):