The nova.tests.test_db_api Module

Unit tests for the DB API.

class AggregateDBApiTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_aggregate_create_avoid_name_conflict()
test_aggregate_create_delete_create_with_metadata()
test_aggregate_create_low_privi_context()
test_aggregate_create_no_metadata()
test_aggregate_create_raise_exist_exc()
test_aggregate_create_with_metadata()
test_aggregate_delete()
test_aggregate_delete_raise_not_found()
test_aggregate_get()
test_aggregate_get_all()
test_aggregate_get_all_non_deleted()
test_aggregate_get_by_host()
test_aggregate_get_by_host_not_found()
test_aggregate_get_by_host_with_key()
test_aggregate_get_raise_not_found()
test_aggregate_host_add()
test_aggregate_host_add_duplicate_raise_exist_exc()
test_aggregate_host_add_duplicate_works()
test_aggregate_host_add_raise_not_found()
test_aggregate_host_delete()
test_aggregate_host_delete_raise_not_found()
test_aggregate_host_get_by_metadata_key()
test_aggregate_host_re_add()
test_aggregate_metadata_add()
test_aggregate_metadata_delete()
test_aggregate_metadata_delete_raise_not_found()
test_aggregate_metadata_get_by_host()
test_aggregate_metadata_get_by_host_with_key()
test_aggregate_metadata_get_raise_not_found()
test_aggregate_metadata_update()
test_aggregate_remove_availability_zone()
test_aggregate_update()
test_aggregate_update_raise_not_found()
test_aggregate_update_with_existing_metadata()
test_aggregate_update_with_metadata()
class ArchiveTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
tearDown()
test_archive_deleted_rows()
test_archive_deleted_rows_fk_constraint()
test_archive_deleted_rows_for_table()
test_archive_deleted_rows_no_id_column()
class BlockDeviceMappingTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_block_device_mapping_create()
test_block_device_mapping_destory_by_instance_and_volumne()
test_block_device_mapping_destroy()
test_block_device_mapping_destroy_by_instance_and_device()
test_block_device_mapping_get_all_by_instance()
test_block_device_mapping_update()
test_block_device_mapping_update_or_create()
test_block_device_mapping_update_or_create_check_remove_virt()
class CapacityTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_compute_node_create()
test_compute_node_get_all()
test_compute_node_stat_prune()
test_compute_node_update()
test_compute_node_update_always_updates_updated_at()
class DbApiTestCase(*args, **kwargs)

Bases: nova.tests.test_db_api.DbTestCase

test_add_key_pair(name=None)

Check if keypair creation work as expected.

test_bw_usage_calls()
test_create_instance_unique_hostname()
test_delete_instance_metadata_on_instance_destroy()
test_delete_non_existent_key_pair()
test_dns_registration()
test_ec2_ids_not_found_are_printable()
test_fixed_ip_disassociate_all_by_timeout_multi_host()
test_fixed_ip_disassociate_all_by_timeout_single_host()
test_fixed_ip_get_by_floating_address()
test_fixed_ip_get_by_host()
test_floating_ip_get_by_fixed_address()
test_get_non_existent_key_pair()
test_get_snap_mapping_non_admin()
test_get_vol_mapping_non_admin()
test_instance_action_and_event_start_string_time()

Create an instance action and event with a string start_time.

test_instance_action_event_finish_error()

Finish an instance action event with an error.

test_instance_action_event_finish_success()

Finish an instance action event.

test_instance_action_event_get_by_id()

Get a specific instance action event.

test_instance_action_event_start()

Create an instance action event.

test_instance_action_finish()

Create an instance action.

test_instance_action_get_by_instance_and_action()

Ensure we can get an action by instance UUID and action id.

test_instance_action_start()

Create an instance action.

test_instance_actions_get_by_instance()

Ensure we can get actions by UUID.

test_instance_fault_create()
test_instance_fault_get_by_instance()
test_instance_faults_get_by_instance_uuids_no_faults()
test_instance_get_all_by_filters()
test_instance_get_all_by_filters_deleted()
test_instance_get_all_by_filters_metadata()
test_instance_get_all_by_filters_regex()
test_instance_get_all_by_filters_unicode_value()
test_instance_get_all_by_filters_with_meta()
test_instance_get_all_by_filters_without_meta()
test_instance_get_all_by_host_and_node_no_join()
test_instance_get_all_hung_in_rebooting()
test_instance_get_all_with_meta()
test_instance_update_unique_name()
test_instance_update_updates_metadata()
test_instance_update_updates_system_metadata()
test_instance_update_with_and_get_original()
test_instance_update_with_instance_uuid()
test_key_pair_destroy()

