The ironic.drivers.modules.ilo.deploy Module

iLO Deploy Driver(s) and supporting methods.

class ironic.drivers.modules.ilo.deploy.IloConsoleInterface[source]

Bases: ironic.drivers.modules.ipmitool.IPMIShellinaboxConsole

A ConsoleInterface that uses ipmitool and shellinabox.

get_properties()[source]
validate(task)[source]

Validate the Node console info.

Parameters:task – a task from TaskManager.
Raises:InvalidParameterValue
Raises:MissingParameterValue when a required parameter is missing
class ironic.drivers.modules.ilo.deploy.IloPXEDeploy[source]

Bases: ironic.drivers.modules.iscsi_deploy.ISCSIDeploy

deploy(task)[source]

Start deployment of the task’s node.

This method sets the boot device to ‘NETWORK’ and then calls PXEDeploy’s deploy method to deploy on the given node.

Parameters:task – a TaskManager instance containing the node to act on.
Returns:deploy state DEPLOYWAIT.
prepare(task)[source]

Prepare the deployment environment for this task’s node.

If the node’s ‘capabilities’ property includes a boot_mode, that boot mode will be applied for the node. Otherwise, the existing boot mode of the node is used in the node’s ‘capabilities’ property.

PXEDeploys’ prepare method is then called, to prepare the deploy environment for the node

Parameters:task – a TaskManager instance containing the node to act on.
Raises:IloOperationError, if some operation on iLO failed.
Raises:InvalidParameterValue, if some information is invalid.
tear_down(*args, **kwargs)[source]

Tear down a previous deployment on the task’s node.

Parameters:task – a TaskManager instance.
Returns:states.DELETED
class ironic.drivers.modules.ilo.deploy.IloPXEVendorPassthru[source]

Bases: ironic.drivers.modules.iscsi_deploy.VendorPassthru

continue_deploy(*args, **kwargs)[source]

Method invoked when deployed with the IPA ramdisk.

This method is invoked during a heartbeat from an agent when the node is in wait-call-back state. This deploys the image on the node and then configures the node to boot according to the desired boot option (netboot or localboot).

Parameters:
  • task – a TaskManager object containing the node.
  • kwargs – the kwargs passed from the heartbeat method.
Raises:

InstanceDeployFailure, if it encounters some error during the deploy.

Raises:

IloOperationError, if some operation on iLO failed.

pass_deploy_info(*args, **kwargs)[source]
class ironic.drivers.modules.ilo.deploy.IloVirtualMediaAgentDeploy[source]

Bases: ironic.drivers.base.DeployInterface

Interface for deploy-related actions.

clean_up(task)[source]

Clean up the deployment environment for this node.

Ejects the attached virtual media from the iLO and also removes the floppy image from Swift, if it exists.

Parameters:task – a TaskManager instance.
deploy(*args, **kwargs)[source]

Perform a deployment to a node.

Prepares the options for the agent ramdisk and sets the node to boot from virtual media cdrom.

Parameters:task – a TaskManager instance.
Returns:states.DEPLOYWAIT
Raises:ImageCreationFailed, if it failed while creating the floppy image.
Raises:IloOperationError, if some operation on iLO fails.
execute_clean_step(task, step)[source]

Execute a clean step asynchronously on the agent.

Parameters:
  • task – a TaskManager object containing the node
  • step – a clean step dictionary to execute
Returns:

states.CLEANWAIT to signify the step will be completed async

get_clean_steps(task)[source]

Get the list of clean steps from the agent.

Parameters:task – a TaskManager object containing the node
Returns:A list of clean step dictionaries
get_properties()[source]

Return the properties of the interface.

Returns:dictionary of <property name>:<property description> entries.
prepare(task)[source]

Prepare the deployment environment for this node.

Parameters:task – a TaskManager instance.
prepare_cleaning(task)[source]

Boot into the agent to prepare for cleaning.

take_over(task)[source]

Take over management of this node from a dead conductor.

Parameters:task – a TaskManager instance.
tear_down(*args, **kwargs)[source]

Tear down a previous deployment on the task’s node.

Parameters:task – a TaskManager instance.
Returns:states.DELETED
tear_down_cleaning(task)[source]

Clean up the PXE and DHCP files after cleaning.

validate(task)[source]

Validate the driver-specific Node deployment info.

Parameters:task – a TaskManager instance
Raises:MissingParameterValue if some parameters are missing.
class ironic.drivers.modules.ilo.deploy.IloVirtualMediaAgentVendorInterface[source]

Bases: ironic.drivers.modules.agent.AgentVendorInterface

Interface for vendor passthru related actions.

continue_deploy(*args, **kwargs)[source]
reboot_to_instance(task, **kwargs)[source]
class ironic.drivers.modules.ilo.deploy.IloVirtualMediaIscsiDeploy[source]

