Optional dependency injection

This adds support for optional dependencies using Keystone
dependency injection.

A new decorator for classes is provided.

 @dependency.optional('optional_api_1', 'optional_api_2')

If there's a provider for the dependency, the attribute
will be set to the provider instance, otherwise the attribute
will be set to None.

This can be used in combination with required dependencies.

Related-bug: #1223524
Change-Id: I2b987f10a7bc85efab136ae9e84606e666494246
oauth using optional dependencies

Bug 1223524

Change-Id: Ic0d53fd1d5b3b7a587d33dc230e9ff200782ad4f
Sync gettextutils from oslo

Some Messages use a Message within a Message, and we were only
translating the base Message but not the Message substitution within.

Fixes bug: #1221808

Change-Id: Ic3119df23a090cfaa160c1461e955f0af55fe1cf
Modify oauth1 tests to use generated keystone token in a call

Expanded on a test to check roles section for returned token too,
as well as using the returned token to issue a request (create user).

Change-Id: Id3e88e98aa69c0a353ca54a3d4a29cdade34939a
Ensure any relevant tokens are revoked when a role is deleted

Add a controller class method to delete tokens for a role, along the
lines of those that exist for deleting tokens for user and project. Ensure
this is called for both the V2 and V3 delete_role APIs.

Fixes bug 1153645

Change-Id: I3c8d70eeb387a18c30df489142ea3aefc2224ae3
Add user to project if project ID is changed

When an user updates project ID, it is necessary to make sure
the new tenant is available.

Remove the member role from the old tenant.

Add the member role to the new tenant.

Fixes bug 1201251

Change-Id: I0c2c8971039f567180fd910e959e4a1f0574034d
Merge "Sync gettextutils from oslo"
Merge "Ensure any relevant tokens are revoked when a role is deleted"
upgrade to oslo.config 1.2 final

Fixes-Bug: 1182861
Change-Id: I75ffc4a572d14488d19491a38742d6920951c171
only run flake8 once (bug 1223023)

Change-Id: I0f492ad582fa7e609cccacd6d24f6c97bf731a85
Merge "Add user to project if project ID is changed"
Merge "upgrade to oslo.config 1.2 final"
Merge "Modify oauth1 tests to use generated keystone token in a call"
Merge "Optional dependency injection"
Merge "oauth using optional dependencies"
Merge "only run flake8 once (bug 1223023)"