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.test_libvirt Module

class nova.tests.test_libvirt.CacheConcurrencyTestCase(methodName='runTest')

Bases: nova.test.TestCase

setUp()
test_different_fname_concurrency()

Ensures that two different fname caches are concurrent

test_same_fname_concurrency()

Ensures that the same fname cache runs at a sequentially

class nova.tests.test_libvirt.ConsoleLoggerTestCase(methodName='runTest')

Bases: nova.test.TestCase

setUp()
tearDown()
testReopenBoth()
testReopenReader()
testReopenWriter()
testWriteBytes(reopen_writer=False, reopen_reader=False)
class nova.tests.test_libvirt.FakeVirDomainSnapshot(dom=None)

Bases: object

delete(flags)
class nova.tests.test_libvirt.FakeVirtDomain(fake_xml=None)

Bases: object

XMLDesc(*args)
createWithFlags(launch_flags)
snapshotCreateXML(*args)
class nova.tests.test_libvirt.IptablesFirewallTestCase(methodName='runTest')

Bases: nova.test.TestCase

lazy_load_library_exists()

check if libvirt is available.

setUp()
test_do_refresh_security_group_rules()
test_filters_for_instance_with_ip_v6()
test_filters_for_instance_without_ip_v6()
test_multinic_iptables()
test_provider_firewall_rules()
test_static_filters()
test_unfilter_instance_undefines_nwfilter()
class nova.tests.test_libvirt.LibvirtConnTestCase(methodName='runTest')

Bases: nova.test.TestCase

create_fake_libvirt_mock(**kwargs)

Defining mocks for LibvirtConnection(libvirt is not used).

create_service(**kwargs)
fake_execute(*args)
fake_lookup(instance_name)
lazy_load_library_exists()

check if libvirt is available.

setUp()
test_attach_invalid_device()
test_ensure_filtering_rules_for_instance_timeout()

ensure_filtering_fules_for_instance() finishes with timeout.

test_get_host_ip_addr()
test_get_instance_disk_info_works_correctly()

Confirms pre_block_migration works correctly.

test_live_migration_raises_exception()

Confirms recover method is called when exceptions are raised.

test_lxc_container_and_uri()
test_multi_nic()
test_pre_block_migration_works_correctly()

Confirms pre_block_migration works correctly.

test_preparing_xml_info()
test_snapshot_in_qcow2_format()
test_snapshot_in_raw_format()
test_snapshot_no_image_architecture()
test_spawn_with_network_info()
test_update_available_resource_works_correctly()

Confirm compute_node table is updated successfully.

test_update_resource_info_no_compute_record_found()

Raise exception if no recorde found on services table.

test_volume_in_mapping()
test_xml_and_uri()
test_xml_and_uri_no_kernel()
test_xml_and_uri_no_ramdisk()
test_xml_and_uri_no_ramdisk_no_kernel()
test_xml_and_uri_rescue()
class nova.tests.test_libvirt.NWFilterFakes
filterDefineXMLMock(xml)
nwfilterLookupByName(name)
class nova.tests.test_libvirt.NWFilterTestCase(methodName='runTest')

Bases: nova.test.TestCase

setUp()
setup_and_return_security_group()
teardown_security_group()
test_cidr_rule_nwfilter_xml()
test_create_network_filters()
test_creates_base_rule_first()
test_unfilter_instance_undefines_nwfilters()