- fields.extend([
- (_MakeField("disk.size/%s" % i, "Disk/%s" % i, QFT_UNIT,
- "Disk size of %s disk" % utils.FormatOrdinal(i + 1)),
- IQ_CONFIG, 0, _GetInstDiskSize(i))
- for i in range(constants.MAX_DISKS)])
+ for i in range(constants.MAX_DISKS):
+ numtext = utils.FormatOrdinal(i + 1)
+ fields.extend([
+ (_MakeField("disk.size/%s" % i, "Disk/%s" % i, QFT_UNIT,
+ "Disk size of %s disk" % numtext),
+ IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
+ (_MakeField("disk.spindles/%s" % i, "DiskSpindles/%s" % i, QFT_NUMBER,
+ "Spindles of %s disk" % numtext),
+ IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSpindles)),
+ (_MakeField("disk.name/%s" % i, "DiskName/%s" % i, QFT_TEXT,
+ "Name of %s disk" % numtext),
+ IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
+ (_MakeField("disk.uuid/%s" % i, "DiskUUID/%s" % i, QFT_TEXT,
+ "UUID of %s disk" % numtext),
+ IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])