Merge "Add the noop management interface to the manual-management hardware type"

This commit is contained in:
Zuul 2018-11-27 03:38:18 +00:00 committed by Gerrit Code Review
commit 0b91e8b00d
3 changed files with 18 additions and 3 deletions

View File

@ -27,6 +27,7 @@ from ironic.drivers.modules.network import flat as flat_net
from ironic.drivers.modules.network import neutron from ironic.drivers.modules.network import neutron
from ironic.drivers.modules.network import noop as noop_net from ironic.drivers.modules.network import noop as noop_net
from ironic.drivers.modules import noop from ironic.drivers.modules import noop
from ironic.drivers.modules import noop_mgmt
from ironic.drivers.modules import pxe from ironic.drivers.modules import pxe
from ironic.drivers.modules.storage import cinder from ironic.drivers.modules.storage import cinder
from ironic.drivers.modules.storage import external as external_storage from ironic.drivers.modules.storage import external as external_storage
@ -96,7 +97,7 @@ class ManualManagementHardware(GenericHardware):
@property @property
def supported_management_interfaces(self): def supported_management_interfaces(self):
"""List of supported management interfaces.""" """List of supported management interfaces."""
return [fake.FakeManagement] return [noop_mgmt.NoopManagement, fake.FakeManagement]
@property @property
def supported_power_interfaces(self): def supported_power_interfaces(self):

View File

@ -23,6 +23,7 @@ from ironic.drivers.modules import fake
from ironic.drivers.modules import inspector from ironic.drivers.modules import inspector
from ironic.drivers.modules import iscsi_deploy from ironic.drivers.modules import iscsi_deploy
from ironic.drivers.modules import noop from ironic.drivers.modules import noop
from ironic.drivers.modules import noop_mgmt
from ironic.drivers.modules import pxe from ironic.drivers.modules import pxe
from ironic.tests.unit.db import base as db_base from ironic.tests.unit.db import base as db_base
from ironic.tests.unit.objects import utils as obj_utils from ironic.tests.unit.objects import utils as obj_utils
@ -34,14 +35,15 @@ class ManualManagementHardwareTestCase(db_base.DbTestCase):
super(ManualManagementHardwareTestCase, self).setUp() super(ManualManagementHardwareTestCase, self).setUp()
self.config(enabled_hardware_types=['manual-management'], self.config(enabled_hardware_types=['manual-management'],
enabled_power_interfaces=['fake'], enabled_power_interfaces=['fake'],
enabled_management_interfaces=['fake']) enabled_management_interfaces=['noop', 'fake'])
self.config(enabled=True, group='inspector') self.config(enabled=True, group='inspector')
def test_default_interfaces(self): def test_default_interfaces(self):
node = obj_utils.create_test_node(self.context, node = obj_utils.create_test_node(self.context,
driver='manual-management') driver='manual-management')
with task_manager.acquire(self.context, node.id) as task: with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.management, fake.FakeManagement) self.assertIsInstance(task.driver.management,
noop_mgmt.NoopManagement)
self.assertIsInstance(task.driver.power, fake.FakePower) self.assertIsInstance(task.driver.power, fake.FakePower)
self.assertIsInstance(task.driver.boot, pxe.PXEBoot) self.assertIsInstance(task.driver.boot, pxe.PXEBoot)
self.assertIsInstance(task.driver.deploy, iscsi_deploy.ISCSIDeploy) self.assertIsInstance(task.driver.deploy, iscsi_deploy.ISCSIDeploy)
@ -53,6 +55,7 @@ class ManualManagementHardwareTestCase(db_base.DbTestCase):
enabled_raid_interfaces=['agent']) enabled_raid_interfaces=['agent'])
node = obj_utils.create_test_node(self.context, node = obj_utils.create_test_node(self.context,
driver='manual-management', driver='manual-management',
management_interface='fake',
deploy_interface='direct', deploy_interface='direct',
raid_interface='agent') raid_interface='agent')
with task_manager.acquire(self.context, node.id) as task: with task_manager.acquire(self.context, node.id) as task:

View File

@ -0,0 +1,11 @@
---
deprecations:
- |
Using the ``fake`` management interface with the ``manual-management``
hardware type is deprecated, please use ``noop`` instead. Existing nodes
will have to be updated after the upgrade.
fixes:
- |
The ``manual-management`` hardware type now defaults to the ``noop``
management interface. Unlike the ``fake`` management interface, it does
not fail on attempt to set the boot device to the local disk.