ironic.drivers.modules.ramdisk module

Ramdisk Deploy Interface

class ironic.drivers.modules.ramdisk.RamdiskDeploy(*args, **kwargs)[source]

Bases: AgentBaseMixin, HeartbeatMixin, DeployInterface

deploy(task)[source]

Perform a deployment to the task’s 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 containing the node to act on.

Returns:

status of the deploy. One of ironic.common.states.

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 the task’s node.

If preparation of the deployment environment ahead of time is possible, this method should be implemented by the driver.

If implemented, this method must be idempotent. It may be called multiple times for the same node on the same conductor.

This method is called before deploy.

Parameters:

task – A TaskManager instance containing the node to act on.

supports_deploy(task)[source]

Check if this interface supports the given deployment.

Ramdisk deploy is appropriate when ironic_ramdisk_deploy=True is present and one of the following holds:

  • boot_iso is set in instance_info, or

  • kernel and ramdisk are set in instance_info, or

  • image_source is a Glance image with boot_iso_id property, or

  • image_source is a Glance image with kernel_id and ramdisk_id properties.

For instance_info cases the sentinel is looked up in instance_info; for Glance image cases it is looked up in the image properties.

Parameters:

task – A TaskManager instance containing the node to act on.

Returns:

True if ramdisk deploy is appropriate.

validate(task)[source]

Validate the driver-specific Node deployment info.

This method validates whether the ‘driver_info’ and/or ‘instance_info’ properties of the task’s node contains the required information for this interface to function.

This method is often executed synchronously in API requests, so it should not conduct long-running checks.

Parameters:

task – A TaskManager instance containing the node to act on.

Raises:

InvalidParameterValue on malformed parameter(s)

Raises:

MissingParameterValue on missing parameter(s)