Merge "Add ipmitool vendor interface to the ipmi hardware type"

This commit is contained in:
Jenkins 2017-05-20 20:15:01 +00:00 committed by Gerrit Code Review
commit bd7143f529
6 changed files with 19 additions and 4 deletions

View File

@ -260,7 +260,7 @@
# this value, please make sure that every enabled hardware
# type will have the same set of enabled vendor interfaces on
# every ironic-conductor service. (list value)
#enabled_vendor_interfaces = no-vendor
#enabled_vendor_interfaces = ipmitool,no-vendor
# Default vendor interface to be used for nodes that do not
# have vendor_interface field set. A complete list of vendor

View File

@ -140,7 +140,7 @@ driver_opts = [
cfg.StrOpt('default_storage_interface',
help=_DEFAULT_IFACE_HELP.format('storage')),
cfg.ListOpt('enabled_vendor_interfaces',
default=['no-vendor'],
default=['ipmitool', 'no-vendor'],
help=_ENABLED_IFACE_HELP.format('vendor')),
cfg.StrOpt('default_vendor_interface',
help=_DEFAULT_IFACE_HELP.format('vendor')),

View File

@ -47,6 +47,11 @@ class IPMIHardware(generic.GenericHardware):
"""List of supported power interfaces."""
return [ipmitool.IPMIPower]
@property
def supported_vendor_interfaces(self):
"""List of supported vendor interfaces."""
return [ipmitool.VendorPassthru, noop.NoVendor]
class PXEAndIPMIToolDriver(base.BaseDriver):
"""PXE + IPMITool driver.

View File

@ -31,7 +31,8 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
enabled_power_interfaces=['ipmitool'],
enabled_management_interfaces=['ipmitool'],
enabled_raid_interfaces=['no-raid', 'agent'],
enabled_console_interfaces=['no-console'])
enabled_console_interfaces=['no-console'],
enabled_vendor_interfaces=['ipmitool', 'no-vendor'])
def test_default_interfaces(self):
node = obj_utils.create_test_node(self.context, driver='ipmi')
@ -43,6 +44,7 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
self.assertIsInstance(task.driver.deploy, iscsi_deploy.ISCSIDeploy)
self.assertIsInstance(task.driver.console, noop.NoConsole)
self.assertIsInstance(task.driver.raid, noop.NoRAID)
self.assertIsInstance(task.driver.vendor, ipmitool.VendorPassthru)
def test_override_with_shellinabox(self):
self.config(enabled_console_interfaces=['ipmitool-shellinabox',
@ -51,7 +53,8 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
self.context, driver='ipmi',
deploy_interface='direct',
raid_interface='agent',
console_interface='ipmitool-shellinabox')
console_interface='ipmitool-shellinabox',
vendor_interface='no-vendor')
with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.management,
ipmitool.IPMIManagement)
@ -61,6 +64,7 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
self.assertIsInstance(task.driver.console,
ipmitool.IPMIShellinaboxConsole)
self.assertIsInstance(task.driver.raid, agent.AgentRAID)
self.assertIsInstance(task.driver.vendor, noop.NoVendor)
class IPMIClassicDriversTestCase(testtools.TestCase):

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``ipmi`` hardware type now supports ``ipmitool`` vendor interface
(similar to classic ipmitool drivers).

View File

@ -141,6 +141,7 @@ ironic.hardware.interfaces.storage =
ironic.hardware.interfaces.vendor =
fake = ironic.drivers.modules.fake:FakeVendorB
ipmitool = ironic.drivers.modules.ipmitool:VendorPassthru
no-vendor = ironic.drivers.modules.noop:NoVendor
ironic.hardware.types =