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=Trueis present and one of the following holds:boot_isois set in instance_info, orkernelandramdiskare set in instance_info, orimage_sourceis a Glance image withboot_iso_idproperty, orimage_sourceis a Glance image withkernel_idandramdisk_idproperties.
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)