mirror of
https://opendev.org/x/pyghmi
synced 2025-01-31 05:17:39 +00:00
Fix SMMv2 ffdc download
Change-Id: I6ed9eca50a82d989dcbd679d451dd13ce7833c99
This commit is contained in:
parent
ce333b3bfc
commit
7448c5b256
@ -662,7 +662,8 @@ class OEMHandler(generic.OEMHandler):
|
||||
autosuffix)
|
||||
if self.is_fpc:
|
||||
return self.smmhandler.get_diagnostic_data(savefile, progress,
|
||||
autosuffix)
|
||||
autosuffix,
|
||||
self._fpc_variant)
|
||||
if self.has_tsma:
|
||||
return self.tsmahandler.get_diagnostic_data(savefile, progress,
|
||||
autosuffix)
|
||||
|
@ -508,7 +508,8 @@ class SMMClient(object):
|
||||
self.ipmicmd.xraw_command(netfn=0x32, command=0xa4,
|
||||
data=[int(bay), 2])
|
||||
|
||||
def get_diagnostic_data(self, savefile, progress=None, autosuffix=False):
|
||||
def get_diagnostic_data(self, savefile, progress=None, autosuffix=False,
|
||||
variant=None):
|
||||
rsp = self.ipmicmd.xraw_command(netfn=0x32, command=0xb1, data=[0])
|
||||
if bytearray(rsp['data'])[0] != 0:
|
||||
raise Exception("Service data generation already in progress")
|
||||
@ -529,7 +530,10 @@ class SMMClient(object):
|
||||
progress({'phase': 'initializing', 'progress': initpct})
|
||||
if self.wc is None:
|
||||
raise Exception("Failed to connect to web api")
|
||||
url = '/preview/smm-ffdc.tgz?ST1={0}'.format(self.st1)
|
||||
if variant and variant >> 5:
|
||||
url = '/preview/smm2-ffdc.tgz?ST1={0}'.format(self.st1)
|
||||
else:
|
||||
url = '/preview/smm-ffdc.tgz?ST1={0}'.format(self.st1)
|
||||
if autosuffix and not savefile.endswith('.tgz'):
|
||||
savefile += '-smm-ffdc.tgz'
|
||||
fd = webclient.FileDownloader(self.wc, url, savefile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user