]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Port ceph driver to Python 3
authorVictor Stinner <vstinner@redhat.com>
Wed, 7 Oct 2015 16:07:38 +0000 (18:07 +0200)
committerVictor Stinner <vstinner@redhat.com>
Thu, 8 Oct 2015 20:45:53 +0000 (22:45 +0200)
commitaebf52528babffd559642b8b77ee1589a3b5de93
treeba98b6a6d7d403dbc9c909dfde6938305ed678aa
parent8c455a9f1ee7bba60e83862d191de795368a4493
Port ceph driver to Python 3

* Replace xrange() with range(). cinder/volume/utils.py uses
  "from six.moves import range", so "range" is xrange on Python 2.
* Replace '' with b'' for image content to get a bytes string on
  Python 3.

Note: _transfer_data() of cinder.volume.utils is tested by
test_backup_ceph which is already run on Python 3, but the test only
failed with python3 run with -bb. This bug is now fixed.

Partial-Implements: blueprint cinder-python3
Change-Id: Ib69b9ee4669d3b627747c754b1bda1994f0ed2a5
cinder/backup/drivers/ceph.py
cinder/tests/unit/test_rbd.py
cinder/volume/drivers/rbd.py
cinder/volume/utils.py