nova/nova/tests/functional
Chris Dent 0372d82c2c Ensure that os-traits sync is attempted only at start of process
Traits sync had been tried any time a request that might involve
traits was called. If the global was set no syncing was done, but
lock handling was happening.

This change moves the syncing into the the deploy.load_app() handling.
This means that the syncing will be attempted any time a new WSGI
application is created. Most of the time this will be at the start of a
new process, but some WSGI servers have interesting threading models so
there's a (slim) possibility that it could be in a thread. Because of
this latter possibility, the locking is still in place.

Functional tests are updated to explicitly do the sync in their
setUp(). Some changes in fixtures are required to make sure that
the database is present prior to the sync.

While these changes are not strictly part of extracting placement, the
consolidation and isolation of database handling code makes where to put
this stuff a bit cleaner and more evident: an update_database() method
in deploy uses an empty DbContext class from db_api to the call the
ensure_trait_sync method in resource_provider. update_database is in
deploy because it an app deployment task and because putting it in
db_api leads to circual import problems.

blueprint placement-extract
Closes-Bug: #1756151

Change-Id: Ic87518948ed5bf4ab79f9819cd94714e350ce265
2018-06-19 13:22:04 +01:00
..
api Ensure that os-traits sync is attempted only at start of process 2018-06-19 13:22:04 +01:00
api_sample_tests Optional separate database for placement API 2018-06-15 13:01:50 +01:00
compute Provide a direct interface to placement 2018-06-12 11:04:50 -05:00
db add consumers generation field 2018-06-12 15:27:57 -04:00
libvirt libvirt: Don't report DISK_GB if sharing 2018-06-12 18:19:38 +05:30
notification_sample_tests Add notification support for trusted_certs 2018-06-14 16:16:00 +02:00
regressions libvirt: Don't report DISK_GB if sharing 2018-06-12 18:19:38 +05:30
wsgi Add policy rule to block image-backed servers with 0 root disk flavor 2018-06-15 17:10:11 -04:00
__init__.py
api_paste_fixture.py
api_samples_test_base.py Add pagination and changes-since for instance-actions 2017-12-14 07:42:17 +00:00
integrated_helpers.py Ensure that os-traits sync is attempted only at start of process 2018-06-19 13:22:04 +01:00
test_aggregates.py mirror nova host aggregate members to placement 2018-05-30 12:45:20 -04:00
test_compute_mgr.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
test_images.py Add create image functional negative tests 2016-12-26 14:15:14 +09:00
test_instance_actions.py
test_legacy_v2_compatible_wrapper.py
test_list_servers_ip_filter.py Trivial: Nix duplicate PlacementFixture() in test 2017-12-01 15:39:28 -06:00
test_login.py
test_metadata.py Remove unused logging import 2017-02-17 15:17:51 +07:00
test_middleware.py Removes unnecessary utf-8 encoding 2016-12-20 10:27:01 +07:00
test_multiattach.py [api] Allow multi-attach in compute api 2018-01-22 10:45:13 -05:00
test_nova_manage.py libvirt: Don't report DISK_GB if sharing 2018-06-12 18:19:38 +05:30
test_report_client.py Enforce placement minimum in nova.cmd.status 2018-06-15 21:04:50 +00:00
test_server_group.py Add late server group policy check to rebuild 2018-02-06 13:54:12 +01:00
test_servers.py libvirt: Don't report DISK_GB if sharing 2018-06-12 18:19:38 +05:30