Port API types extra specs to Python 3
* Replace dict.iteritems() with dict.items(). The iteritems() method of dictionaries was removed in Python 3. * Add cinder.tests.unit.api.contrib tests to tests-py3.txt: - test_availability_zones - test_capabilities - test_extended_snapshot_attributes - test_hosts - test_qos_specs_manage - test_quotas - test_quotas_classes - test_scheduler_stats - test_services - test_types_extra_specs - test_types_manage - test_used_limits Partial-Implements: blueprint cinder-python3 Change-Id: Ie3d2de456c34286cca0505f6125a1a723bd8ad8b
This commit is contained in:
parent
ad65824806
commit
08b6b23cad
@ -56,7 +56,7 @@ class VolumeTypeExtraSpecsController(wsgi.Controller):
|
||||
def _get_extra_specs(self, context, type_id):
|
||||
extra_specs = db.volume_type_extra_specs_get(context, type_id)
|
||||
specs_dict = {}
|
||||
for key, value in extra_specs.iteritems():
|
||||
for key, value in extra_specs.items():
|
||||
specs_dict[key] = value
|
||||
return dict(extra_specs=specs_dict)
|
||||
|
||||
|
@ -1,3 +1,15 @@
|
||||
cinder.tests.unit.api.contrib.test_availability_zones
|
||||
cinder.tests.unit.api.contrib.test_capabilities
|
||||
cinder.tests.unit.api.contrib.test_extended_snapshot_attributes
|
||||
cinder.tests.unit.api.contrib.test_hosts
|
||||
cinder.tests.unit.api.contrib.test_qos_specs_manage
|
||||
cinder.tests.unit.api.contrib.test_quotas
|
||||
cinder.tests.unit.api.contrib.test_quotas_classes
|
||||
cinder.tests.unit.api.contrib.test_scheduler_stats
|
||||
cinder.tests.unit.api.contrib.test_services
|
||||
cinder.tests.unit.api.contrib.test_types_extra_specs
|
||||
cinder.tests.unit.api.contrib.test_types_manage
|
||||
cinder.tests.unit.api.contrib.test_used_limits
|
||||
cinder.tests.unit.api.openstack.test_wsgi
|
||||
cinder.tests.unit.api.test_common
|
||||
cinder.tests.unit.api.test_extensions
|
||||
|
Loading…
Reference in New Issue
Block a user