diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index afbc91df..ba741033 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1336,8 +1336,12 @@ class XCCClient(IMMClient): def get_disk_hardware(self, diskent, prefix=''): bdata = {} - if not prefix and diskent.get('location', '').startswith('M.2'): - prefix = 'M.2-' + if not prefix: + location = diskent.get('location', '') + if location.startswith('M.2'): + prefix = 'M.2-' + elif location.startswith('7MM'): + prefix = '7MM-' diskname = 'Disk {1}{0}'.format(diskent['slotNo'], prefix) bdata['Model'] = diskent['productName'].rstrip() bdata['Serial Number'] = diskent['serialNo'].rstrip() @@ -1347,8 +1351,12 @@ class XCCClient(IMMClient): def get_disk_firmware(self, diskent, prefix=''): bdata = {} - if not prefix and diskent.get('location', '').startswith('M.2'): - prefix = 'M.2-' + if not prefix: + location = diskent.get('location', '') + if location.startswith('M.2'): + prefix = 'M.2-' + elif location.startswith('7MM'): + prefix = '7MM-' diskname = 'Disk {1}{0}'.format(diskent['slotNo'], prefix) bdata['model'] = diskent[ 'productName'].rstrip() diff --git a/pyghmi/redfish/oem/lenovo/xcc.py b/pyghmi/redfish/oem/lenovo/xcc.py index b56be0be..13c4535e 100644 --- a/pyghmi/redfish/oem/lenovo/xcc.py +++ b/pyghmi/redfish/oem/lenovo/xcc.py @@ -646,8 +646,12 @@ class OEMHandler(generic.OEMHandler): def _get_disk_firmware_single(self, diskent, prefix=''): bdata = {} - if not prefix and diskent.get('location', '').startswith('M.2'): - prefix = 'M.2-' + if not prefix: + location = diskent.get('location', '') + if location.startswith('M.2'): + prefix = 'M.2-' + elif location.startswith('7MM'): + prefix = '7MM-' diskname = 'Disk {1}{0}'.format(diskent['slotNo'], prefix) bdata['model'] = diskent[ 'productName'].rstrip() @@ -1829,8 +1833,12 @@ class OEMHandler(generic.OEMHandler): def get_disk_hardware(self, diskent, prefix=''): bdata = {} - if not prefix and diskent.get('location', '').startswith('M.2'): - prefix = 'M.2-' + if not prefix: + location = diskent.get('location', '') + if location.startswith('M.2'): + prefix = 'M.2-' + elif location.startswith('7MM'): + prefix = '7MM-' diskname = 'Disk {1}{0}'.format(diskent['slotNo'], prefix) bdata['Model'] = diskent['productName'].rstrip() bdata['Serial Number'] = diskent['serialNo'].rstrip()