From fb7c21198353794077efcf49c7e64253e17af330 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 17 Feb 2021 15:28:09 -0500 Subject: [PATCH] Fix SMM ffdc behavior The diagnostic data for SMM was not being handled properly with the new autosuffix behavior. Change-Id: I08828719ef23f8350d02572d94461e50775a3e19 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index bd37fa22..83b37b38 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -504,7 +504,7 @@ class SMMClient(object): self.ipmicmd.xraw_command(netfn=0x32, command=0xa4, data=[int(bay), 2]) - def get_diagnostic_data(self, savefile, progress=None): + def get_diagnostic_data(self, savefile, progress=None, autosuffix=False): 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") @@ -526,6 +526,8 @@ class SMMClient(object): if self.wc is None: raise Exception("Failed to connect to web api") 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) fd.start() while fd.isAlive():