Add-in some re-auth logic when using os_cache

When using os_cache for the auth_token, if username and password
are available when a token fails to validate/authenticate, attempt
a reauth behind the scenes.

The helper object for stashing the auth_token doesn't handle flushing
the cache.  This is valid behavior because the result would be the
same as if a bad username/password were issued (401 Unauthorized).

Fixes-bug: 1214658
Change-Id: I107fc999610bb7638cefcb5d195aeafdcd663ca6
Add shelve/unshelve/shelve-offload command

The "shelve" API, which powers off and snapshots a vm instance, has been
implemented by Nova-server side.
In addition, thare are two relational API "unshelve" and "shelveOffload".
This patch adds three commands for using these APIs.

Fixes bug #1231827

Change-Id: Ic2ad1bb537efb40a3155e9f3c7b63e09e82be7f1
py33: align the order of parameters for urlencode()

In Python 3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ across
Python runs.

In the test case, the fixed expecting string will not match the test
result, it is relying on the dict order.

This change transforms the input dict to a sequence of two-element list,
with fixed order, and update the related expecitng string.

Close-Bug #1231871

Change-Id: Ia998cdb6978fc024dd0d3c9bd161fbdebe68638a
assertEquals is deprecated, use assertEqual

Change-Id: I9b2aaed969b046e0203ffa0c7278dff206cb8cd2
py33: 'str' does not support the buffer interface

Binary I/O expects and produces bytes objects. If sys.stdout is
assigned to io.BytesIO, print() output it stdout by default, then
there will be "TypeError".

For this case, mock.patch() decorator can not work well casually.
So this patch just update the six.StringIO() for stdout/stderr.

Close-Bug #1229163

Change-Id: Ieb29ad0774c9b7f2b691628d753b210640baca8d
Updated from global requirements

Change-Id: I32fdd184ff2c38e5bcf2ade1a79d6d9278e72ba1
py33: sort dict for test_add_floating_ip_to_fixed

In Python 3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ across
Python runs.

Sort the list and update the expecting result.

Close-Bug #1233406

Change-Id: Ib747824dad340534d484797afb87b5e92200e426
Merge "py33: align the order of parameters for urlencode()"
Merge "assertEquals is deprecated, use assertEqual"
Merge "Add shelve/unshelve/shelve-offload command"
Merge "Add-in some re-auth logic when using os_cache"
Merge "Updated from global requirements"
Merge "py33: 'str' does not support the buffer interface"
Merge "py33: sort dict for test_add_floating_ip_to_fixed"