Merge "Add missing ilo vendor to the ilo hardware types"

This commit is contained in:
Zuul 2018-02-01 10:26:14 +00:00 committed by Gerrit Code Review
commit 366b29b24f
4 changed files with 15 additions and 4 deletions

View File

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

View File

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

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