Add agent_iboot entrypoint
This patch adds a new driver combination/entrypoint so that the Iboot power driver can be used with an IPA agent based deployment workflow. Change-Id: I677e60a333ec65cbd2852270fb091f17428e5e36 Closes-bug: #1514439
This commit is contained in:
parent
36db38d211
commit
030304d7c2
@ -12,15 +12,15 @@ management of nodes using Dataprobe iBoot devices over the DxP protocol.
|
|||||||
Drivers
|
Drivers
|
||||||
=======
|
=======
|
||||||
|
|
||||||
pxe_iboot
|
There are two iboot drivers:
|
||||||
^^^^^^^^^
|
|
||||||
|
|
||||||
Overview
|
* The ``pxe_iboot`` driver uses iBoot to control the power state of the
|
||||||
~~~~~~~~
|
node, PXE/iPXE technology for booting and the iSCSI methodology for
|
||||||
|
deploying the node.
|
||||||
|
|
||||||
The ``pxe_iboot`` driver uses iBoot to control the power state of the
|
* The ``agent_iboot`` driver uses iBoot to control the power state of the
|
||||||
node, PXE/iPXE technology for booting and the iSCSI methodology for
|
node, PXE/iPXE technology for booting and the Ironic Python Agent for
|
||||||
deploying the node.
|
deploying an image to the node.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
@ -35,12 +35,12 @@ Tested platforms
|
|||||||
Configuring and enabling the driver
|
Configuring and enabling the driver
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
1. Add ``pxe_iboot`` to the list of ``enabled_drivers`` in
|
1. Add ``pxe_iboot`` and/or ``agent_iboot`` to the list of ``enabled_drivers``
|
||||||
*/etc/ironic/ironic.conf*. For example::
|
in */etc/ironic/ironic.conf*. For example::
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
...
|
...
|
||||||
enabled_drivers = pxe_ipmitool,pxe_iboot
|
enabled_drivers = pxe_iboot,agent_iboot
|
||||||
|
|
||||||
2. Restart the Ironic conductor service::
|
2. Restart the Ironic conductor service::
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ Registering a node with the iBoot driver
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Nodes configured for the iBoot driver should have the ``driver`` property
|
Nodes configured for the iBoot driver should have the ``driver`` property
|
||||||
set to ``pxe_iboot``.
|
set to ``pxe_iboot`` or ``agent_iboot``.
|
||||||
|
|
||||||
The following configuration values are also required in ``driver_info``:
|
The following configuration values are also required in ``driver_info``:
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ from ironic.drivers.modules.amt import management as amt_management
|
|||||||
from ironic.drivers.modules.amt import power as amt_power
|
from ironic.drivers.modules.amt import power as amt_power
|
||||||
from ironic.drivers.modules.cimc import management as cimc_mgmt
|
from ironic.drivers.modules.cimc import management as cimc_mgmt
|
||||||
from ironic.drivers.modules.cimc import power as cimc_power
|
from ironic.drivers.modules.cimc import power as cimc_power
|
||||||
|
from ironic.drivers.modules import iboot
|
||||||
from ironic.drivers.modules import inspector
|
from ironic.drivers.modules import inspector
|
||||||
from ironic.drivers.modules import ipminative
|
from ironic.drivers.modules import ipminative
|
||||||
from ironic.drivers.modules import ipmitool
|
from ironic.drivers.modules import ipmitool
|
||||||
@ -229,3 +230,24 @@ class AgentAndWakeOnLanDriver(base.BaseDriver):
|
|||||||
self.boot = pxe.PXEBoot()
|
self.boot = pxe.PXEBoot()
|
||||||
self.deploy = agent.AgentDeploy()
|
self.deploy = agent.AgentDeploy()
|
||||||
self.vendor = agent.AgentVendorInterface()
|
self.vendor = agent.AgentVendorInterface()
|
||||||
|
|
||||||
|
|
||||||
|
class AgentAndIBootDriver(base.BaseDriver):
|
||||||
|
"""Agent + IBoot PDU driver.
|
||||||
|
|
||||||
|
This driver implements the `core` functionality, combining
|
||||||
|
:class:`ironic.drivers.modules.iboot.IBootPower` for power
|
||||||
|
on/off and reboot with
|
||||||
|
:class:'ironic.driver.modules.agent.AgentDeploy' (for image deployment.)
|
||||||
|
Implementations are in those respective classes;
|
||||||
|
this class is merely the glue between them.
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
if not importutils.try_import('iboot'):
|
||||||
|
raise exception.DriverLoadError(
|
||||||
|
driver=self.__class__.__name__,
|
||||||
|
reason=_("Unable to import iboot library"))
|
||||||
|
self.power = iboot.IBootPower()
|
||||||
|
self.boot = pxe.PXEBoot()
|
||||||
|
self.deploy = agent.AgentDeploy()
|
||||||
|
self.vendor = agent.AgentVendorInterface()
|
||||||
|
@ -24,6 +24,7 @@ from ironic.drivers import agent
|
|||||||
from ironic.drivers.modules import agent as agent_module
|
from ironic.drivers.modules import agent as agent_module
|
||||||
from ironic.drivers.modules.amt import management as amt_management
|
from ironic.drivers.modules.amt import management as amt_management
|
||||||
from ironic.drivers.modules.amt import power as amt_power
|
from ironic.drivers.modules.amt import power as amt_power
|
||||||
|
from ironic.drivers.modules import iboot
|
||||||
from ironic.drivers.modules import pxe
|
from ironic.drivers.modules import pxe
|
||||||
from ironic.drivers.modules import wol
|
from ironic.drivers.modules import wol
|
||||||
|
|
||||||
@ -59,3 +60,14 @@ class AgentAndWakeOnLanDriverTestCase(testtools.TestCase):
|
|||||||
self.assertIsInstance(driver.boot, pxe.PXEBoot)
|
self.assertIsInstance(driver.boot, pxe.PXEBoot)
|
||||||
self.assertIsInstance(driver.deploy, agent_module.AgentDeploy)
|
self.assertIsInstance(driver.deploy, agent_module.AgentDeploy)
|
||||||
self.assertIsInstance(driver.vendor, agent_module.AgentVendorInterface)
|
self.assertIsInstance(driver.vendor, agent_module.AgentVendorInterface)
|
||||||
|
|
||||||
|
|
||||||
|
class AgentAndIBootDriverTestCase(testtools.TestCase):
|
||||||
|
|
||||||
|
def test___init__(self):
|
||||||
|
driver = agent.AgentAndIBootDriver()
|
||||||
|
|
||||||
|
self.assertIsInstance(driver.power, iboot.IBootPower)
|
||||||
|
self.assertIsInstance(driver.boot, pxe.PXEBoot)
|
||||||
|
self.assertIsInstance(driver.deploy, agent_module.AgentDeploy)
|
||||||
|
self.assertIsInstance(driver.vendor, agent_module.AgentVendorInterface)
|
||||||
|
@ -33,6 +33,7 @@ ironic.dhcp =
|
|||||||
|
|
||||||
ironic.drivers =
|
ironic.drivers =
|
||||||
agent_amt = ironic.drivers.agent:AgentAndAMTDriver
|
agent_amt = ironic.drivers.agent:AgentAndAMTDriver
|
||||||
|
agent_iboot = ironic.drivers.agent:AgentAndIBootDriver
|
||||||
agent_ilo = ironic.drivers.ilo:IloVirtualMediaAgentDriver
|
agent_ilo = ironic.drivers.ilo:IloVirtualMediaAgentDriver
|
||||||
agent_ipmitool = ironic.drivers.agent:AgentAndIPMIToolDriver
|
agent_ipmitool = ironic.drivers.agent:AgentAndIPMIToolDriver
|
||||||
agent_irmc = ironic.drivers.irmc:IRMCVirtualMediaAgentDriver
|
agent_irmc = ironic.drivers.irmc:IRMCVirtualMediaAgentDriver
|
||||||
|
Loading…
Reference in New Issue
Block a user