2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 03:37:47 +00:00

Fix formatting of SMM/FPC version

The SMM/FPC standard format is 0 padded.  Implement
this in pyghmi.

Change-Id: I21a58678968e7129278bf1fb3ffeb8391e07a4e8
This commit is contained in:
Jarrod Johnson 2018-12-05 15:20:21 -05:00
parent 40a1600f3e
commit 3bf7fc543f

View File

@ -210,6 +210,8 @@ def get_fpc_firmware(bmcver, ipmicmd, fpcorsmm):
builddata = builddata[1:] # discard the 'completion code'
name = 'FPC'
buildid = '{0:02X}{1}'.format(builddata[-2], chr(builddata[-1]))
bmcmajor, bmcminor = [int(x) for x in bmcver.split('.')]
bmcver = '{0}.{1:02d}'.format(bmcmajor, bmcminor)
yield (name, {'version': bmcver, 'build': buildid})
yield ('PSOC', {'version': '{0}.{1}'.format(builddata[2], builddata[3])})