ironic.drivers.modules.agent.
AgentDeploy
[source]¶Bases: ironic.drivers.modules.agent.AgentDeployMixin
, ironic.drivers.base.DeployInterface
Interface for deploy-related actions.
clean_up
(**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
(**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
(**kwargs)[source]¶Execute a clean step asynchronously on the agent.
Parameters: |
|
---|---|
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
(**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]¶Return the properties of the interface.
Returns: | dictionary of <property name>:<property description> entries. |
---|
prepare
(**kwargs)[source]¶Prepare the deployment environment for this node.
Parameters: | task – a TaskManager instance. |
---|---|
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: | StorageError If the storage driver is unable to attach the configured volumes. |
Raises: | other exceptions by the node’s power driver if something wrong occurred during the power action. |
Raises: | exception.ImageRefValidationFailed if image_source is not Glance href and is not HTTP(S) URL. |
Raises: | exception.InvalidParameterValue if network validation fails. |
Raises: | any boot interface’s prepare_ramdisk exceptions. |
prepare_cleaning
(**kwargs)[source]¶Boot into the agent to prepare for cleaning.
Parameters: | task – a TaskManager object containing the node |
---|---|
Raises: | NodeCleaningFailure, NetworkError if the previous cleaning ports cannot be removed or if new cleaning ports cannot be created. |
Raises: | InvalidParameterValue if cleaning network UUID config option has an invalid value. |
Returns: | states.CLEANWAIT to signify an asynchronous prepare |
take_over
(task)[source]¶Take over management of this node from a dead conductor.
Parameters: | task – a TaskManager instance. |
---|
tear_down
(**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. |
Raises: | NetworkError if the cleaning ports cannot be removed. |
Raises: | InvalidParameterValue when the wrong power state is specified or the wrong driver info is specified for power management. |
Raises: | StorageError when the storage interface attached volumes fail to detach. |
Raises: | other exceptions by the node’s power driver if something wrong occurred during the power action. |
tear_down_cleaning
(**kwargs)[source]¶Clean up the PXE and DHCP files after cleaning.
Parameters: | task – a TaskManager object containing the node |
---|---|
Raises: | NodeCleaningFailure, NetworkError if the cleaning ports cannot be removed |
validate
(**kwargs)[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. |
ironic.drivers.modules.agent.
AgentDeployMixin
[source]¶Bases: ironic.drivers.modules.agent_base_vendor.AgentDeployMixin
continue_deploy
(**kwargs)[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
(**kwargs)[source]¶Check if the deployment has started already.
Returns: | True if the deploy has started, False otherwise. |
---|
ironic.drivers.modules.agent.
AgentRAID
[source]¶Bases: ironic.drivers.base.RAIDInterface
Implementation of RAIDInterface which uses agent ramdisk.
create_configuration
(**kwargs)[source]¶Create a RAID configuration on a bare metal using agent ramdisk.
This method creates a RAID configuration on the given node.
Parameters: |
|
---|---|
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. |
ironic.drivers.modules.agent.
AgentRescue
[source]¶Bases: ironic.drivers.base.RescueInterface
Implementation of RescueInterface which uses agent ramdisk.
clean_up
(**kwargs)[source]¶Clean up after RESCUEWAIT timeout/failure or finishing rescue.
Rescue password should be removed from the node and ramdisk boot environment should be cleaned if Ironic is managing the ramdisk boot.
Parameters: | task – a TaskManager instance with the node. |
---|---|
Raises: | NetworkError if the rescue ports cannot be removed. |
rescue
(**kwargs)[source]¶Boot a rescue ramdisk on the node.
Parameters: | task – a TaskManager instance. |
---|---|
Raises: | NetworkError if the tenant ports cannot be removed. |
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. |
Returns: | Returns states.RESCUEWAIT |
unrescue
(**kwargs)[source]¶Attempt to move a rescued node back to active state.
Parameters: | task – a TaskManager instance. |
---|---|
Raises: | NetworkError if the rescue ports cannot be removed. |
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_instance exceptions. |
Returns: | Returns states.ACTIVE |
validate
(**kwargs)[source]¶Validate that the node has required properties for agent rescue.
Parameters: | task – a TaskManager instance with the node being checked |
---|---|
Raises: | InvalidParameterValue if ‘instance_info/rescue_password’ has empty password or rescuing network UUID config option has an invalid value. |
Raises: | MissingParameterValue if node is missing one or more required parameters |
ironic.drivers.modules.agent.
check_image_size
(*args, **kwargs)[source]¶Check if the requested image is larger than the ram size.
Parameters: |
|
---|---|
Raises: | InvalidParameterValue if size of the image is greater than the available ram size. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.