CLI image-update gives a wrong help on '--tags' param

The help message tells end user image-update interface accepts 'tags'
param and could be used to update tag of image [0], but actually it
could trigger an 400 exception [1] due to wrong PATCH calls, and the
correct way is to use image-tag-update interface [2] as designed.

[0] glance image-update <IMG_ID> --tags <TAG_VALUE>

[1] 400 Bad Request
    Invalid JSON pointer for this resource: '/tags/0'
        (HTTP 400)

[2] glance image-tag-update <IMG_ID> <TAG_VALUE>

Change-Id: Iaa8041779510192dc08f7b898b8a1beda29a6398
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Downgrade log message for http request failures

Downgrades the log message when an http request fails from error
to debug. The logging level changed in the http.py upgrade in
I09f70eee3e2777f52ce040296015d41649c2586a which effectively reverted
a similar fix commited in I6d0efb53d1e81adf309f7fa580ec5a8073a811c5.

We don't want to log at ERROR level because we already have an
exception raised and the caller can handle it if wants
to. However this error will appear regularly in the Nova logs
under normal behavior (say a client specifies an image which does
not exist) and there is no way of disabling only the glanceclient
error log. This results in a lot of noise in the nova log file.

Change-Id: Iec13bff439073a79cb24e9b22fd43603ae4e61b7
Fix indentation in tox.ini

Previously, a tab was used to indent a line with a block of code which
otherwise uses eight spaces, causing it to display strangely in text
editors which do not have tabstop=8 set.

TrivialFix

Change-Id: I99a432373beebac912df88e6685db26e738bf654
Import missing gettextutils._ in shell.py

Closes-Bug: #1355252

Change-Id: I3aef19235735b3b374b92985f142712cb0f37a35
Work toward Python 3.4 support and testing

Change-Id: I0498fcfdf9eee399e29de5b034fd6010682ca4b6
Merge "Fix indentation in tox.ini"
Fix v2 requests to non-bleeding edge servers

In the case where v2 requests are sent to a server which is not running
head of tree which includes the v2 metadef code some 404 cases need to
be handled to enable standard requests to complete.

This patch aslo improves fetching schemas -- they are now only
fetched as needed.

Change-Id: I8c871f11b909337bd7df19b77e606772dbc634b2
Closes-bug: #1367326
Merge "Import missing gettextutils._ in shell.py"
Merge "Work toward Python 3.4 support and testing"
Updated from global requirements

Change-Id: I6dc3b647b806b863418d4894f9abe535b3d40ac2
Merge "Fix v2 requests to non-bleeding edge servers"
Merge "Updated from global requirements"
Print traceback to stderr if --debug is set

This change allows easier debugging of client related issues, with a
full traceback printed out when an uncaught error occurs in the client.
Previously, it could be hard to find the portion of code raising an
exception, with just the message from the exception being displayed.

Previous behaviour (with a rather artificial client error being raised):

    $ glance --debug image-list
    Contrived exception

Behaviour after this patch:

    $ glance --debug image-list
    Traceback (most recent call last):
      File "/opt/stack/python-glanceclient/glanceclient/shell.py", line 590, in main
        args.func(client, args)
      File "/opt/stack/python-glanceclient/glanceclient/v1/shell.py", line 77, in do_image_list
        raise(Exception('Contrived exception'))
    Exception: Contrived exception
    Contrived exception

Change-Id: Id7b76b707e5fc16a0402dcb104ec40787e0ffbe2
Handle UnicodeDecodeError in log_http_response

Similar to commit dec9c9f35 and log_curl_request,
this ignores decoding errors when logging response
headers by passing errors='ignore' to safe_encode.

Change-Id: Ic915a7d8334e9473f300c9db670a3a8f5cda8976
Closes-Bug: #1369756
Update how tokens are redacted

Using SHA-1 to match how Nova and Swift redact their tokens.
Was discussed in the below thread:

http://lists.openstack.org/pipermail/openstack-dev/2014-September/045802.html

Here's what nova went with: https://review.openstack.org/#/c/99511/
swift seem to be following suit: https://review.openstack.org/#/c/99632/

Change-Id: I3045d6d9d2a13770f4022dbbd474b34eb1032f6e
Closes-bug: 1329301
Merge "Print traceback to stderr if --debug is set"
Merge "Update how tokens are redacted"
Merge "Downgrade log message for http request failures"
Merge "CLI image-update gives a wrong help on '--tags' param"
Remove runtime dependency on python-pbr.