This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.tests.xenapi.stubs Module

Stubouts, mocks and fixtures for the test suite

class nova.tests.xenapi.stubs.FakeSessionForMigrationTests(uri)

Bases: nova.virt.xenapi.fake.SessionBase

Stubs out a XenAPISession for Migration tests

VDI_get_by_uuid(*args)
VDI_resize_online(*args)
VM_start(_1, ref, _2, _3)
class nova.tests.xenapi.stubs.FakeSessionForVMTests(uri)

Bases: nova.virt.xenapi.fake.SessionBase

Stubs out a XenAPISession for VM tests

SR_scan(session_ref, sr_ref)
VDI_destroy(session_ref, vdi_ref)
VDI_set_name_label(session_ref, vdi_ref, name_label)
VM_destroy(session_ref, vm_ref)
VM_snapshot(session_ref, vm_ref, label)
VM_start(_1, ref, _2, _3)
host_call_plugin(_1, _2, plugin, method, _5)
host_call_plugin_swap(_1, _2, plugin, method, _5)
class nova.tests.xenapi.stubs.FakeSessionForVolumeFailedTests(uri)

Bases: nova.tests.xenapi.stubs.FakeSessionForVolumeTests

Stubs out a XenAPISession for Volume tests: it injects failures

PBD_unplug(_1, ref)
SR_forget(_1, ref)
VDI_introduce(_1, uuid, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11)
class nova.tests.xenapi.stubs.FakeSessionForVolumeTests(uri)

Bases: nova.virt.xenapi.fake.SessionBase

Stubs out a XenAPISession for Volume tests

VDI_introduce(_1, uuid, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11)
nova.tests.xenapi.stubs.stub_out_get_target(stubs)

Stubs out _get_target in volume_utils

nova.tests.xenapi.stubs.stub_out_migration_methods(stubs)
nova.tests.xenapi.stubs.stub_out_vm_methods(stubs)
nova.tests.xenapi.stubs.stubout_create_vm(stubs)

Simulates a failure in create_vm.

nova.tests.xenapi.stubs.stubout_determine_is_pv_objectstore(stubs)

Assumes VMs never have PV kernels

nova.tests.xenapi.stubs.stubout_fetch_image_glance_disk(stubs)

Simulates a failure in fetch image_glance_disk.

nova.tests.xenapi.stubs.stubout_get_this_vm_uuid(stubs)
nova.tests.xenapi.stubs.stubout_instance_snapshot(stubs)
nova.tests.xenapi.stubs.stubout_is_vdi_pv(stubs)
nova.tests.xenapi.stubs.stubout_lookup_image(stubs)

Simulates a failure in lookup image.

nova.tests.xenapi.stubs.stubout_loopingcall_delay(stubs)
nova.tests.xenapi.stubs.stubout_loopingcall_start(stubs)
nova.tests.xenapi.stubs.stubout_session(stubs, cls)

Stubs out two methods from XenAPISession

nova.tests.xenapi.stubs.stubout_stream_disk(stubs)