nova/nova/tests/functional/db
Mohammed Naser dc0ded897b Create request spec, build request and mappings in one transaction
The transaction context is currently not shared when creating the
RequestSpec, BuildRequest and InstanceMapping.  Because of this,
it is possible that the database ends in an inconsistent state
due to the fact that one of these was created and the system
crashed afterwards.

This patch adds a function which handles the creation of all those
resources in a single transaction.

Co-Authored-By: melanie witt <melwittt@gmail.com>

Closes-Bug: #1784093

 Conflicts:
	nova/tests/unit/compute/test_compute_api.py

NOTE(melwitt): The conflict is because change
Iaffbb019fef7779e7fa44306aacca954512b6970 is not in Rocky.
The difference in the test is because change
I7f5f08691ca3f73073c66c29dddb996fb2c2b266 is not in Rocky.

Change-Id: If897a0d721180152ebdceb7a0c23e8f283ce6d10
(cherry picked from commit 85f8d033d2)
(cherry picked from commit 870e5bcfb6)
2019-04-28 00:42:15 +00:00
..
api Add queued for delete to instance_mappings table. 2018-07-10 10:55:49 +02:00
__init__.py Add second migrate_repo for cells v2 database migrations 2015-03-03 15:41:40 -05:00
test_aggregate.py Add AggregateList.get_by_metadata() query method 2018-03-28 15:58:46 -07:00
test_aggregate_model.py Add aggregates tables to the API db. 2016-06-01 12:00:56 -05:00
test_archive.py Improve NeutronFixture and remove unncessary stubbing 2018-08-02 15:15:03 +02:00
test_build_request.py Exclude build request marker from server listing 2018-12-20 21:06:23 +03:00
test_cell_mapping.py Address feedback from instance_list smart-cell behavior 2018-05-10 09:59:36 -07:00
test_compute_api.py Create request spec, build request and mappings in one transaction 2019-04-28 00:42:15 +00:00
test_compute_node.py Filter deleted computes from get_all_by_uuids() 2018-09-21 13:47:56 +00:00
test_connection_switch.py Add scatter gather utilities for cells 2017-06-29 19:41:20 +00:00
test_console_auth_token.py Add ConsoleAuthToken object 2018-01-06 02:03:50 +00:00
test_flavor.py Remove old flavor_get_all db api method 2018-02-14 15:53:18 -05:00
test_flavor_model.py Add Flavor.description attribute 2017-11-05 01:24:01 -05:00
test_host_mapping.py Make discover_hosts only query for unmapped ComputeNode records 2017-05-15 10:50:01 -04:00
test_instance.py Check hosts have no instances for AZ rename 2019-03-06 16:31:28 +03:00
test_instance_group.py Add policy to InstanceGroup object 2018-07-12 09:30:41 +08:00
test_instance_mapping.py Online data migration for queued_for_delete flag 2018-07-23 14:48:18 -07:00
test_keypair.py Cleanup some redundant USES_DB_SELF usage 2016-09-26 15:47:16 -04:00
test_quota.py Transform servergroup.addmember notification 2018-03-06 22:03:00 +00:00
test_quota_model.py Add quota related tables to the api database. 2016-10-12 07:40:00 +00:00
test_quotas.py Add online migration to move quotas to API database 2017-07-24 18:36:46 -04:00
test_request_spec.py Handle missing marker during online data migration 2018-10-08 13:18:22 +00:00
test_security_group.py Add SecurityGroupList.get_counts() 2017-06-19 21:51:46 +00:00