The ironic.drivers.modules.agent_base_vendor
Module¶
-
class
ironic.drivers.modules.agent_base_vendor.
AgentDeployMixin
[source]¶ Bases:
object
Mixin with deploy methods.
-
configure_local_boot
(*args, **kwargs)[source]¶ Helper method to configure local boot on the node.
This method triggers bootloader installation on the node. On successful installation of bootloader, this method sets the node to boot from disk.
Parameters: - task – a TaskManager object containing the node
- root_uuid – The UUID of the root partition. This is used for identifying the partition which contains the image deployed or None in case of whole disk images which we expect to already have a bootloader installed.
- efi_system_part_uuid – The UUID of the efi system partition. This is used only in uefi boot mode.
Raises: InstanceDeployFailure if bootloader installation failed or on encountering error while setting the boot device on the node.
-
continue_cleaning
(*args, **kwargs)[source]¶ Start the next cleaning step if the previous one is complete.
In order to avoid errors and make agent upgrades painless, the agent compares the version of all hardware managers at the start of the cleaning (the agent’s get_clean_steps() call) and before executing each clean step. If the version has changed between steps, the agent is unable to tell if an ordering change will cause a cleaning issue so it returns CLEAN_VERSION_MISMATCH. For automated cleaning, we restart the entire cleaning cycle. For manual cleaning, we don’t.
Additionally, if a clean_step includes the reboot_requested property set to True, this method will coordinate the reboot once the step is completed.
-
continue_deploy
(task)[source]¶ Continues the deployment of baremetal node.
This method continues the deployment of the baremetal node after the ramdisk have been booted.
Parameters: task – a TaskManager instance
-
deploy_has_started
(task)[source]¶ Check if the deployment has started already.
Returns: True if the deploy has started, False otherwise.
-
deploy_is_done
(task)[source]¶ Check if the deployment is already completed.
Returns: True if the deployment is completed. False otherwise
-
heartbeat
(*args, **kwargs)[source]¶ Process a heartbeat.
Parameters: - task – task to work with.
- callback_url – agent HTTP API URL.
-
prepare_instance_to_boot
(*args, **kwargs)[source]¶ Prepares instance to boot.
Parameters: - task – a TaskManager object containing the node
- root_uuid – the UUID for root partition
- efi_sys_uuid – the UUID for the efi partition
Raises: InvalidState if fails to prepare instance
-
reboot_and_finish_deploy
(*args, **kwargs)[source]¶ Helper method to trigger reboot on the node and finish deploy.
This method initiates a reboot on the node. On success, it marks the deploy as complete. On failure, it logs the error and marks deploy as failure.
Parameters: task – a TaskManager object containing the node Raises: InstanceDeployFailure, if node reboot failed.
-