The nova.virt.xenapi.fake Module¶
A fake XenAPI SDK.
-
exception
Failure(details)¶ Bases:
exceptions.Exception
-
class
FakeXenAPI¶ Bases:
object
-
class
SessionBase(uri)¶ Bases:
objectBase class for Fake Sessions.
-
PBD_create(_1, pbd_rec)¶
-
PBD_plug(_1, pbd_ref)¶
-
PBD_unplug(_1, pbd_ref)¶
-
SR_forget(_1, sr_ref)¶
-
SR_introduce(_1, sr_uuid, label, desc, type, content_type, shared, sm_config)¶
-
SR_scan(_1, sr_ref)¶
-
VBD_add_to_other_config(_1, vbd_ref, key, value)¶
-
VBD_get_other_config(_1, vbd_ref)¶
-
VBD_insert(_1, vbd_ref, vdi_ref)¶
-
VBD_plug(_1, ref)¶
-
VBD_unplug(_1, ref)¶
-
VDI_add_to_other_config(_1, vdi_ref, key, value)¶
-
VDI_clone(_1, vdi_to_clone_ref)¶
-
VDI_copy(_1, vdi_to_copy_ref, sr_ref)¶
-
VDI_get_virtual_size(*args)¶
-
VDI_remove_from_other_config(_1, vdi_ref, key)¶
-
VDI_resize(*args)¶
-
VDI_resize_online(*args)¶
-
VM_add_to_xenstore_data(_1, vm_ref, key, value)¶
-
VM_assert_can_migrate(session, vmref, migrate_data, live, vdi_map, vif_map, options)¶
-
VM_clean_reboot(session, vm_ref)¶
-
VM_clean_shutdown(session, vm_ref)¶
-
VM_get_xenstore_data(_1, vm_ref)¶
-
VM_hard_reboot(session, vm_ref)¶
-
VM_hard_shutdown(session, vm_ref)¶
-
VM_migrate_send(session, mref, migrate_data, live, vdi_map, vif_map, options)¶
-
VM_pause(session, vm_ref)¶
-
VM_pool_migrate(_1, vm_ref, host_ref, options)¶
-
VM_remove_from_blocked_operations(session, vm_ref, key)¶
-
VM_remove_from_xenstore_data(_1, vm_ref, key)¶
-
VM_suspend(session, vm_ref)¶
-
host_call_plugin(_1, _2, plugin, method, args)¶
-
host_compute_free_memory(_1, ref)¶
-
host_migrate_receive(session, destref, nwref, options)¶
-
pool_eject(session, host_ref)¶
-
pool_get_default_SR(_1, pool_ref)¶
-
pool_join(session, hostname, username, password)¶
-
pool_set_name_label(session, pool_ref, name)¶
-
xenapi_request(methodname, params)¶
-
-
after_VBD_create(vbd_ref, vbd_rec)¶ Create read-only fields and backref from VM and VDI to VBD when VBD is created.
-
after_VDI_create(vdi_ref, vdi_rec)¶
-
after_VIF_create(vif_ref, vif_rec)¶ Create backref from VM to VIF when VIF is created.
-
after_VM_create(vm_ref, vm_rec)¶ Create read-only fields in the VM record.
-
as_json(*args, **kwargs)¶ Helper function for simulating XenAPI plugin responses for those that are returning JSON. If this function is given plain arguments, then these are rendered as a JSON list. If it’s given keyword arguments then these are rendered as a JSON dict.
-
as_value(s)¶ Helper function for simulating XenAPI plugin responses. It escapes and wraps the given argument.
-
check_for_session_leaks()¶
-
create_host(name_label, hostname='fake_name', address='fake_addr')¶
-
create_network(name_label, bridge)¶
-
create_pbd(host_ref, sr_ref, attached)¶
-
create_sr(**kwargs)¶
-
create_task(name_label)¶
-
create_vbd(vm_ref, vdi_ref, userdevice=0, other_config=None)¶
-
create_vdi(name_label, sr_ref, **kwargs)¶
-
create_vm(name_label, status, **kwargs)¶
-
destroy_vbd(vbd_ref)¶
-
destroy_vdi(vdi_ref)¶
-
destroy_vm(vm_ref)¶
-
get_all(table)¶
-
get_all_records(table)¶
-
get_all_records_where(table_name, query)¶
-
get_record(table, ref)¶
-
reset()¶
-
reset_table(table)¶