Add missing ilo vendor to the ilo hardware types

I'm not sure why it was missed initially. But if we don't have it,
the automatic migration to hardware types will reset the vendor
interface to no-vendor, which may look like a regression to users.

Change-Id: I6da6aa8138d7f0cbf225c15c4137edeec2c33d49
Related-Bug: #1690185
This commit is contained in:
Dmitry Tantsur 2018-01-31 16:49:56 +01:00
parent e882dfbd52
commit 8f464b909a
4 changed files with 15 additions and 4 deletions

View File

@ -66,6 +66,11 @@ class IloHardware(generic.GenericHardware):
"""List of supported power interfaces."""
return [power.IloPower]
@property
def supported_vendor_interfaces(self):
"""List of supported power interfaces."""
return [vendor.VendorPassthru, noop.NoVendor]
class IloVirtualMediaIscsiDriver(base.BaseDriver):
"""IloDriver using IloClient interface.

View File

@ -48,7 +48,7 @@ class IloHardwareTestCase(db_base.DbTestCase):
enabled_management_interfaces=['ilo'],
enabled_power_interfaces=['ilo'],
enabled_raid_interfaces=['no-raid', 'agent'],
enabled_vendor_interfaces=['no-vendor'])
enabled_vendor_interfaces=['ilo', 'no-vendor'])
def test_default_interfaces(self):
node = obj_utils.create_test_node(self.context,
@ -69,7 +69,7 @@ class IloHardwareTestCase(db_base.DbTestCase):
self.assertIsInstance(task.driver.raid,
noop.NoRAID)
self.assertIsInstance(task.driver.vendor,
noop.NoVendor)
ilo.vendor.VendorPassthru)
def test_override_with_inspector(self):
self.config(enabled_inspect_interfaces=['inspector', 'ilo'])
@ -77,7 +77,8 @@ class IloHardwareTestCase(db_base.DbTestCase):
self.context, driver='ilo',
deploy_interface='direct',
inspect_interface='inspector',
raid_interface='agent')
raid_interface='agent',
vendor_interface='no-vendor')
with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.boot,
ilo.boot.IloVirtualMediaBoot)
@ -117,7 +118,7 @@ class IloHardwareTestCase(db_base.DbTestCase):
self.assertIsInstance(task.driver.raid,
agent.AgentRAID)
self.assertIsInstance(task.driver.vendor,
noop.NoVendor)
ilo.vendor.VendorPassthru)
@mock.patch.object(ilo.importutils, 'try_import', spec_set=True,

View File

@ -0,0 +1,4 @@
---
features:
- |
Adds missing ``ilo`` vendor interface to the ``ilo`` hardware type.

View File

@ -166,6 +166,7 @@ ironic.hardware.interfaces.storage =
ironic.hardware.interfaces.vendor =
fake = ironic.drivers.modules.fake:FakeVendorB
idrac = ironic.drivers.modules.drac.vendor_passthru:DracVendorPassthru
ilo = ironic.drivers.modules.ilo.vendor:VendorPassthru
ipmitool = ironic.drivers.modules.ipmitool:VendorPassthru
no-vendor = ironic.drivers.modules.noop:NoVendor