* Replace func.func_name with func.__name__: the func_name attribute
was removed in Python 3, whereas the __name__ attribute exists on
Python 2 and Python 3
* Create INITIATOR_TARGET_MAP using list(set()) to get the same order
than the tested code. The exact order is not reliable, it depends
on the hash function which is now randomized by default on
Python 3. The hash function is also different between Python 2.7
and 3.4.
* tox.ini: add test_pure to Python 3.4
Blueprint cinder-python3
Change-Id: I78601278259f1d34ad6ac3458d2dd0a3aca9d77a
TARGET_PORT = "3260"
INITIATOR_TARGET_MAP =\
{
- '5001500150015081': ['21000024ff59fe93',
- '21000024ff59fe92',
- '21000024ff59fe91',
- '21000024ff59fe94'],
+ # _build_initiator_target_map() calls list(set()) on the list,
+ # we must also call list(set()) to get the exact same order
+ '5001500150015081': list(set(FC_WWNS)),
}
DEVICE_MAPPING =\
{
def wrapper(*args, **kwargs):
cls_name = args[0].__class__.__name__
method_name = "%(cls_name)s.%(method)s" % {"cls_name": cls_name,
- "method": f.func_name}
+ "method": f.__name__}
LOG.debug("Enter " + method_name)
result = f(*args, **kwargs)
LOG.debug("Leave " + method_name)
cinder.tests.unit.test_netapp_nfs \
cinder.tests.unit.test_nfs \
cinder.tests.unit.test_nimble \
+ cinder.tests.unit.test_pure \
cinder.tests.unit.test_qos_specs \
cinder.tests.unit.test_quota \
cinder.tests.unit.test_rbd \