Check if key pair deletion works as expected.

test_key_pair_get()

Test if a previously created keypair can be found.

test_key_pair_get_all_by_user()
test_migration_get_unconfirmed_by_dest_compute()
test_multi_associate_disassociate()
test_network_create_safe()
test_network_create_with_duplicate_vlan()
test_network_delete_safe()
test_network_get_all_by_host()
test_network_get_associated_fixed_ips()
test_network_in_use_on_host()
test_network_update_with_duplicate_vlan()
class DbTestCase(*args, **kwargs)

Bases: nova.test.TestCase

create_instances_with_args(**kwargs)
create_metadata_for_instance(instance_uuid)
fake_metadata(content)
setUp()
class InstanceDestroyConstraints(*args, **kwargs)

Bases: nova.test.TestCase

test_destroy_with_equal_any_constraint_met()
test_destroy_with_equal_any_constraint_not_met()
test_destroy_with_not_equal_constraint_met()
test_destroy_with_not_equal_constraint_not_met()
class MigrationTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_in_progress_host1_nodea()
test_in_progress_host1_nodeb()
test_in_progress_host2_nodeb()
test_instance_join()
test_migration_get_in_progress_joins()
class ModelsObjectComparatorMixin

Bases: object

class NotDbApiTestCase(*args, **kwargs)

Bases: nova.tests.test_db_api.DbTestCase

setUp()
test_instance_get_all_by_filters_paginate()
test_instance_get_all_by_filters_regex_unsupported_db()
class ServiceTestCase(*args, **kwargs)

Bases: nova.test.TestCase, nova.tests.test_db_api.ModelsObjectComparatorMixin

setUp()
test_service_create()
test_service_destroy()
test_service_get()
test_service_get_all()
test_service_get_all_by_host()
test_service_get_all_by_topic()
test_service_get_by_args()
test_service_get_by_args_not_found_exception()
test_service_get_by_compute_host()
test_service_get_by_compute_host_not_found()
test_service_get_by_host_and_topic()
test_service_get_not_found_exception()
test_service_get_with_compute_node()
test_service_update()
test_service_update_not_found_exception()
class SqlAlchemyDbApiTestCase(*args, **kwargs)

Bases: nova.tests.test_db_api.DbTestCase

test_instance_get_all_by_host()
test_instance_get_all_uuids_by_host()
class TaskLogTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_task_log_begin_task()
test_task_log_begin_task_duplicate()
test_task_log_end_task()
test_task_log_get()
test_task_log_get_all()
class TestFixedIPGetByNetworkHost(*args, **kwargs)

Bases: nova.test.TestCase

test_fixed_ip_found()
test_not_found_exception()
class TestIpAllocation(*args, **kwargs)

Bases: nova.test.TestCase

create_fixed_ip(**params)
setUp()
test_fixed_ip_associate_fails_if_ip_in_use()
test_fixed_ip_associate_fails_if_ip_not_in_network()
test_fixed_ip_associate_succeeds()
test_fixed_ip_associate_succeeds_and_sets_network()
class VirtualInterfaceTestCase(*args, **kwargs)

Bases: nova.test.TestCase, nova.tests.test_db_api.ModelsObjectComparatorMixin

setUp()
test_virtual_interface_create()
test_virtual_interface_create_with_duplicate_address(*args, **kwargs)
test_virtual_interface_delete_by_instance()
test_virtual_interface_get()
test_virtual_interface_get_all()
test_virtual_interface_get_by_address()
test_virtual_interface_get_by_instance()
test_virtual_interface_get_by_instance_and_network()
test_virtual_interface_get_by_uuid()
class VolumeUsageDBApiTestCase(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_vol_usage_update_no_totals_update()
test_vol_usage_update_totals_update()
test_vol_usage_update_totals_update_when_blockdevicestats_reset()
test_vol_usage_update_when_blockdevicestats_reset()

Previous topic

The nova.tests.test_crypto Module

Next topic

The nova.tests.test_driver Module

This Page