Clean up a little cruft

OpenStack runs a git service now, so instead of linking to github URLs,
link to git.openstack.org.
Versions for pbr in setup.py actually wind up being an error (and a very
odd one) Remove them.
The setup hook in setup.cfg is no longer needed.

Change-Id: I8f48ac194e6c01e9bb06fa5df6f2b2bf28c01636
Update pbr usage

We've discovered that having versions in setup_requires leads to evil
and death. Also, the setup-hooks in setup.cfg are completely unnecessary
anymore.

Change-Id: I8878e635e0828bbddb81d9c6321a9f10ad3b89fe
Corrected usage of len(filter(...))

filter() returns an iterable, not a list on Python 3.

Change-Id: I8afb2962bcd193ab67017c98376359c0f28afc66
py33: 'dict_keys' object does not support indexing

In python 3, dict.keys() is a class of 'dict_keys', it does not
support indexing.

Cast the dict to list to get the "first" value of dict, which is
compatible with python 2&3.

Closes-Bug: #1229005

Change-Id: I561b7ada9e5ad936659a657b3161a9b93a15a788
Corrected several usage of keys() for Python 3

Under Python2 dict.keys() returns a list, under Python 3 it returns an
iterator. Some places assumed that if they called keys() then it was
safe to modify the dict in a loop. Corrected this by calling list().

Change-Id: I7638263f288dd20590bd751d09194a919b921545
py33: dict.keys() is not a list in python3

Cast the dict.keys() to list when comparing its value with list.

Closes-Bug: #1228993

Change-Id: I59d13258935de3e9286845f857eaa602a5b690fb
Make nova CLI use term "server" where possible

nova client was using terms "server" and "instance" interchangeably
which was very confusing.

This patch uses "server" where possible without touching the API.

Note that there are actions (instance-action, instance-action-list) and
arguments (--instance-name, --num-instances, ...) with "instance" in their
name which can't be changed easily.

Closes bug 1156648

Change-Id: I0570aa1c4dc9ad1852af307a2a4896f16073a6ab
Merge "Clean up a little cruft"
Merge "Corrected usage of len(filter(...))"
Merge "py33: 'dict_keys' object does not support indexing"
Merge "py33: dict.keys() is not a list in python3"
Merge "Corrected several usage of keys() for Python 3"
Merge "Update pbr usage"
Merge "Make nova CLI use term "server" where possible"
Fixed several test failures on Python3

- Corrected places where `dict.keys()` was being treated as a list
- Corrected usage of `urllib.urlencode()`

Change-Id: I0a24b2f64fab6c905e20073ff7ebaa3c5ffe7c90
Fix AttributeError in Keypair._add_details()

_add_details() method copies keypair attributes retrieved
from Nova to an instance of Keypair class. Trying to set
attribute 'id' fails with AttributeError, because Keypair
class has a read-only property 'id'.

We can safely omit setting of attribute 'id', because it's
just an implementation detail (the id of a table row in a
database), and keypairs for a given tenant are uniquely
identified using attribute 'name'.

Fixes bug 1223934

Change-Id: I1045730e47e9e6ad31fcdfbaefdad77e2f3b2c3e
Merge "Fix AttributeError in Keypair._add_details()"
py33: unknown encoding: base64 Edit

Python 3 doesn't support str.encode('base64'), we should use the
module "base64" instead.

Close-Bug #1229161

Change-Id: I1432952558f8c5c3cff39761306e91916d80207f
py33: safe_encode() returns bytes in Python 3

Python 2:
str.encode = encode(...)
    S.encode([encoding[,errors]]) -> object

Python 3:
str.encode = encode(...)
    S.encode(encoding='utf-8', errors='strict') -> bytes

In Python 3, strings are always Unicode.  safe_encode() returns
"bytes", the "\n" will be printed literally, it is not expected.

bytes.decode() will transform bytes to str, which will be printed
properly.

Close-bug: #1229150
Change-Id: If926d3f7837673b4608ae667d34cea3c78e82e5d
if we have a valid auth token, use it instead of generating a new one

If authenticating with a valid token (i.e., token auth, not
username/password auth), novaclient would instruct keystone to issue
a new token with an identical expiry to the one used, and pivot
onto it.  This makes it appear as though Nova is leaking Keystone
tokens.

Since there's zero benefit to issuing a new token that is ostensibly
identical to the perfectly good token used to authenticate, make
novaclient keep using the token it already has after successful
validation, and not issue a new one.

This patch set adds a new pair of tests to the
AuthenticateAgainstKeystoneTests class, which parrot the current
authentication pass/fail tests, but exercise the new code paths

Also adds a fix by Joe Gordon to make os_cache work correctly.

Change-Id: Ic4f0e6d506d8d81f0b1d46138e7e19d3b3392e1d
Fixes: Bug 1197201
Related-Bug: 1214658