Fix: review from dtantsur of 728123

This patch aims to fix issues proposed by dtantsur for 728123[1].

[1] https://review.opendev.org/#/c/728123/

Change-Id: I32c3e15aaa2ab0215d50921bdc9ee5c27c1c490c
This commit is contained in:
Qianbiao.NG 2020-06-12 10:39:32 +08:00
parent 15f0dc93df
commit 0961b17502
3 changed files with 11 additions and 13 deletions

View File

@ -14,7 +14,7 @@ The ``ibmc`` hardware type supports the following Ironic interfaces:
* Management Interface: Boot device management
* Power Interface: Power management
* `RAID Interface`_: RAID controller and disk management
* `Vendor Interface`_: BIOS management
* `Vendor Interface`_: ibmc passthru interfaces
Prerequisites
=============
@ -200,6 +200,11 @@ no no max
Physical disks choice strategy
------------------------------
.. note::
physical-disk-group: a group of physical disks which have been used by some
logical-disks with same RAID level.
* If no ``physical_disks`` are specified, the "waste least" strategy will be
used to choose the physical disks.
@ -215,9 +220,9 @@ Physical disks choice strategy
with the minimum number of disks.
* when ``share_physical_disks`` option is present, ``ibmc`` driver will
create logical disk upon existing physical-disk-groups(logical-disks) first.
Only when no exists physical-disk-group matches, then it chooses unused
physical disks with same strategy described upon. When multiple exists
create logical disk upon existing physical-disk-group list first. Only
when no existing physical-disk-group matches, then it chooses unused
physical disks with same strategy described above. When multiple exists
physical-disk-groups matches, it will use "waste least" strategy too,
the bigger capacity left the better. For example, to create a logical disk
shown below on a ``ibmc`` server which has two RAID5 logical disks already.
@ -265,7 +270,7 @@ Physical disks choice strategy
Examples
--------
A typical scene creates:
In a typical scenario we may want to create:
* RAID 5, 500G, root OS volume with 3 disks
* RAID 5, rest available space, data volume with rest disks

View File

@ -20,7 +20,6 @@ from ironic.drivers.modules.ibmc import management as ibmc_mgmt
from ironic.drivers.modules.ibmc import power as ibmc_power
from ironic.drivers.modules.ibmc import raid as ibmc_raid
from ironic.drivers.modules.ibmc import vendor as ibmc_vendor
from ironic.drivers.modules import inspector
from ironic.drivers.modules import noop
@ -46,8 +45,3 @@ class IBMCHardware(generic.GenericHardware):
def supported_raid_interfaces(self):
"""List of supported raid interfaces."""
return [ibmc_raid.IbmcRAID, noop.NoRAID]
@property
def supported_inspect_interfaces(self):
"""List of supported inspect interfaces."""
return [inspector.Inspector, noop.NoInspect]

View File

@ -67,8 +67,7 @@ class IBMCVendorTestCase(base.IBMCTestCase):
conn = self.mock_ibmc_conn(connect_ibmc)
ctrl = mock.Mock()
summary = mock.Mock()
ctrl.summary.return_value = summary
summary = ctrl.summary.return_value
conn.system.storage.list.return_value = [ctrl]
with task_manager.acquire(self.context, self.node.uuid,