nova/nova/tests/unit/objects
Matt Riedemann e48fb84e12 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)
(cherry picked from commit 603171bd5c)
2019-11-28 13:33:13 +00:00
..
__init__.py
test_agent.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_aggregate.py Transform aggregate.update_prop notification 2018-07-15 23:36:31 +09:00
test_bandwidth_usage.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_block_device.py Fix all invalid obj_make_compatible test case 2018-07-27 02:20:46 +00:00
test_build_request.py Fix misuse of nova.objects.base.obj_equal_prims 2019-08-14 08:56:45 +09:00
test_cell_mapping.py Fix formatting non-templated cell URLs with no config 2018-10-17 16:07:56 +02:00
test_compute_node.py Ignore uuid if already set in ComputeNode.update_from_virt_driver 2018-10-17 16:24:10 +02:00
test_console_auth_token.py Reduce scope of 'path' query parameter to noVNC consoles 2019-10-02 16:22:51 +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 nova.db.api directly 2018-07-10 14:56:27 +00:00
test_external_event.py Use EnumField for instance external event name 2015-05-20 22:16:52 +00:00
test_fields.py Add VIFMigrateData object for live migration 2018-07-19 09:08:12 -04:00
test_fixed_ip.py Use nova.db.api directly 2018-07-10 14:56:27 +00: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 Add --by-service to discover_hosts 2018-03-16 15:55:19 -07: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 Default embedded instance.flavor.is_public attribute 2018-11-21 15:10:57 -05:00
test_instance_action.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_instance_device_metadata.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_instance_fault.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_instance_group.py Make scheduler.utils.setup_instance_group query all cells 2018-09-05 16:32:42 +00:00
test_instance_info_cache.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_instance_mapping.py Fix InstanceMapping to always default queued_for_delete=False 2019-02-07 16:16:17 +01:00
test_instance_numa_topology.py Fix all invalid obj_make_compatible test case 2018-07-27 02:20:46 +00:00
test_instance_pci_requests.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_keypair.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_migrate_data.py Add VIFMigrateData.get_dest_vif 2018-07-19 09:08:12 -04:00
test_migration.py Join migration_context and flavor in Migration.instance 2019-11-28 13:33:13 +00:00
test_migration_context.py Move get_pci_mapping_for_migration to MigrationContext 2019-06-05 17:43:15 +03:00
test_monitor_metric.py Fix MonitorMetric obj_make_compatible 2016-09-12 14:10:41 +00:00
test_network.py Use nova.db.api directly 2018-07-10 14:56:27 +00: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-25 12:57:49 +00:00
test_objects.py Merge "Add queued_for_delete field to InstanceMapping object" 2018-07-25 04:59:45 +00:00
test_pci_device.py Use nova.db.api directly 2018-07-10 14:56:27 +00: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:36:10 -04:00
test_security_group.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_security_group_rule.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_selection.py objects: Add NUMATopologyLimits.network_metadata 2018-07-09 10:08:08 +01:00
test_service.py Use nova.db.api directly 2018-07-10 14:56:27 +00: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 Fix all invalid obj_make_compatible test case 2018-07-27 02:20:46 +00:00
test_volume_usage.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00