The ironic.drivers.modules.fake Module

Fake driver interfaces used in testing.

This is also an example of some kinds of things which can be done within drivers. For instance, the MultipleVendorInterface class demonstrates how to load more than one interface and wrap them in some logic to route incoming vendor_passthru requests appropriately. This can be useful eg. when mixing functionality between a power interface and a deploy interface, when both rely on separate vendor_passthru methods.

class ironic.drivers.modules.fake.FakeBoot[source]

Bases: ironic.drivers.base.BootInterface

Example implementation of a simple boot interface.

clean_up_instance(task)[source]
clean_up_ramdisk(task)[source]
get_properties()[source]
prepare_instance(task)[source]
prepare_ramdisk(task, ramdisk_params)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakeConsole[source]

Bases: ironic.drivers.base.ConsoleInterface

Example implementation of a simple console interface.

get_console(task)[source]
get_properties()[source]
start_console(task)[source]
stop_console(task)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakeDeploy[source]

Bases: ironic.drivers.base.DeployInterface

Class for a fake deployment driver.

Example imlementation of a deploy interface that uses a separate power interface.

clean_up(task)[source]
deploy(task)[source]
get_properties()[source]
prepare(task)[source]
take_over(task)[source]
tear_down(task)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakeInspect[source]

Bases: ironic.drivers.base.InspectInterface

Example implementation of a simple inspect interface.

get_properties()[source]
inspect_hardware(task)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakeManagement[source]

Bases: ironic.drivers.base.ManagementInterface

Example implementation of a simple management interface.

get_boot_device(task)[source]
get_properties()[source]
get_sensors_data(task)[source]
get_supported_boot_devices(task)[source]
set_boot_device(task, device, persistent=False)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakePower[source]

Bases: ironic.drivers.base.PowerInterface

Example implementation of a simple power interface.

get_power_state(task)[source]
get_properties()[source]
reboot(task, timeout=None)[source]
set_power_state(task, power_state, timeout=None)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakeRAID[source]

Bases: ironic.drivers.base.RAIDInterface

Example implementation of simple RAIDInterface.

create_configuration(task, create_root_volume=True, create_nonroot_volumes=True)[source]
delete_configuration(task)[source]
get_properties()[source]
class ironic.drivers.modules.fake.FakeSoftPower[source]

Bases: ironic.drivers.modules.fake.FakePower

Example implementation of a simple soft power operations.

get_supported_power_states(task)[source]
set_power_state(task, power_state, timeout=None)[source]
class ironic.drivers.modules.fake.FakeStorage[source]

Bases: ironic.drivers.base.StorageInterface

Example implementation of simple storage Interface.

attach_volumes(task)[source]
detach_volumes(task)[source]
get_properties()[source]
should_write_image(task)[source]
validate(task)[source]
class ironic.drivers.modules.fake.FakeVendorA[source]

Bases: ironic.drivers.base.VendorInterface

Example implementation of a vendor passthru interface.

first_method(*args, **kwargs)[source]
get_properties()[source]
validate(task, method, **kwargs)[source]
class ironic.drivers.modules.fake.FakeVendorB[source]

Bases: ironic.drivers.base.VendorInterface

Example implementation of a secondary vendor passthru.

fourth_method_shared_lock(*args, **kwargs)[source]
get_properties()[source]
second_method(*args, **kwargs)[source]
third_method_sync(*args, **kwargs)[source]
validate(task, method, **kwargs)[source]