Have tox use pip upgrade when installing

To synchronize behavior with other integrated projects for
consistency, tox uses pip install -U making sure any packages
already installed in a virtualenv are upgraded to what is specified
in the requirements lists.

Change-Id: Ida5e440d1bdb9f8e9031277ea53a02d2ef171438
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Bump stable/havana next version to 2013.2.2

Change-Id: I3a7170180717bd62fce4cbc2c3a9107187f89fb1
Remove netifaces requirement

netifaces is not required to run the tests, so remove it from
the requirements.

Related-Bug: #1266513
Change-Id: Ifb3b262f47d629670b06c670353dbe798af4dc03
Import strutils from oslo

Handles common UTF8 encoding and decoding situations.

Related-Bug: 1253905
Change-Id: Ia5e743afd59f33bfc7006ff98c39e32e63733803
Try decoding string to UTF-8 on error message fail

Database Errors from SQLAlchemy tend to get mangled into ASCII. If an
error is process that contains UTF-8 data in ASCII form if fails to
build the message and will lead to a 5xx error. Catch the error and try
to decode it to create the message again, if that doesn't work at least
fail gracefully.

Closes-Bug: 1253905
Change-Id: Iecb1170387c51064918780dc6de07db7ca8aeeee
(cherry picked from commit dcefe5874de3073551226c0bdd1e70f00d6a91a1)
Remove roles from OS-TRUST list responses

According to the docs, the list responses should not contain
the roles, only the detailed response when you get a trust
explicitly by ID.  So remove the roles and modify the tests
appropriately.

Note it was also observed that expires_at is present in all
GET resonses, but not in the docs, but this has been agreed
as a docs error so will be addressed via a docs patch.

Change-Id: I5387021a53f3284add9e5e71e9e005c4dd31b76c
Closes-Bug: #1245590
(cherry picked from commit ab0e2c7667a9adc46fece742e1ee8160879b497b)
Sync log_handler module from Oslo

Ibf28ba17f Remove the notifier and its dependencies from log.py

Move the code related to the publish error handler out of the
log module so its easier for other projects to consume it

Closes-bug: #1240349
(cherry picked from commit 1a961bf7e64e7a1610b6be0a5d68bda242352ec4)

Conflicts:
	openstack-common.conf

Change-Id: Ib97bc01b60d7ea6c2e6bc3f0229deffbadbf18cc
Adds fixture package from oslo

The mock library is added to test-requirements.txt since the
mockpatch fixture requires it.

Change-Id: I1b5b0c75f256382a685fceb2117db6d5b18d8c4f
(cherry picked from commit 07aa0a91a120c1b07cbfe800ec0f78abb81a7271)
list_revoked_tokens sql speedup for havana

This consists of the following 3 patches:

    Narrow columns used in list_revoked_tokens sql

    Currently the SQL backend lists revoked tokens by selecting all of the
    columns, including the massive "extra" column. This places a significant
    burden on the client library and wastes resources. We only need the
    id/expired columns to satisfy the API call.

    In tests this query was several orders of magnitude faster with just two
    thousand un-expired revoked tokens.
    (cherry picked from commit ab7221246af394f24e47484e822b8dcda37411aa)

    Add index to cover revoked token list

    The individual expires and valid indexes do not fully cover the most
    common query, which is the one that lists revoked tokens.

    Because valid is only ever used in conjunction with expires, we do not
    need it to have its own index now that there is a covering compound
    index for expires and valid.

    Note that he expires index is still useful alone for purging old tokens
    as we do not filter for valid in that case.
    (cherry picked from commit dd2c80c566f20a97a22e0d7d5a514be84772a955)

    Remove unused token.valid index

    Because valid is only ever used in conjunction with expires, we do not
    need it to have its own index now that there is a covering compound
    index for expires and valid.

    Note that he expires index is still useful alone for purging old tokens
    as we do not filter for valid in that case.
    (cherry picked from commit 5d8a1a41420aa20d2aa21da6311c9d55b9e373b6)

Change-Id: I04d62b98d5d760a3fbc3c8db61530f7ebccb0a48
Closes-Bug: #1253755
Merge "Import strutils from oslo" into stable/havana
Sync rpc fix from oslo-incubator

Sync the following fixes from oslo-incubator:

e355fa3 Create a shared queue for QPID topic consumers
55678c7 Properly reconnect subscribing clients when QPID broker restarts
76972e2 Support a new qpid topology
7b0cb37 Don't eat callback exceptions

It also pulls unrelated fix for impl_kombu, to bring it in sync
with oslo-incubator stable/havana:
69abf38 requeue instead of reject

Closes-bug: #1251757
Closes-bug: #1257293
Closes-bug: #1178375

Change-Id: I45257c62168163d2d4ceda994c94ff2d16a27300
Merge "Try decoding string to UTF-8 on error message fail" into stable/havana
Merge "Have tox use pip upgrade when installing" into stable/havana
Merge "Sync rpc fix from oslo-incubator" into stable/havana
Merge "Remove roles from OS-TRUST list responses" into stable/havana
Merge "Adds fixture package from oslo" into stable/havana
Merge "Sync log_handler module from Oslo" into stable/havana
Merge "Remove netifaces requirement" into stable/havana
Merge "list_revoked_tokens sql speedup for havana" into stable/havana
Limit calls to memcache backend as user token index increases in size

This eliminates the need to do a get on each token in the user's index
on token issuance. This change will change the maximum number of tokens
that can be outstanding for a given user. This change is two-fold, first
instead of using JSON to store the token IDs, the python list structure
is being stored in memcached; second the expiry for the token is also
stored in the list. The net result is that fewer tokens can be stored
in the user's token index list due to an increase in data being stored
per token in the index page.

The new logic will attempt to upgrade the old json-style lists to
the new format of [(token_id, expiry), ...] stored as a native
python object in the memcache backend. This conversion will keep
any outstanding tokens in the list from (<time_of_conversion> +
<configured expiration of tokens>). This is done to ensure that
tokens can still be invalidated by operations that invalidate
tokens based upon user/project/trust/etc changes without causing
potential lockups in keystone trying to retrieve all of the
actual token expiration times from memcache.

Closes-bug: #1251123
Change-Id: Ida39b4699ed6c568609a5121573fc3be5c4ab2f4