Browse Source

Merge "Fix idrac-wsman RAID apply_configuration"

changes/48/739448/13
Zuul 4 days ago
committed by Gerrit Code Review
parent
commit
ed8cc5ade0
3 changed files with 22 additions and 1 deletions
  1. +1
    -1
      ironic/drivers/modules/drac/raid.py
  2. +15
    -0
      ironic/tests/unit/drivers/modules/drac/test_raid.py
  3. +6
    -0
      releasenotes/notes/bug-2007963-idrac-wsman-raid-apply-configuration-792ccf195057016b.yaml

+ 1
- 1
ironic/drivers/modules/drac/raid.py View File

@@ -1171,7 +1171,7 @@ class DracWSManRAID(base.RAIDInterface):
def apply_configuration(self, task, raid_config, create_root_volume=True,
create_nonroot_volumes=False,
delete_existing=True):
return super(DracRAID, self).apply_configuration(
return super(DracWSManRAID, self).apply_configuration(
task, raid_config, create_root_volume=create_root_volume,
create_nonroot_volumes=create_nonroot_volumes,
delete_existing=delete_existing)


+ 15
- 0
ironic/tests/unit/drivers/modules/drac/test_raid.py View File

@@ -24,6 +24,7 @@ from dracclient import exceptions as drac_exceptions
from ironic.common import exception
from ironic.common import states
from ironic.conductor import task_manager
from ironic.drivers import base
from ironic.drivers.modules.drac import common as drac_common
from ironic.drivers.modules.drac import job as drac_job
from ironic.drivers.modules.drac import raid as drac_raid
@@ -2224,3 +2225,17 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
mock_commit_config.assert_called_once_with(
self.node, raid_controller='RAID.Integrated.1-1', reboot=False,
realtime=True)

@mock.patch.object(base.RAIDInterface, 'apply_configuration',
autospec=True)
def test_apply_configuration(self, mock_apply_configuration):
with task_manager.acquire(self.context, self.node.uuid,
shared=False) as task:
task.driver.raid.apply_configuration(
task, self.target_raid_configuration,
create_root_volume=False, create_nonroot_volumes=True,
delete_existing=False)

mock_apply_configuration.assert_called_once_with(
task.driver.raid, task,
self.target_raid_configuration, False, True, False)

+ 6
- 0
releasenotes/notes/bug-2007963-idrac-wsman-raid-apply-configuration-792ccf195057016b.yaml View File

@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes RAID ``apply_configuration`` deploy step for ``idrac-wsman`` where
deployment failed with ``TypeError``.
See `story 2007963 <https://storyboard.openstack.org/#!/story/2007963>`_.

Loading…
Cancel
Save