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: I12fda5f20d2f4fe8227e45b2fe46b332f63deb97
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"
Merge "Python 3: use six.iteritems() instead of iteritems()"
Python 3: use six.iteritems and six.string_types

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

six.string_types replaces basestring() in Python 2 and str
in Python 3.

Change-Id: Ia18510d167df35caec83626718010228e2140bc0