From faa2cbcddcbf993a099cbadacc13ff39b836e935 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 26 Feb 2018 10:59:34 -0500 Subject: [PATCH] Add the bay number for dense Lenovo platform The dense platform offers the bay in a property. Provide this in a normalized way. Change-Id: I60b1192260130d00852988b777776e81df7b8b66 --- pyghmi/ipmi/oem/lenovo/imm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index dacea248..4731f637 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -413,7 +413,11 @@ class IMMClient(object): hwmap = {} enclosureuuid = self.get_property('/v2/ibmc/smm/chassis/uuid') if enclosureuuid: - hwmap['Enclosure'] = {'UUID': fixup_uuid(enclosureuuid)} + bay = self.get_property('/v2/cmm/sp/7') + hwmap['Enclosure'] = { + 'UUID': fixup_uuid(enclosureuuid), + 'Bay': bay, + } adapterdata = self.get_cached_data('lenovo_cached_adapters') if not adapterdata: if self.updating: