Allow v2 client authentication with trust_id

It should be possible to authenticate against the v2 tokens
API with a trust_id, because it suports rescoping an existing
token to a trust, this patch adds client support for this.

Note with the current keystone code it's necessary to pass the
trustor tenant ID when rescoping with a trust where
impersonation==True, e.g:

c = client_v2.Client(username=TRUSTEE_USERNAME,
                     password=TRUSTEE_USERNAME,
                     tenant_name=TRUSTEE_TENANT_NAME,
                     auth_url=OS_AUTH_URL_V2)
c.authenticate(trust_id=trust_i.id, tenant_id=TRUSTOR_TENANT_ID)

Change-Id: I177c41af298b7437e2c6fb437aa9ce9a09773b9d
Closes-Bug: #1231483
python3: Make iteritems py3k compat

Use six.iteritems to replace dictionary.iteritems() on python2 or
dictionary.items() on python3.

Change-Id: I972f065414e22d287bd7e00ab2c6e754f17afb75
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Updated from global requirements

Change-Id: I4f26d3a8790c799e5c1f7f81031406e0c57545f9

Change-Id: Ica7315effe308bd739e90f885849fac27a3c542b

Change-Id: I2cc2769b89bd040064408faea30c448350fa5f00
python3: Refactor dict for python2/python3 compat

Python3 changed the behavior of dict.keys such that it is now
returns a dict_keys object, which is iterable but not indexable.
You can get the python2 result back with an explicit call to list.

Change-Id: Ic504d3929398aa82ac87d1735cf4cedea2dfc5d1
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Sync jsonutils from oslo

Synce the changes of jsonutils from oslo, following fixes are synced:

Ia915f3175bee370d747e362cd9d35d8536c1b7b2
Id1aa7af26b0f5d929337cc373c6a4f802bba2cec
Ic94f238a5f92f28ae1b6154fb56f00c4c9fa3283
I8b246f20f9001379fcb5ca3a84aabee3847cb945

Most of them are py33 fixes, and keystoneclient is required by a dozen of
projects, we should update it to avoid py33 issue in dependent projects.

Closes-Bug #1239602

Change-Id: I65c28896d1551fd537dd7774e87bc479a477a7ab
Merge "python3: Make iteritems py3k compat"
Merge "Allow v2 client authentication with trust_id"
Add AssertRequestHeaderEqual test helper and make use of it

This will be a fairly common pattern and so should be a helper of its
own.

Change-Id: Ic06add6dfe40c7d3ab88dfdd99a9087fdebd9b67
Merge "Updated from global requirements"
Replace OpenStack LLC with OpenStack Foundation

Some files still use trademark OpenStack LLC in header, which
should be changed to OpenStack Foundation.

NOTE: tools/install_venv.py is not touched, should sync with oslo

Change-Id: I01d4f6b64cf1a152c4e190407799ce7d53de845f
Fixes-Bug: #1214176
Merge "Sync jsonutils from oslo"
Merge "python3: Refactor dict for python2/python3 compat"
Make ROOTDIR determination more robust

Remove unused CLIENTDIR and replace it with a TESTDIR
(pointing to rootdir/keystoneclient/tests) and use
normpath for determining the full path of rootdir.

This change is needed if keystoneclient/ is a symlink
and etc/ is in a different directory hierarchy.

Change-Id: Ice9165ef25ec0200ccfb50c2f2f3121a136652a2
PEP 8 Public and internal interfaces

Define which interfaces are public and which are internal based
on PEP 8.

For reference, PEP 8 section is here:
http://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces

Change-Id: I14233796b7838b78fbd355014478f3e326542966
Merge "Make ROOTDIR determination more robust"
Added trace header forwarding