nova/nova/tests/unit/objects
Matt Riedemann 603171bd5c Join migration_context and flavor in Migration.instance
This builds on Ifc7dcde8a659710acecb1967da15c632c69d675c
by joining the Migration.instance migration_context and
flavor to avoid lazy-loading those later.

When tracking an incoming migration, the ResourceTracker
_pair_instances_to_migrations can hit a KeyError since it's
not yet tracking the instance on that dest host yet. Then
_update_usage_from_migrations will lazy-load the Migration.instance
field and access the migration_context and flavor fields on the
instance, which get lazy-loaded, which kind of defeats part of
the purpose of that optimization.

Change-Id: I613ad054f77b1a0a9d2e7718c0c531d11525283c
Related-Bug: #1540526
(cherry picked from commit c15e36e584)
(cherry picked from commit e2b4e3346e)
2019-11-26 13:40:43 +00:00
..
__init__.py
test_agent.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_aggregate.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_bandwidth_usage.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_block_device.py Add volume_type field to BlockDeviceMapping object 2018-09-28 03:29:24 -04:00
test_build_request.py Fix misuse of nova.objects.base.obj_equal_prims 2019-08-14 08:53:45 +09:00
test_cell_mapping.py Fix formatting non-templated cell URLs with no config 2018-10-16 16:11:17 -04:00
test_compute_node.py Fix ComputeNode ovo compatibility code 2019-01-25 14:17:59 +00:00
test_console_auth_token.py Reduce scope of 'path' query parameter to noVNC consoles 2019-10-02 16:19:14 +00:00
test_diagnostics.py Added nova objects for intance diagnostics 2017-05-30 00:39:44 +04:00
test_dns_domain.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_ec2.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_external_event.py Use EnumField for instance external event name 2015-05-20 22:16:52 +00:00
test_fields.py Switch to using os-resource-classes 2019-02-07 11:11:09 +00:00
test_fixed_ip.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_flavor.py Fix all invalid obj_make_compatible test case 2018-07-27 02:20:46 +00:00
test_floating_ip.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_host_mapping.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_hv_spec.py objects: Move 'vm_mode' to 'fields.VMMode' 2016-11-25 16:19:44 +00:00
test_image_meta.py Update ImageMetaProp object to expose traits 2018-04-05 16:18:59 -07:00
test_instance.py objects: Store InstancePCIRequest.numa_policy in DB 2019-03-06 11:02:02 +00:00
test_instance_action.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_instance_device_metadata.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_instance_fault.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_instance_group.py Avoid unnecessary joins in InstanceGroup.get_hosts 2019-06-10 15:15:23 +00:00
test_instance_info_cache.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_instance_mapping.py Add user_id field to InstanceMapping 2019-03-08 19:01:16 -05:00
test_instance_numa_topology.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_instance_pci_requests.py objects: Store InstancePCIRequest.numa_policy in DB 2019-03-06 11:02:02 +00:00
test_keypair.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_migrate_data.py Remove _legacy_dict methods 2019-02-22 13:28:11 -05:00
test_migration.py Join migration_context and flavor in Migration.instance 2019-11-26 13:40:43 +00:00
test_migration_context.py Move get_pci_mapping_for_migration to MigrationContext 2019-05-26 18:40:28 +03:00
test_monitor_metric.py Fix MonitorMetric obj_make_compatible 2016-09-12 14:10:41 +00:00
test_network.py Fix ovo compatibility code unit tests 2019-01-16 15:51:22 +01:00
test_network_request.py Fix all invalid obj_make_compatible test case 2018-07-27 02:20:46 +00:00
test_numa.py Fix overcommit for NUMA-based instances 2019-01-16 11:50:14 +00:00
test_objects.py Add user_id field to InstanceMapping 2019-03-08 19:01:16 -05:00
test_pci_device.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_pci_device_pool.py Return empty PciDevicePoolList obj instead of None 2015-09-11 21:20:01 +02:00
test_quotas.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_request_spec.py Do not persist RequestSpec.ignore_hosts 2019-04-02 09:13:29 -04:00
test_security_group.py Fix ovo compatibility code unit tests 2019-01-16 15:51:22 +01:00
test_security_group_rule.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_selection.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_service.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
test_tag.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_task_log.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_trusted_certs.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_vcpu_model.py objects: Move 'cpumodel' to 'fields.CPU*' 2016-11-25 16:19:43 +00:00
test_virt_cpu_topology.py Convert hardware.VirtCPUTopology to nova object 2014-11-20 09:14:25 -05:00
test_virtual_interface.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_volume_usage.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00