Move all opens in auth_token to be in context

This commit switches the use of open() to be in a with context. This
will prevent leaking file descriptors because using a context
provides an inherent close(). Prior to this commit it was possible
that an exception or error during the write() call could prevent
close() from running.

Change-Id: Ib13fe651d41f0eafea23a1c96c6c64d405de7e49
Extract test token data from auth_token middleware

This data can be used elsewhere as well.

Change-Id: I38b6c782b6d38e9e7d091f1c045a13ca10dfcc85
Add importutils and strutils from oslo

They will be used by apiclient library.

Change-Id: Ifb0d5fa1480c3701316b57d9e59507d608b11753
Initial Trusts support

Implements client support for the basic trusts API operations,
note this does not include support for the roles subpath operations,
support for those can be added in a subsequent patch.

Change-Id: I0c6ba12bad5cc8f3f10697d2a3dcf4f3be8c7ece
blueprint: delegation-impersonation-support
Restore client.py for backward compatibility

Simply pull in HTTPClient from its new location. This also restores the
tests that were modified back to there original form to make sure
nothing has changed from the original.

Fixes: bug 1211998
Change-Id: Ia3241a4352eb6b37c6489cd4dd1bc373de107e12
Allow configure the number of http retries

Allow setting the maximum number of times we want to retry to
http_connect when communicating with the Identity service.

Closes-Bug: 1209194
Change-Id: I56bff55dc808a1188d42f1643a8018a8d49012c6
Add unittests for exceptions.EmptyCatalog

Change-Id: I6cff9501883ba2237e3112a53e01f994f170aadf
Merge "Restore client.py for backward compatibility"
Merge "Initial Trusts support"
Merge "Extract test token data from auth_token middleware"
Merge "Allow configure the number of http retries"
Merge "Add importutils and strutils from oslo"
Merge "Move all opens in auth_token to be in context"
Merge "Add unittests for exceptions.EmptyCatalog"