ironic.drivers.modules.autodetect module¶
- class ironic.drivers.modules.autodetect.AutodetectDeploy(*args, **kwargs)[source]¶
Bases:
DeployInterfaceDeploy interface that auto-detects the appropriate deployment method.
- clean_up(task)[source]¶
Clean up the deployment environment for the task’s node.
- Parameters:
task – A TaskManager instance containing the node to act on.
- deploy(task)[source]¶
Perform a deployment to the task’s node.
This method should not be called directly as the autodetect interface is expected to switch to a concrete interface during switch_interface(). If this is called, it means the interface switch did not happen.
- Parameters:
task – A TaskManager instance containing the node to act on.
- Raises:
InstanceDeployFailure if deployment fails.
- get_properties()[source]¶
Return the properties of the interface.
- Returns:
dictionary of <property name>:<property description> entries.
- switch_interface(task)[source]¶
Switch the interface to use for deployment.
This calls supports_deploy() methods of deploy interfaces configured in the ‘autodetect_deploy_interfaces’ option, in order, to determine which interface is supported for the current node/image. The first interface that returns True from supports_deploy() is chosen. If no interfaces are detected as supported, the last interface in the list is chosen as the fallback.
- Raises:
InvalidParameterValue if the interface is not enabled.
- Parameters:
task – A TaskManager instance containing the node to act on.
- take_over(task)[source]¶
Take over management of this task’s node from a dead conductor.
- Parameters:
task – A TaskManager instance containing the node to act on.
- tear_down(task)[source]¶
Tear down a previous deployment on the task’s node.
- Parameters:
task – A TaskManager instance containing the node to act on.
- Returns:
deploy state DELETED.
- validate(task)[source]¶
Validate the driver-specific Node deployment info.
This method creates the deploy interface that would be switched to and calls its validate() method.
- Parameters:
task – A TaskManager instance containing the node to act on.
- Raises:
MissingParameterValue if required parameters are missing.