2
0
mirror of https://opendev.org/x/pyghmi synced 2026-05-18 04:07:19 +00:00

Correct the Purley check for config

In the ipmi path, provide a null
dictionary to make the check
viable, and stop assuming that
an unknown system is always purley.

Change-Id: I13f7a9f70d83e5679d90acb83e0df1522f441f41
This commit is contained in:
Jarrod Johnson
2023-01-30 15:00:26 -05:00
parent 79b894c9f5
commit c6520d56ff
+2 -2
View File
@@ -272,13 +272,13 @@ class LenovoFirmwareConfig(object):
options = {}
data = None
if self.connection:
rsp = (None, 200)
rsp = ({}, 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'):
'release_name', 'unknown'):
rsp = self.xc.grab_redfish_response_with_status(
'/redfish/v1/Systems/1/Actions/Oem/LenovoComputerSystem.DSReadFile',
{'Action': 'DSReadFile', 'FileName': cfgfilename})