The ironic.drivers.modules.agent Module

class ironic.drivers.modules.agent.AgentDeploy[source]

Bases: ironic.drivers.base.DeployInterface

Interface for deploy-related actions.

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

Clean up the deployment environment for this node.

If preparation of the deployment environment ahead of time is possible, this method should be implemented by the driver. It should erase anything cached by the prepare method.

If implemented, this method must be idempotent. It may be called multiple times for the same node on the same conductor, and it may be called by multiple conductors in parallel. Therefore, it must not require an exclusive lock.

This method is called before tear_down.

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

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.
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
Raises:

NodeCleaningFailure if the agent does not return a command status

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
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]

Return the properties of the interface.

Returns:dictionary of <property name>:<property description> entries.
prepare(*args, **kwargs)[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.

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]

Take over management of this node from a dead conductor.

Since this deploy interface only does local boot, there’s no need for this conductor to do anything when it takes over management of this node.

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:status of the deploy. One of ironic.common.states.
tear_down_cleaning(task)[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(task)[source]

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.
class ironic.drivers.modules.agent.AgentRAID[source]

Bases: ironic.drivers.base.RAIDInterface

Implementation of RAIDInterface which uses agent ramdisk.

create_configuration(task, create_root_volume=True, create_nonroot_volumes=True)[source]

Create a RAID configuration on a bare metal using agent ramdisk.

This method creates a RAID configuration on the given node.

Parameters:
  • task – a TaskManager instance.
  • create_root_volume – If True, a root volume is created during RAID configuration. Otherwise, no root volume is created. Default is True.
  • create_nonroot_volumes – If True, non-root volumes are created. If False, no non-root volumes are created. Default is True.
Returns:

states.CLEANWAIT if operation was successfully invoked.

Raises:

MissingParameterValue, if node.target_raid_config is missing or was found to be empty after skipping root volume and/or non-root volumes.

delete_configuration(task)[source]

Deletes RAID configuration on the given node.

Parameters:task – a TaskManager instance.
Returns:states.CLEANWAIT if operation was successfully invoked
get_properties()[source]

Return the properties of the interface.

class ironic.drivers.modules.agent.AgentVendorInterface[source]

Bases: ironic.drivers.modules.agent_base_vendor.BaseAgentVendor

check_deploy_success(node)[source]
continue_deploy(*args, **kwargs)[source]
deploy_has_started(task)[source]
deploy_is_done(task)[source]
reboot_to_instance(task, **kwargs)[source]

Project Source

This Page