nova/nova/tests/functional/api/openstack/placement/db
Chris Dent 0044beb358 Optional separate database for placement API
If 'connection' is set in the 'placement_database' conf group use
that as the connection URL for the placement database. Otherwise if
it is None, the default, then use the entire api_database conf group
to configure a database connection.

When placement_database.connection is not None a replica of the
structure of the API database is used, using the same migrations
used for the API database.

A placement_context_manager is added and used by the OVO objects in
nova.api.openstack.placement.objects.*. If there is no separate
placement database, this is still used, but points to the API
database.

nova.test and nova.test.fixtures are adjusted to add awareness of
the placement database.

This functionality is being provided to allow deployers to choose
between establishing a new database now or requiring a migration
later. The default is migration later. A reno is added to explain
the existence of the configuration setting.

This change returns the behavior removed by the revert in commit
39fb302fd9 but done in a more
appropriate way.

Note that with the advent of the nova-status command, which checks
to see if placement is "ready" the tests here had to be adjusted.
If we do allow a separate database the code will now check the
separate database (if configured), but nothing is done with regard
to migrating from the api to placement database or checking that.

blueprint placement-extract

Change-Id: I7e1e89cd66397883453935dcf7172d977bf82e84
Implements: blueprint optional-placement-database
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
2018-06-15 13:01:50 +01:00
..
__init__.py Move placement test cases from db to placement 2018-03-22 13:27:44 +08:00
test_allocation_candidates.py Optional separate database for placement API 2018-06-15 13:01:50 +01:00
test_base.py Optional separate database for placement API 2018-06-15 13:01:50 +01:00
test_consumer.py Optional separate database for placement API 2018-06-15 13:01:50 +01:00
test_project.py placement: Allocation.consumer field 2018-06-13 18:18:37 -04:00
test_resource_class_cache.py Optional separate database for placement API 2018-06-15 13:01:50 +01:00
test_resource_provider.py Optional separate database for placement API 2018-06-15 13:01:50 +01:00
test_user.py placement: Allocation.consumer field 2018-06-13 18:18:37 -04:00