Add apiclient.exceptions hierarchy

The new apiclient.exceptions hierarchy is more comprehensive
and it covers almost all HTTP error status codes. These
exceptions can be used in novaclient, keystoneclient,
glanceclient, and other client projects thus providing a
single inteface.

Users can have benefit from OpenStack clients raising exceptions
of known classes while now every client has its own classes making
difficult to catch, e.g., NotFound for every client.

Change-Id: Ia7b25880e0ffca3526525a0f0e77c7e77c4f0076
Update oslo.config

Update oslo.config to 1.2.0a3 it contains a bucket load of
python3 fixes that is needed for py3 compat in python-keystoneclient.

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

Python3 reorganized the standard library and moved several
functions to different modules and combined modules. Six
provides a consistent interface to the module through
six.moves

However urllib/urlparse is not covered by six.moves so
py3kcompat adds python2/python3 compatibility layer for
urllib/urlparse.

Change-Id: I98d45a84e8c2dcd965a9e5cc08d7bb341eb08bfc
Signed-off-by: Chuck Short <chuck.short@canonical.com>
python3: Transition to mox3 instead of mox

In order to make the transition to mox free world,
mox needs to replaced with mox3 which is python3 compatible.

Change-Id: Id18928c7ac93b510a4867acb03896899fe1c13b0
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Use OSLO jsonutils instead of json module

For most things there is very little difference, but as we have a
jsonutils module we should probably be using it.

Change-Id: I406ea81bb56ad90cc9ff9b8b58b0d35b694dc802
Replace auth_token middleware tests with httpretty

Httpretty will work in exactly the same way regardless of whether we use
the httplib or requests library. Convert it so we can modify the
middleware and know that our tests are still correct.

In this process we also split the tests from having V3 tests override
V2 tests, to having a base test class and V2 and V3 seperate overrides.

Change-Id: I1bfcecc6ae47a6dd5e76d4ceb8b3941e6ad1089f
Fix License Headers and Enable Gating on H102

Add ASLv2 headers to files that were missing it.

fixes bug #1211587

Change-Id: Iede918e1ce84993cee4ecbb2d9c2606627fa412e
Fix and enable gating on H302: only import modules

Fixes non-module imports and enables gating on H302 in flake8

Change-Id: I366b0ca622d5185732c6c755f8724efb8bbc80f7
Standardize base.py with novaclient

Main changes:
* deprecate api variable in favour of client
* add documentation
* use to_slug from oslo strutils
* remove Python 2.4 support
* other small fixes from novaclient

Change-Id: Ife54fd3207798ee03101a48bc1cda3b3f62cc5e4
Merge "Fix License Headers and Enable Gating on H102"
Merge "Fix and enable gating on H302: only import modules"
Fix and enable gating on F841

F841 local variable is assigned to but never used

Change-Id: I4b54489386deb655821192b4ec1e9c0ea596a9b7
Fix and enable gating on F811

Fixes duplicate method definitions and enables gating on F811

Change-Id: Ic360e70d13da864b8b5c10fc5e731b3952b2d2e8
Merge "Fix and enable gating on F841"
Fixing potential NameErrors

Fixing a couple locations that could potentially raise NameErrors
instead of intended exceptions.  These were found by looking at
flake8 F821 (undefined name) errors.

Added in unit tests to verify NameErrors would not be raised.

Change-Id: I8619cb0be495b814335a5aea23daca025484d3c6
Merge "Use OSLO jsonutils instead of json module"
Merge "python3: Transition to mox3 instead of mox"
python3: Use from future import unicode_literals

use  "from future import unicode_literals" instead of u""

To the road to Python3, a possible next step would be to use the from __future__ import unicode_literals
and remove the u'' prefixes, as it is not supported in Python3.

Change-Id: Ic7afb3cf2d8dfad47b8a1626ab264f6d4f50d00e
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Merge "Update oslo.config"
Merge "Sync py3kcompat from oslo-incubator"