2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-31 05:17:39 +00:00

Merge "Fix SMMv2 ffdc download"

This commit is contained in:
Zuul 2021-03-23 18:33:52 +00:00 committed by Gerrit Code Review
commit e498364577
2 changed files with 8 additions and 3 deletions

View File

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

View File

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