Merge "Add ipmitool vendor interface to the ipmi hardware type"
This commit is contained in:
commit
bd7143f529
@ -260,7 +260,7 @@
|
|||||||
# this value, please make sure that every enabled hardware
|
# this value, please make sure that every enabled hardware
|
||||||
# type will have the same set of enabled vendor interfaces on
|
# type will have the same set of enabled vendor interfaces on
|
||||||
# every ironic-conductor service. (list value)
|
# 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
|
# Default vendor interface to be used for nodes that do not
|
||||||
# have vendor_interface field set. A complete list of vendor
|
# have vendor_interface field set. A complete list of vendor
|
||||||
|
@ -140,7 +140,7 @@ driver_opts = [
|
|||||||
cfg.StrOpt('default_storage_interface',
|
cfg.StrOpt('default_storage_interface',
|
||||||
help=_DEFAULT_IFACE_HELP.format('storage')),
|
help=_DEFAULT_IFACE_HELP.format('storage')),
|
||||||
cfg.ListOpt('enabled_vendor_interfaces',
|
cfg.ListOpt('enabled_vendor_interfaces',
|
||||||
default=['no-vendor'],
|
default=['ipmitool', 'no-vendor'],
|
||||||
help=_ENABLED_IFACE_HELP.format('vendor')),
|
help=_ENABLED_IFACE_HELP.format('vendor')),
|
||||||
cfg.StrOpt('default_vendor_interface',
|
cfg.StrOpt('default_vendor_interface',
|
||||||
help=_DEFAULT_IFACE_HELP.format('vendor')),
|
help=_DEFAULT_IFACE_HELP.format('vendor')),
|
||||||
|
@ -47,6 +47,11 @@ class IPMIHardware(generic.GenericHardware):
|
|||||||
"""List of supported power interfaces."""
|
"""List of supported power interfaces."""
|
||||||
return [ipmitool.IPMIPower]
|
return [ipmitool.IPMIPower]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def supported_vendor_interfaces(self):
|
||||||
|
"""List of supported vendor interfaces."""
|
||||||
|
return [ipmitool.VendorPassthru, noop.NoVendor]
|
||||||
|
|
||||||
|
|
||||||
class PXEAndIPMIToolDriver(base.BaseDriver):
|
class PXEAndIPMIToolDriver(base.BaseDriver):
|
||||||
"""PXE + IPMITool driver.
|
"""PXE + IPMITool driver.
|
||||||
|
@ -31,7 +31,8 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
|
|||||||
enabled_power_interfaces=['ipmitool'],
|
enabled_power_interfaces=['ipmitool'],
|
||||||
enabled_management_interfaces=['ipmitool'],
|
enabled_management_interfaces=['ipmitool'],
|
||||||
enabled_raid_interfaces=['no-raid', 'agent'],
|
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):
|
def test_default_interfaces(self):
|
||||||
node = obj_utils.create_test_node(self.context, driver='ipmi')
|
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.deploy, iscsi_deploy.ISCSIDeploy)
|
||||||
self.assertIsInstance(task.driver.console, noop.NoConsole)
|
self.assertIsInstance(task.driver.console, noop.NoConsole)
|
||||||
self.assertIsInstance(task.driver.raid, noop.NoRAID)
|
self.assertIsInstance(task.driver.raid, noop.NoRAID)
|
||||||
|
self.assertIsInstance(task.driver.vendor, ipmitool.VendorPassthru)
|
||||||
|
|
||||||
def test_override_with_shellinabox(self):
|
def test_override_with_shellinabox(self):
|
||||||
self.config(enabled_console_interfaces=['ipmitool-shellinabox',
|
self.config(enabled_console_interfaces=['ipmitool-shellinabox',
|
||||||
@ -51,7 +53,8 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
|
|||||||
self.context, driver='ipmi',
|
self.context, driver='ipmi',
|
||||||
deploy_interface='direct',
|
deploy_interface='direct',
|
||||||
raid_interface='agent',
|
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:
|
with task_manager.acquire(self.context, node.id) as task:
|
||||||
self.assertIsInstance(task.driver.management,
|
self.assertIsInstance(task.driver.management,
|
||||||
ipmitool.IPMIManagement)
|
ipmitool.IPMIManagement)
|
||||||
@ -61,6 +64,7 @@ class IPMIHardwareTestCase(db_base.DbTestCase):
|
|||||||
self.assertIsInstance(task.driver.console,
|
self.assertIsInstance(task.driver.console,
|
||||||
ipmitool.IPMIShellinaboxConsole)
|
ipmitool.IPMIShellinaboxConsole)
|
||||||
self.assertIsInstance(task.driver.raid, agent.AgentRAID)
|
self.assertIsInstance(task.driver.raid, agent.AgentRAID)
|
||||||
|
self.assertIsInstance(task.driver.vendor, noop.NoVendor)
|
||||||
|
|
||||||
|
|
||||||
class IPMIClassicDriversTestCase(testtools.TestCase):
|
class IPMIClassicDriversTestCase(testtools.TestCase):
|
||||||
|
5
releasenotes/notes/ipmitool-vendor-3f0f52240ebbe489.yaml
Normal file
5
releasenotes/notes/ipmitool-vendor-3f0f52240ebbe489.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``ipmi`` hardware type now supports ``ipmitool`` vendor interface
|
||||||
|
(similar to classic ipmitool drivers).
|
@ -141,6 +141,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
|
||||||
|
ipmitool = ironic.drivers.modules.ipmitool:VendorPassthru
|
||||||
no-vendor = ironic.drivers.modules.noop:NoVendor
|
no-vendor = ironic.drivers.modules.noop:NoVendor
|
||||||
|
|
||||||
ironic.hardware.types =
|
ironic.hardware.types =
|
||||||
|
Loading…
Reference in New Issue
Block a user