From 0961b175029b752d37a8df80116356c3a0a2418a Mon Sep 17 00:00:00 2001 From: "Qianbiao.NG" Date: Fri, 12 Jun 2020 10:39:32 +0800 Subject: [PATCH] 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 --- doc/source/admin/drivers/ibmc.rst | 15 ++++++++++----- ironic/drivers/ibmc.py | 6 ------ .../unit/drivers/modules/ibmc/test_vendor.py | 3 +-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/source/admin/drivers/ibmc.rst b/doc/source/admin/drivers/ibmc.rst index 76dcc4631d..86d89c057d 100644 --- a/doc/source/admin/drivers/ibmc.rst +++ b/doc/source/admin/drivers/ibmc.rst @@ -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 diff --git a/ironic/drivers/ibmc.py b/ironic/drivers/ibmc.py index cc8b519ed5..5f37d520e5 100644 --- a/ironic/drivers/ibmc.py +++ b/ironic/drivers/ibmc.py @@ -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] diff --git a/ironic/tests/unit/drivers/modules/ibmc/test_vendor.py b/ironic/tests/unit/drivers/modules/ibmc/test_vendor.py index 2714203ca6..71ba47a7d2 100644 --- a/ironic/tests/unit/drivers/modules/ibmc/test_vendor.py +++ b/ironic/tests/unit/drivers/modules/ibmc/test_vendor.py @@ -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,