Check that region ID is not an empty string

It generates an ID when a POST request to /regions has an empty string as ID

Change-Id: I49afd1f8c2e09ed31329bd8d1d88ca7f29ef7be9
Closes-Bug: 1322639
Details the proper way to call a callable

Change-Id: I288822ed3aa8a755fc90fbf7940da043995cb719
Refactor set domain-id and mapping code

Applied function separation refactorings to the
_set_domain_id_and_mapping function in the identity/core module in an
attempt to make it more readable.

Change-Id: I921a05b0164bc6afa329e98c26faf4cf4f336f2f
Fix invalid self link in get access token

When getting a single access token, the `self` link didn't contain user section.
This commit fixes the url by overriding the method that generates the self
referential links and adds corresponding test.

Change-Id: I366ee2d691008b6b7412adb8cf95179129310728
Closes-Bug: #1279496
Add pluggable range functions for token flush

This patch refactors the flush tokens functionality to have a pluggable
expiration range strategy that can be customized based on database
backend.  The batch size method has been replaced with a method that
will return an appropriate iterator for choosing expiration ranges.

This patch also allows MySQL to use the batch flush functionality to
alleviate problems with Galera replication and large write sets.  Galera
has a modest size limit (1GB) on how large write sets can grow and this
can be reached fairly easily if you run expiration infrequently, or just
have a high token issue rate.

This also changes the mechanism to do batch flushes to a more portable
mechanism that does not require subquery support w/LIMIT.  MySQL does
not support DELETE with a subquery that uses LIMIT.

The batch expiration strategy will return a timestamp each time it's
called.  The flush function will then delete all expired tokens up to
that timestamp.  It is possible that this will delete somewhat more than
the `batch_size` number of rows, but it is expected that it will
typically be close to that number, and will effectively chunk the work
into roughly equal size batches.

Closes-Bug: 1188378
Change-Id: I2df68a35691e001083f41f43e9c325bd687f7ec8
Catch correct oslo.db exception

Now oslo.db wraps all the database exceptions into specific oslo.db
exceptions. A test expects for IntegrityError where now returns
DBDuplicateEntry. We should catch DBDuplicateEntry to keep test
correctness.

Change-Id: I4576f19c4fd3db6742a6a2fbbca0e0e5400b792d
Closes-Bug: #1214341
Merge "Refactor set domain-id and mapping code"
Update the config file

Noticed that some of the ec2 options no longer appear, so I ran
tox to update the config file.

Change-Id: I886d76f9d1201bdbb066b76928de7fe6244dfb58
Merge "Check that region ID is not an empty string"
Merge "Details the proper way to call a callable"
Merge "Fix invalid self link in get access token"
Merge "Add pluggable range functions for token flush"
Merge "Update the config file"
Merge "Catch correct oslo.db exception"