Port vmware datastore to Python 3
* _filter_datastores(): replace filter() with list comprehension to get a list on Python 3. * tox.ini: add test_vmware_datastore to Python 3.4. Partial-Implements: blueprint cinder-python3 Change-Id: Ide4e4adf012e155b99b528ddde937df1a48a079b
This commit is contained in:
parent
91f1881440
commit
5a87c0726b
@ -113,12 +113,10 @@ class DatastoreSelector(object):
|
||||
filtered_summaries = [self._vops.get_summary(ds) for ds in
|
||||
filtered_datastores]
|
||||
|
||||
def _filter(summary):
|
||||
return (summary.freeSpace > size_bytes and
|
||||
return [summary for summary in filtered_summaries
|
||||
if (summary.freeSpace > size_bytes and
|
||||
(hard_affinity_ds_types is None or
|
||||
summary.type.lower() in hard_affinity_ds_types))
|
||||
|
||||
return filter(_filter, filtered_summaries)
|
||||
summary.type.lower() in hard_affinity_ds_types))]
|
||||
|
||||
def _get_all_hosts(self):
|
||||
"""Get all ESX hosts managed by vCenter."""
|
||||
|
@ -107,6 +107,7 @@ cinder.tests.unit.test_v6000_fcp
|
||||
cinder.tests.unit.test_v6000_iscsi
|
||||
cinder.tests.unit.test_v7000_common
|
||||
cinder.tests.unit.test_v7000_fcp
|
||||
cinder.tests.unit.test_vmware_datastore
|
||||
cinder.tests.unit.test_vmware_vmdk
|
||||
cinder.tests.unit.test_vmware_volumeops
|
||||
cinder.tests.unit.test_volume
|
||||
|
Loading…
x
Reference in New Issue
Block a user