The ironic.drivers.modules.seamicro Module

Ironic SeaMicro interfaces.

Provides basic power control of servers in SeaMicro chassis via python-seamicroclient.

Provides vendor passthru methods for SeaMicro specific functionality.

class ironic.drivers.modules.seamicro.Management[source]

Bases: ironic.drivers.base.ManagementInterface

get_boot_device(task)[source]

Get the current boot device for the task’s node.

Returns the current boot device of the node. Be aware that not all drivers support this.

Parameters:task – a task from TaskManager.
Returns:a dictionary containing:
boot_device:the boot device, one of ironic.common.boot_devices or None if it is unknown.
persistent:Whether the boot device will persist to all future boots or not, None if it is unknown.
get_properties()[source]
get_sensors_data(task)[source]

Get sensors data method.

Not implemented by this driver. :param task: a TaskManager instance.

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 the task’s node.

Set the boot device to use on next reboot of the node.

Parameters:
  • task – a task from TaskManager.
  • device – the boot device, one of ironic.common.boot_devices.
  • persistent – Boolean value. True if the boot device will persist to all future boots, False if not. Default: False. Ignored by this driver.
Raises:

InvalidParameterValue if an invalid boot device is specified or if a seamicro parameter is invalid.

Raises:

IronicException on an error from seamicro-client.

Raises:

MissingParameterValue when a required parameter is missing

validate(task)[source]

Check that ‘driver_info’ contains SeaMicro 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 when a required parameter is missing
class ironic.drivers.modules.seamicro.Power[source]

Bases: ironic.drivers.base.PowerInterface

SeaMicro Power Interface.

This PowerInterface class provides a mechanism for controlling the power state of servers in a seamicro chassis.

get_power_state(task)[source]

Get the current power state of the task’s node.

Poll the host for the current power state of the node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:ServiceUnavailable on an error from SeaMicro Client.
Raises:InvalidParameterValue if a seamicro parameter is invalid.
Raises:MissingParameterValue when a required parameter is missing
Returns:power state. One of ironic.common.states.
get_properties()[source]
reboot(*args, **kwargs)[source]

Cycles the power to the task’s node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:InvalidParameterValue if a seamicro parameter is invalid.
Raises:MissingParameterValue if required seamicro parameters are missing.
Raises:PowerStateFailure if the final state of the node is not POWER_ON.
set_power_state(*args, **kwargs)[source]

Turn the power on or off.

Set the power state of a node.

Parameters:
  • task – a TaskManager instance containing the node to act on.
  • pstate – Either POWER_ON or POWER_OFF from :class: ironic.common.states.
Raises:

InvalidParameterValue if an invalid power state was specified or a seamicro parameter is invalid.

Raises:

MissingParameterValue when a required parameter is missing

Raises:

PowerStateFailure if the desired power state couldn’t be set.

validate(task)[source]

Check that node ‘driver_info’ is valid.

Check that node ‘driver_info’ contains the required fields.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:MissingParameterValue if required seamicro parameters are missing.
class ironic.drivers.modules.seamicro.ShellinaboxConsole[source]

Bases: ironic.drivers.base.ConsoleInterface

A ConsoleInterface that uses telnet and shellinabox.

get_console(task)[source]

Get the type and connection information about the console.

Raises:MissingParameterValue if required seamicro parameters are missing
Raises:InvalidParameterValue if required parameter are invalid.
get_properties()[source]
start_console(task)[source]

Start a remote console for the node.

Parameters:task – a task from TaskManager
Raises:MissingParameterValue if required seamicro parameters are missing
Raises:ConsoleError if the directory for the PID file cannot be created
Raises:ConsoleSubprocessFailed when invoking the subprocess failed
Raises:InvalidParameterValue if required parameter are invalid.
stop_console(task)[source]

Stop the remote console session for the node.

Parameters:task – a task from TaskManager
Raises:ConsoleError if unable to stop the console
validate(task)[source]

Validate the Node console info.

Parameters:task – a task from TaskManager.
Raises:MissingParameterValue if required seamicro parameters are missing
Raises:InvalidParameterValue if required parameter are invalid.
class ironic.drivers.modules.seamicro.VendorPassthru[source]

Bases: ironic.drivers.base.VendorInterface

SeaMicro vendor-specific methods.

attach_volume(*args, **kwargs)[source]

Attach a volume to a node.

Attach volume from SeaMicro storage pools for ironic to node. If kwargs[‘volume_id’] not given, Create volume in SeaMicro storage pool and attach to node.

@kwargs volume_id: id of pre-provisioned volume that is to be attached
as root volume of node
@kwargs volume_size: size of new volume to be created and attached
as root volume of node
get_properties()[source]
set_node_vlan_id(*args, **kwargs)[source]

Sets an untagged vlan id for NIC 0 of node.

@kwargs vlan_id: id of untagged vlan for NIC 0 of node

validate(task, method, **kwargs)[source]

Project Source

This Page