mirror of
https://opendev.org/x/pyghmi
synced 2025-01-27 19:37:44 +00:00
Fix bay number from IMM property in nextscale chassis
The property is ASCII representation of decimal number that would result from erroneously evaluating BCD as normal. Compensate by working back to the hexadecimal representation and presenting that as a number. Change-Id: I47ae2fe484c2eaaa4c103eae81c56f9561ac316c
This commit is contained in:
parent
e58247b2c9
commit
dd1dfdb7d5
@ -533,7 +533,8 @@ class IMMClient(object):
|
||||
hwmap = {}
|
||||
enclosureuuid = self.get_property('/v2/ibmc/smm/chassis/uuid')
|
||||
if enclosureuuid:
|
||||
bay = self.get_property('/v2/cmm/sp/7')
|
||||
bay = hex(int(self.get_property('/v2/cmm/sp/7'))).replace(
|
||||
'0x', '')
|
||||
serial = self.get_property('/v2/ibmc/smm/chassis/sn')
|
||||
model = self.get_property('/v2/ibmc/smm/chassis/mtm')
|
||||
hwmap['Enclosure'] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user