Browse Source

Merge "Add missing agent RAID compatibility for ilo5 and idrac" into stable/ussuri

changes/53/741853/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
bcf2993dce
5 changed files with 38 additions and 25 deletions
  1. +4
    -4
      ironic/drivers/drac.py
  2. +4
    -4
      ironic/drivers/ilo.py
  3. +11
    -6
      ironic/tests/unit/drivers/test_drac.py
  4. +14
    -11
      ironic/tests/unit/drivers/test_ilo.py
  5. +5
    -0
      releasenotes/notes/missing-sw-raid-b7fdc9259612970d.yaml

+ 4
- 4
ironic/drivers/drac.py View File

@@ -25,7 +25,6 @@ from ironic.drivers.modules.drac import management
from ironic.drivers.modules.drac import power
from ironic.drivers.modules.drac import raid
from ironic.drivers.modules.drac import vendor_passthru
from ironic.drivers.modules import inspector
from ironic.drivers.modules import ipxe
from ironic.drivers.modules import noop
from ironic.drivers.modules import pxe
@@ -69,13 +68,14 @@ class IDRACHardware(generic.GenericHardware):
# if it is enabled by an operator (implying that the service is
# installed).
return [drac_inspect.DracWSManInspect, drac_inspect.DracInspect,
drac_inspect.DracRedfishInspect, inspector.Inspector,
noop.NoInspect]
drac_inspect.DracRedfishInspect] + super(
IDRACHardware, self).supported_inspect_interfaces

@property
def supported_raid_interfaces(self):
"""List of supported raid interfaces."""
return [raid.DracWSManRAID, raid.DracRAID, noop.NoRAID]
return [raid.DracWSManRAID, raid.DracRAID] + super(
IDRACHardware, self).supported_raid_interfaces

@property
def supported_vendor_interfaces(self):


+ 4
- 4
ironic/drivers/ilo.py View File

@@ -24,7 +24,6 @@ from ironic.drivers.modules.ilo import management
from ironic.drivers.modules.ilo import power
from ironic.drivers.modules.ilo import raid
from ironic.drivers.modules.ilo import vendor
from ironic.drivers.modules import inspector
from ironic.drivers.modules import noop


@@ -53,8 +52,8 @@ class IloHardware(generic.GenericHardware):
@property
def supported_inspect_interfaces(self):
"""List of supported inspect interfaces."""
return [inspect.IloInspect, inspector.Inspector,
noop.NoInspect]
return [inspect.IloInspect] + super(
IloHardware, self).supported_inspect_interfaces

@property
def supported_management_interfaces(self):
@@ -81,7 +80,8 @@ class Ilo5Hardware(IloHardware):
@property
def supported_raid_interfaces(self):
"""List of supported raid interfaces."""
return [raid.Ilo5RAID, noop.NoRAID]
return [raid.Ilo5RAID] + super(
Ilo5Hardware, self).supported_raid_interfaces

@property
def supported_management_interfaces(self):


+ 11
- 6
ironic/tests/unit/drivers/test_drac.py View File

@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from oslo_utils import uuidutils

from ironic.conductor import task_manager
from ironic.drivers.modules import agent
from ironic.drivers.modules import drac
@@ -42,7 +44,7 @@ class IDRACHardwareTestCase(db_base.DbTestCase):
'no-inspect'],
enabled_network_interfaces=['flat', 'neutron', 'noop'],
enabled_raid_interfaces=[
'idrac', 'idrac-wsman', 'no-raid'],
'idrac', 'idrac-wsman', 'no-raid', 'agent'],
enabled_vendor_interfaces=[
'idrac', 'idrac-wsman', 'no-vendor'],
enabled_bios_interfaces=[
@@ -108,11 +110,14 @@ class IDRACHardwareTestCase(db_base.DbTestCase):
inspect=inspector.Inspector)

def test_override_with_raid(self):
node = obj_utils.create_test_node(self.context, driver='idrac',
raid_interface='no-raid')
with task_manager.acquire(self.context, node.id) as task:
self._validate_interfaces(task.driver,
raid=noop.NoRAID)
for iface, impl in [('agent', agent.AgentRAID),
('no-raid', noop.NoRAID)]:
node = obj_utils.create_test_node(self.context,
uuid=uuidutils.generate_uuid(),
driver='idrac',
raid_interface=iface)
with task_manager.acquire(self.context, node.id) as task:
self._validate_interfaces(task.driver, raid=impl)

def test_override_no_vendor(self):
node = obj_utils.create_test_node(self.context, driver='idrac',


+ 14
- 11
ironic/tests/unit/drivers/test_ilo.py View File

@@ -16,10 +16,11 @@
Test class for iLO Drivers
"""

from oslo_utils import uuidutils

from ironic.conductor import task_manager
from ironic.drivers import ilo
from ironic.drivers.modules import agent
from ironic.drivers.modules.ilo import management
from ironic.drivers.modules.ilo import raid
from ironic.drivers.modules import inspector
from ironic.drivers.modules import iscsi_deploy
@@ -187,16 +188,6 @@ class Ilo5HardwareTestCase(db_base.DbTestCase):
def test_default_interfaces(self):
node = obj_utils.create_test_node(self.context, driver='ilo5')
with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.raid, raid.Ilo5RAID)
self.assertIsInstance(task.driver.management,
management.Ilo5Management)

def test_override_with_no_raid(self):
self.config(enabled_raid_interfaces=['no-raid', 'ilo5'])
node = obj_utils.create_test_node(self.context, driver='ilo5',
raid_interface='no-raid')
with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.raid, noop.NoRAID)
self.assertIsInstance(task.driver.boot,
ilo.boot.IloVirtualMediaBoot)
self.assertIsInstance(task.driver.console,
@@ -209,7 +200,19 @@ class Ilo5HardwareTestCase(db_base.DbTestCase):
ilo.management.IloManagement)
self.assertIsInstance(task.driver.power,
ilo.power.IloPower)
self.assertIsInstance(task.driver.raid, raid.Ilo5RAID)
self.assertIsInstance(task.driver.rescue,
noop.NoRescue)
self.assertIsInstance(task.driver.vendor,
ilo.vendor.VendorPassthru)

def test_override_raid(self):
self.config(enabled_raid_interfaces=['agent', 'no-raid', 'ilo5'])
for iface, impl in [('agent', agent.AgentRAID),
('no-raid', noop.NoRAID)]:
node = obj_utils.create_test_node(self.context,
uuid=uuidutils.generate_uuid(),
driver='ilo5',
raid_interface=iface)
with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.raid, impl)

+ 5
- 0
releasenotes/notes/missing-sw-raid-b7fdc9259612970d.yaml View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fixes missing ``agent`` RAID compatibility for the ``ilo5`` and ``idrac``
hardware type preventing software RAID for working with them.

Loading…
Cancel
Save