The ironic.drivers.modules.virtualbox Module

VirtualBox Driver Modules

class ironic.drivers.modules.virtualbox.VirtualBoxManagement[source]

Bases: ironic.drivers.base.ManagementInterface

get_boot_device(task)[source]

Get the current boot device for a node.

Parameters:task – a task from TaskManager.
Returns:a dictionary containing: ‘boot_device’: one of the ironic.common.boot_devices or None ‘persistent’: True if boot device is persistent, False otherwise
Raises:MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.
Raises:InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info.
Raises:VirtualBoxOperationFailed, if error encountered from VirtualBox operation.
get_properties()[source]
get_sensors_data(task)[source]

Get sensors data.

Parameters:task – a TaskManager instance.
Raises:FailedToGetSensorData when getting the sensor data fails.
Raises:FailedToParseSensorData when parsing sensor data fails.
Returns:returns a consistent format dict of sensor data grouped by sensor type, which can be processed by Ceilometer.
get_supported_boot_devices(task)[source]

Get a list of the supported boot devices.

Parameters:task – a task from TaskManager.
Returns:A list with the supported boot devices defined in ironic.common.boot_devices.
set_boot_device(*args, **kwargs)[source]

Set the boot device for a node.

Parameters:
  • task – a task from TaskManager.
  • device – ironic.common.boot_devices
  • persistent – This argument is ignored as VirtualBox support only persistent boot devices.
Raises:

MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.

Raises:

InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info.

Raises:

VirtualBoxOperationFailed, if error encountered from VirtualBox operation.

validate(task)[source]

Check that ‘driver_info’ contains required credentials.

Validates whether the ‘driver_info’ property of the supplied task’s node contains the required credentials information.

Parameters:task – a task from TaskManager.
Raises:MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.
Raises:InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info.
class ironic.drivers.modules.virtualbox.VirtualBoxPower[source]

Bases: ironic.drivers.base.PowerInterface

get_power_state(task)[source]

Gets the current power state.

Parameters:task – a TaskManager instance.
Returns:one of ironic.common.states
Raises:MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.
Raises:InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info.
Raises:VirtualBoxOperationFailed, if error encountered from VirtualBox operation.
get_properties()[source]
reboot(*args, **kwargs)[source]

Reboot the node.

Parameters:task – a TaskManager instance.
Raises:MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.
Raises:InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info.
Raises:VirtualBoxOperationFailed, if error encountered from VirtualBox operation.
set_power_state(*args, **kwargs)[source]

Turn the current power state on or off.

Parameters:
  • task – a TaskManager instance.
  • target_state – The desired power state POWER_ON,POWER_OFF or REBOOT from ironic.common.states.
Raises:

MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.

Raises:

InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info OR if an invalid power state was specified.

Raises:

VirtualBoxOperationFailed, if error encountered from VirtualBox operation.

validate(task)[source]

Check if node.driver_info contains the required credentials.

Parameters:task – a TaskManager instance.
Raises:MissingParameterValue, if some required parameter(s) are missing in the node’s driver_info.
Raises:InvalidParameterValue, if some parameter(s) have invalid value(s) in the node’s driver_info.

Project Source

This Page