A fake (in-memory) hypervisor+api.
Allows nova testing w/o a hypervisor. This module also documents the
semantics of real hypervisor connections.
-
class nova.virt.fake.FakeConnection
Bases: nova.virt.driver.ComputeDriver
Fake hypervisor driver
-
agent_update(instance, url, md5hash)
-
attach_volume(instance_name, device_path, mountpoint)
-
block_stats(instance_name, disk_id)
-
compare_cpu(xml)
This method is supported only by libvirt.
-
destroy(instance, network_info, cleanup=True)
-
detach_volume(instance_name, mountpoint)
-
ensure_filtering_rules_for_instance(instance_ref, network_info)
This method is supported only by libvirt.
-
get_ajax_console(instance)
-
get_console_output(instance)
-
get_console_pool_info(console_type)
-
get_diagnostics(instance_name)
-
get_host_ip_addr()
-
get_host_stats(refresh=False)
Return fake Host Status of ram, disk, network.
-
get_info(instance_name)
-
get_vnc_console(instance)
-
host_power_action(host, action)
Reboots, shuts down or powers up the host.
-
init_host(host)
-
inject_file(instance, b64_path, b64_contents)
-
classmethod instance()
-
interface_stats(instance_name, iface_id)
-
list_disks(instance_name)
-
list_instances()
-
list_instances_detail()
-
list_interfaces(instance_name)
-
live_migration(context, instance_ref, dest, post_method, recover_method, block_migration=False)
This method is supported only by libvirt.
-
migrate_disk_and_power_off(instance, dest)
-
pause(instance, callback)
-
poll_rescued_instances(timeout)
-
reboot(instance, network_info)
-
refresh_provider_fw_rules()
-
refresh_security_group_members(security_group_id)
-
refresh_security_group_rules(security_group_id)
-
rescue(context, instance, callback, network_info)
-
resize(instance, flavor)
-
resume(instance, callback)
-
set_admin_password(instance, new_pass)
-
set_host_enabled(host, enabled)
Sets the specified host’s ability to accept new instances.
-
snapshot(context, instance, name)
-
spawn(context, instance, network_info=None, block_device_info=None)
-
suspend(instance, callback)
-
test_remove_vm(instance_name)
Removes the named VM, as if it crashed. For testing
-
unfilter_instance(instance_ref, network_info)
This method is supported only by libvirt.
-
unpause(instance, callback)
-
unrescue(instance, callback, network_info)
-
update_available_resource(ctxt, host)
This method is supported only by libvirt.
-
update_host_status()
Return fake Host Status of ram, disk, network.
-
class nova.virt.fake.FakeInstance(name, state)
Bases: object
-
nova.virt.fake.get_connection(_)