The ironic.drivers.modules.iscsi_deploy Module

class ironic.drivers.modules.iscsi_deploy.AgentDeployMixin[source]

Bases: ironic.drivers.modules.agent_base_vendor.AgentDeployMixin

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

Method invoked when deployed using iSCSI.

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.

class ironic.drivers.modules.iscsi_deploy.ISCSIDeploy[source]

Bases: ironic.drivers.modules.iscsi_deploy.AgentDeployMixin, ironic.drivers.base.DeployInterface

iSCSI Deploy Interface for deploy-related actions.

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

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

Unlinks TFTP and instance images and triggers image cache cleanup. Removes the TFTP configuration files for this node.

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

Start deployment of the task’s node.

Fetches instance image, updates the DHCP port options for next boot, and issues a reboot request to the power driver. This causes the node to boot into the deployment ramdisk and triggers the next phase of PXE-based deployment via agent heartbeats.

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

Execute a clean step asynchronously on the agent.

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

NodeCleaningFailure if the agent does not return a command status

Returns:

states.CLEANWAIT to signify the step will be completed asynchronously.

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

Get the list of clean steps from the agent.

Parameters:task – a TaskManager object containing the node
Raises NodeCleaningFailure:
 if the clean steps are not yet available (cached), for example, when a node has just been enrolled and has not been cleaned yet.
Returns:A list of clean step dictionaries.
get_properties()[source]
prepare(*args, **kwargs)[source]

Prepare the deployment environment for this task’s node.

Generates the TFTP configuration for PXE-booting both the deployment and user images, fetches the TFTP image from Glance and add it to the local cache.

Parameters:task – a TaskManager instance containing the node to act on.
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:other exceptions by the node’s power driver if something wrong occurred during the power action.
Raises:any boot interface’s prepare_ramdisk exceptions.
prepare_cleaning(*args, **kwargs)[source]

Boot into the agent to prepare for cleaning.

Parameters:task – a TaskManager object containing the node
Raises NodeCleaningFailure:
 if the previous cleaning ports cannot be removed or if new cleaning ports cannot be created
Returns:states.CLEANWAIT to signify an asynchronous prepare.
take_over(task)[source]
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.
Raises:NetworkError if the cleaning ports cannot be removed.
Raises:InvalidParameterValue when the wrong state is specified or the wrong driver info is specified.
Raises:other exceptions by the node’s power driver if something wrong occurred during the power action.
tear_down_cleaning(*args, **kwargs)[source]

Clean up the PXE and DHCP files after cleaning.

Parameters:task – a TaskManager object containing the node
Raises NodeCleaningFailure:
 if the cleaning ports cannot be removed
validate(*args, **kwargs)[source]

Validate the deployment information for the task’s node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:InvalidParameterValue.
Raises:MissingParameterValue
class ironic.drivers.modules.iscsi_deploy.InstanceImageCache[source]

Bases: ironic.drivers.modules.image_cache.ImageCache

class ironic.drivers.modules.iscsi_deploy.VendorPassthru[source]

Bases: ironic.drivers.modules.iscsi_deploy.AgentDeployMixin, ironic.drivers.modules.agent_base_vendor.BaseAgentVendor

Interface to mix IPMI and PXE vendor-specific interfaces.

Contains old lookup and heartbeat endpoints currently pending deprecation.

WARNING: This class is deprecated and will be removed in the Ocata release. Drivers should stop relying on it.

Project Source

This Page