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():