Bases: ironic.drivers.base.DeployInterface

clean_up(task)[source]

Clean up the deployment environment for the task’s node.

Unlinks instance image and triggers image cache cleanup.

Parameters:task – a TaskManager instance containing the node to act on.
deploy(*args, **kwargs)[source]

Start deployment of the task’s node.

Fetches the instance image, prepares the options for the deployment ramdisk, sets the node to boot from virtual media cdrom, and reboots the given node.

Parameters:task – a TaskManager instance containing the node to act on.
Returns:deploy state DEPLOYWAIT.
Raises:InstanceDeployFailure, if image size if greater than root partition.
Raises:ImageCreationFailed, if it failed while creating the floppy image.
Raises:IloOperationError, if some operation on iLO fails.
get_properties()[source]
prepare(task)[source]

Prepare the deployment environment for this task’s node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:IloOperationError, if some operation on iLO failed.
take_over(task)[source]

Enables boot up of an ACTIVE node.

It ensures that the ACTIVE node can be booted up successfully when node is taken over by another conductor.

Param:task: a TaskManager instance containing the node to act on.
tear_down(*args, **kwargs)[source]

Tear down a previous deployment on the task’s node.

Power off the node. All actual clean-up is done in the clean_up() method which should be called separately.

Parameters:task – a TaskManager instance containing the node to act on.
Returns:deploy state DELETED.
validate(task)[source]

Validate the deployment information for the task’s node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:InvalidParameterValue, if some information is invalid.
Raises:MissingParameterValue if ‘kernel_id’ and ‘ramdisk_id’ are missing in the Glance image or ‘kernel’ and ‘ramdisk’ not provided in instance_info for non-Glance image.
class ironic.drivers.modules.ilo.deploy.VendorPassthru[source]

Bases: ironic.drivers.modules.agent_base_vendor.BaseAgentVendor

Vendor-specific interfaces for iLO deploy drivers.

boot_into_iso(*args, **kwargs)[source]

Attaches an ISO image in glance and reboots bare metal.

This method accepts an ISO image href (a Glance UUID or an HTTP(S) URL) attaches it as virtual media and then reboots the node. This is useful for debugging purposes. This can be invoked only when the node is in manage state.

Parameters:
  • task – A TaskManager object.
  • kwargs

    The arguments sent with vendor passthru. The expected kwargs are:

    'boot_iso_href': href of the image to be booted. This can be
        a Glance UUID or an HTTP(S) URL.
    
continue_deploy(*args, **kwargs)[source]

Method invoked when deployed with the IPA ramdisk.

This method is invoked during a heartbeat from an agent when the node is in wait-call-back state. This deploys the image on the node and then configures the node to boot according to the desired boot option (netboot or localboot).

Parameters:
  • task – a TaskManager object containing the node.
  • kwargs – the kwargs passed from the heartbeat method.
Raises:

InstanceDeployFailure, if it encounters some error during the deploy.

get_properties()[source]
pass_bootloader_install_info(*args, **kwargs)[source]

Accepts the results of bootloader installation.

This method acts as a vendor passthru and accepts the result of bootloader installation. If the bootloader installation was successful, then it notifies the baremetal to proceed to reboot and makes the instance active. If bootloader installation failed, then it sets provisioning as failed and powers off the node.

Parameters:
  • task – A TaskManager object.
  • kwargs

    The arguments sent with vendor passthru. The expected kwargs are:

    'key': The deploy key for authorization
    'status': 'SUCCEEDED' or 'FAILED'
    'error': The error message if status == 'FAILED'
    'address': The IP address of the ramdisk
    
pass_deploy_info(*args, **kwargs)[source]

Continues the iSCSI deployment from where ramdisk left off.

This method continues the iSCSI deployment from the conductor node and writes the deploy image to the bare metal’s disk. After that, it does the following depending on boot_option for deploy:

  • If the boot_option requested for this deploy is ‘local’, then it sets the node to boot from disk (ramdisk installs the boot loader present within the image to the bare metal’s disk).
  • If the boot_option requested is ‘netboot’ or no boot_option is requested, it finds/creates the boot ISO to boot the instance image, attaches the boot ISO to the bare metal and then sets the node to boot from CDROM.
Parameters:
  • task – a TaskManager instance containing the node to act on.
  • kwargs – kwargs containing parameters for iSCSI deployment.
Raises:

InvalidState

validate(task, method, **kwargs)[source]

Validate vendor-specific actions.

Checks if a valid vendor passthru method was passed and validates the parameters for the vendor passthru method.

Parameters:
  • task – a TaskManager instance containing the node to act on.
  • method – method to be validated.
  • kwargs – kwargs containing the vendor passthru method’s parameters.
Raises:

MissingParameterValue, if some required parameters were not passed.

Raises:

InvalidParameterValue, if any of the parameters have invalid value.

This Page