mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-13 03:08:14 +00:00
Mirror hotspare handling from ipmi to redfish
The redfish plugin should handle the same disk information as ipmi plugin.
This commit is contained in:
parent
3fc31f7332
commit
b819a488f1
@ -999,6 +999,11 @@ class IpmiHandler(object):
|
||||
msg.Disk(self.node, disk.name, disk.description,
|
||||
disk.id, disk.status, disk.serial,
|
||||
disk.fru, array='{0}-{1}'.format(*arr.id)))
|
||||
for disk in arr.hotspares:
|
||||
self.output.put(
|
||||
msg.Disk(self.node, disk.name, disk.description,
|
||||
disk.id, disk.status, disk.serial,
|
||||
disk.fru, array='{0}-{1}'.format(*arr.id)))
|
||||
for arr in scfg.arrays:
|
||||
arrname = '{0}-{1}'.format(*arr.id)
|
||||
self._detail_array(arr, arrname, True)
|
||||
@ -1020,6 +1025,13 @@ class IpmiHandler(object):
|
||||
msg.Disk(self.node, disk.name, disk.description,
|
||||
disk.id, disk.status, disk.serial,
|
||||
disk.fru, arrname))
|
||||
for disk in arr.hotspares:
|
||||
if (name == 'all' or simplify_name(disk.name) == name or
|
||||
disk == name):
|
||||
self.output.put(
|
||||
msg.Disk(self.node, disk.name, disk.description,
|
||||
disk.id, disk.status, disk.serial,
|
||||
disk.fru, arrname))
|
||||
|
||||
def list_disks(self):
|
||||
scfg = self.ipmicmd.get_storage_configuration()
|
||||
@ -1028,6 +1040,8 @@ class IpmiHandler(object):
|
||||
for arr in scfg.arrays:
|
||||
for disk in arr.disks:
|
||||
self.output.put(msg.ChildCollection(simplify_name(disk.name)))
|
||||
for disk in arr.hotspares:
|
||||
self.output.put(msg.ChildCollection(simplify_name(disk.name)))
|
||||
|
||||
def list_arrays(self):
|
||||
scfg = self.ipmicmd.get_storage_configuration()
|
||||
@ -1048,6 +1062,8 @@ class IpmiHandler(object):
|
||||
disks = []
|
||||
for disk in arr.disks:
|
||||
disks.append(simplify_name(disk.name))
|
||||
for disk in arr.hotspares:
|
||||
disks.append(simplify_name(disk.name))
|
||||
self.output.put(msg.Array(self.node, disks, arr.raid,
|
||||
vols, arrname, arr.capacity,
|
||||
arr.available_capacity))
|
||||
|
Loading…
x
Reference in New Issue
Block a user