]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Port API contribs to Python 3
authorVictor Stinner <vstinner@redhat.com>
Tue, 9 Feb 2016 17:40:21 +0000 (18:40 +0100)
committerVictor Stinner <vstinner@redhat.com>
Mon, 15 Feb 2016 14:13:58 +0000 (15:13 +0100)
commitebf00a5de541bb5d51996f065db17c27b9a0bc70
tree65cd9f76b539913c126d4dcf5fec267377825688
parentce018c91b160ac7967ca40a3d055ce9a8bccf7ec
Port API contribs to Python 3

* Replace dict.iteritems() with dict.items(), dict.iteritems() was
  removed in Python 3.
* Replace dict.values() with list(dict.values()) to get a list on
  Python 3.
* HTTP body type must be bytes:

  - Fix unit tests to use bytes strings for HTTP body
  - Encode XML to UTF-8 on Python 3.

* Use "%r" instead of "%s" to format request and response in test to
  avoid BytesWarning on Python 3.
* tests-py3.txt: add cinder.tests.unit.api.contrib

Partial-Implements: blueprint cinder-python3
Change-Id: I65e412b2897635db5c8dfe13d61e71c52e0603e7
cinder/api/contrib/volume_actions.py
cinder/api/contrib/volume_type_encryption.py
cinder/tests/unit/api/contrib/test_backups.py
cinder/tests/unit/api/contrib/test_volume_image_metadata.py
cinder/tests/unit/api/contrib/test_volume_replication.py
cinder/tests/unit/api/contrib/test_volume_transfer.py
cinder/tests/unit/api/contrib/test_volume_type_access.py
cinder/tests/unit/api/contrib/test_volume_type_encryption.py
tests-py3.txt