Merge "Remove unused cache functions from token.core"

Change-Id: I95ce7d5618ea254610423a8b7720ca2efe01c530
Update the feature/hierarchical-multitenancy branch

Change-Id: I92b86f4b5a4aebcf39ea49a16f20af24cf6f5e28
Fixes endpoint_filter tests

The tests were written incorrectly and only worked because SQLite
doesn't enforce foreign key relationships by default.

implements bp tests-on-rdbmses
Change-Id: I8f4b64485ecdc6088c816f7f675cc5cefc83f9ac
Remove database setup duplication

The Database fixture was being used twice. This removes is from the
test_v3.RestfulTestCase class in favor of keeping the setup in the
rest.RestfulTestCase class. To do this the rest.RestfulTestCase class
needed a method to define extensions.

implements bp tests-on-rdbmses
Change-Id: Ia1dfd887e23b0055fdc260473be367fbcd6c7662
Merge remote-tracking branch 'origin/master' into feature/hierarchical-multitenancy

Change-Id: I7e27d042575609e4107764c1ff2e1048e5a14a02
Add parent_id field to projects

Field to point to a parent project. This enables
the possibility to use hierarchical projects.

Co-Authored-By: Rodrigo Duarte <rodrigods@lsd.ufcg.edu.br>
Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>
Co-Authored-By: Telles Mota Vidal Nobrega <tellesmvn@lsd.ufcg.edu.br>

Implements: blueprint hierarchical-multitenancy
Change-Id: I2b56a362df40b664e3a802d09ca027277678b300
Tests raise exception if logging problem

If there's a problem with the log call then the tests should catch
it.

Related-Bug: #1366988
Change-Id: Ied3f329902ca1088ebfcd163edd2cef797ba90a2
sys.exit mock cleanup

The base testcase didn't need to keep a reference to the sys.exit
mockpatch fixture.

Also, added a unit test for calling sys.exit() since there wasn't
one.

Change-Id: Ifa2e6c89dc556ed09623805e618a95744cc8c97f
fix the wrong order of assertEqual args in test_v3

Change-Id: I021051b385bf1206167b955af58be6d334aeb047
use expected_length parameter to assert expected length

assertValidRoleAssignmentListResponse method provides expected_length
parameter to assert expected length of list response. However, we
do not use it.

Change-Id: Ifc9ff3f13809ef939d2154d1ddd8648735efb613
Base methods to handle hierarchical projects

Add base methods to be used at hierarhical projects.

Co-Authored-By: Rodrigo Duarte <rodrigods@lsd.ufcg.edu.br>
Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>
Co-Authored-By: Telles Mota Vidal Nobrega <tellesmvn@lsd.ufcg.edu.br>
Co-Authored-By: Andre Aranha <afaranha@lsd.ufcg.edu.br>
Co-Authored-By: Samuel de Medeiros Queiroz <samuel@lsd.ufcg.edu.br>

Implements: blueprint hierarchical-multitenancy
Change-Id: I70ffbf426af5c3901dc2347efb9a43540f7d0604
Move check_output and git() to test utils

check_output and git() were only used in the tests, so move to
tests.utils.

Change-Id: Ib2c52c9977abee81dccf3ec9496a7bc2afbef02b
Change config option examples to v3

Reference v3 in the config help text for the day when v2 is removed.

Change-Id: I4247b104d0490d264bbc36c3dad0c59f29c4345d
Correct use of noqa

Use of "flake8: noqa" disabled hacking checks for the entire file.
Files should use "noqa" instead because that disables hacking checks
only for the line.

This fixes an inappropriate use of "flake8: noqa" and the hacking
issues that were masked.

Change-Id: I7c5b0b9dc4aab7e2129c0886afda0d07dba09afe
Doc about deleting a domain specific backend domain

Change-Id: I28b0ebf9d8c002097e2d694c863f07b7739de0e9
Closes-Bug: 1385405
Provide useful info when parsing policy file

When parsing the policy.json file we should provide a message that helps
the user or deployer understand there was an issue with the policy file,
and that they should make sure the policy.json file is valid JSON.

Change-Id: I63bdb6d8f03a0510e34b7e10cec25263e7c6c63c
Closes-Bug: #1177623
Prevent infinite loop in token_flush

If there were > batch_size tokens with the same expiration time then
token_flush could hang because it picks the expiration time as the
target to delete with a < check.

The check is changed to a <= so that the tokens in the batch are
deleted so that token_flush always makes progress.

Change-Id: Id0b6f7fcdf7ebb02a6f38fbb9a4e25bf714a614c
Closes-Bug: #1387401
default revoke driver should be the non-deprecated driver

Have checked other config options that default is not the deprecated
option, others are OK.

Change-Id: Ie6e7351114d79eb25b392faaa0e6376c24c45fa0
Closes-Bug: #1384775
Change ca to uppercase in keystone.conf

Change-Id: I1dfabddee087cf2052f2595b30bc69ad995f1220
Use true() rather than variable/singleton

SqlAlchemy provides a true() factory so we don't have to work around
PEP8 issues with comparing singletons.

Change-Id: Icdff30d85beb068d10b987aea0e5a6e71098316a