ironic.drivers.modules.pxe module

ironic.drivers.modules.pxe module

PXE Boot Interface

service None

Bases: ironic.drivers.base.BootInterface

PXEBoot.clean_up_instance(task)

Cleans up the boot of instance.

This method cleans up the environment that was setup for booting the instance. It unlinks the instance kernel/ramdisk in node’s directory in tftproot and removes the PXE config.

Parameters:task – a task from TaskManager.
Returns:None
PXEBoot.clean_up_ramdisk(task)

Cleans up the boot of ironic ramdisk.

This method cleans up the PXE environment that was setup for booting the deploy or rescue ramdisk. It unlinks the deploy/rescue kernel/ramdisk in the node’s directory in tftproot and removes it’s PXE config.

Parameters:
  • task – a task from TaskManager.
  • mode – Label indicating a deploy or rescue operation was carried out on the node. Supported values are ‘deploy’ and ‘rescue’. Defaults to ‘deploy’, indicating deploy operation was carried out.
Returns:

None

PXEBoot.get_properties()

Return the properties of the interface.

Returns:dictionary of <property name>:<property description> entries.
PXEBoot.prepare_instance(task)

Prepares the boot of instance.

This method prepares the boot of the instance after reading relevant information from the node’s instance_info. In case of netboot, it updates the dhcp entries and switches the PXE config. In case of localboot, it cleans up the PXE config.

Parameters:task – a task from TaskManager.
Returns:None
PXEBoot.prepare_ramdisk(task, ramdisk_params)

Prepares the boot of Ironic ramdisk using PXE.

This method prepares the boot of the deploy or rescue kernel/ramdisk after reading relevant information from the node’s driver_info and instance_info.

Parameters:
  • task – a task from TaskManager.
  • ramdisk_params – the parameters to be passed to the ramdisk. pxe driver passes these parameters as kernel command-line arguments.
  • mode – Label indicating a deploy or rescue operation being carried out on the node. Supported values are ‘deploy’ and ‘rescue’. Defaults to ‘deploy’, indicating deploy operation is being carried out.
Returns:

None

Raises:

MissingParameterValue, if some information is missing in node’s driver_info or instance_info.

Raises:

InvalidParameterValue, if some information provided is invalid.

Raises:

IronicException, if some power or set boot boot device operation failed on the node.

PXEBoot.validate(task)

Validate the PXE-specific info for booting deploy/instance images.

This method validates the PXE-specific info for booting the ramdisk and instance on the node. If invalid, raises an exception; otherwise returns None.

Parameters:task – a task from TaskManager.
Returns:None
Raises:InvalidParameterValue, if some parameters are invalid.
Raises:MissingParameterValue, if some required parameters are missing.
PXEBoot.validate_rescue(task)

Validate that the node has required properties for rescue.

Parameters:task – a TaskManager instance with the node being checked
Raises:MissingParameterValue if node is missing one or more required parameters
service None

Bases: ironic.drivers.modules.agent.AgentDeploy

PXERamdiskDeploy.deploy(task)

Perform a deployment to a node.

Perform the necessary work to deploy an image onto the specified node. This method will be called after prepare(), which may have already performed any preparatory steps, such as pre-caching some data for the node.

Parameters:task – a TaskManager instance.
Returns:status of the deploy. One of ironic.common.states.
PXERamdiskDeploy.prepare(task)

Prepare the deployment environment for this node.

Parameters:task – a TaskManager instance.
Raises:NetworkError: if the previous cleaning ports cannot be removed or if new cleaning ports cannot be created.
Raises:InvalidParameterValue when the wrong power state is specified or the wrong driver info is specified for power management.
Raises:StorageError If the storage driver is unable to attach the configured volumes.
Raises:other exceptions by the node’s power driver if something wrong occurred during the power action.
Raises:exception.ImageRefValidationFailed if image_source is not Glance href and is not HTTP(S) URL.
Raises:exception.InvalidParameterValue if network validation fails.
Raises:any boot interface’s prepare_ramdisk exceptions.
PXERamdiskDeploy.validate(task)

Validate the driver-specific Node deployment info.

This method validates whether the properties of the supplied node contain the required information for this driver to deploy images to the node.

Parameters:task – a TaskManager instance
Raises:MissingParameterValue, if any of the required parameters are missing.
Raises:InvalidParameterValue, if any of the parameters have invalid value.
service None

Bases: ironic.drivers.modules.image_cache.ImageCache

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.