mirror of
https://opendev.org/x/pyghmi
synced 2025-07-25 05:31:11 +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:
@@ -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'] = {
|
||||
|
Reference in New Issue
Block a user