Sync apiclient and py3kcompat from oslo

In the process of unification of the clients code we should
reuse common functionality from Oslo.

Related to blueprint common-client-library-2

Change-Id: If261bce6f2f7676484594c45970d6dd8e676ca79
Reuse Resource from oslo

In the process of unification of the clients code we should
reuse common functionality from Oslo.

Related to blueprint common-client-library-2

Change-Id: I3d82621cced57ad7bc14a2a40e4bef7522f233da
Python 3: use six.iteritems() instead of iteritems()

six.iteritems() replaces dictionary.iteritems() on Python 2 and
dictionary.items() on Python 3.

Change-Id: Ie5efa65c0a992e8136087a7b78ab8e8ce967326e
Python3: use six.StringIO rather than StringIO.StringIO

It’s an alias for StringIO.StringIO in Python 2 and
io.StringIO in Python 3.

Change-Id: I1c2f1412c586d5d8e0aa866a28232747056e0ca7
Python3: use six.StringIO rather than StringIO.StringIO

It’s an alias for StringIO.StringIO in Python 2 and
io.StringIO in Python 3.

Change-Id: I5316eaffa2d9d2d5679b85a901933ef0fbfcc2f7
Merge "Sync apiclient and py3kcompat from oslo"
Merge "Reuse Resource from oslo"
Merge "Python 3: use six.iteritems() instead of iteritems()"
Merge "Python3: use six.StringIO rather than StringIO.StringIO"
Merge "Python3: use six.StringIO rather than StringIO.StringIO"