mirror of
https://opendev.org/x/pyghmi
synced 2026-01-11 10:42:32 +00:00
Add prefix to 7mm disks.
Change-Id: I0c33944a92de87f32baed97dbb1789f86b1cd0a3
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user