keystone/keystone/tests/unit/backend
Henrique Truta 24b5dd021d Allow project domain_id to be nullable at the manager level
Since the domain_id column is part of a uniqueness constraint and
it might now contain a nullable value, we actually store a special
value (as opposed to None) in the sql attribute so as to still use
the sql uniqueness constraint to ensure we do not have race
conditions in multi-process keystone configurations. So as to
continue to support a FK on the project.domain_id column, we create
a hidden domain ("the root of all domains"). In preparation for the
move to projects acting as domains, we also create a matching project
for this root. These special rows, and indeed the special domain_id
value stored, are entirely hidden within the sql driver and are not
exposed to the manager layer and above. The ability to store a project
domain_id of None is also added to the wrapper for legacy drivers.

In addition, one incorrectly written test relating to upcoming support
of projects as a domain had to be modified, since it started
passing prematurely, and the (now unused) driver base class method
for setting a domain_id is moved to the legacy V8 class.

Follow-on patches will build on this enable projects acting as domains,
which will have a null domain_id.

Co-Authored-By: Henry Nash <henryn@linux.vnet.ibm.com>
Partially-Implements: bp reseller

Change-Id: I4e5b9f3978482082c23f729d29bbdc701bc7c473
2016-02-16 13:15:43 +00:00
..
domain_config Remove additional references to ldap role attribs 2016-01-22 01:41:42 +00:00
legacy_drivers Allow project domain_id to be nullable at the manager level 2016-02-16 13:15:43 +00:00
role Fix nits from domain specific roles CRUD support 2016-02-11 09:44:01 -03:00
__init__.py Move backend role tests into their own module 2015-02-17 00:33:16 +00:00
core_ldap.py Fix D204: blank line required after class docstring (PEP257) 2015-10-28 07:25:24 +00:00
core_sql.py Change tests to use common name for keystone.tests.unit 2015-09-04 18:21:42 +00:00