import mock
from oslo_concurrency import processutils
+from six.moves import range
from cinder import exception
from cinder import test
expected_num_calls = 5
expected_calls = []
- for i in xrange(expected_num_calls):
+ for i in range(expected_num_calls):
expected_calls.append(mock.call(cmd_list, True))
self.assertEqual(expected_num_calls, run_ssh_mock.call_count)
"caller-%s", formatted_initiator_list)
LOG.debug("Lookup service:target list from "
"caller-%s", formatted_target_list)
- visible_targets = filter(lambda x: x in formatted_target_list,
- nsinfo)
- visible_initiators = filter(lambda x: x in
- formatted_initiator_list, nsinfo)
+ visible_targets = [x for x in nsinfo
+ if x in formatted_target_list]
+ visible_initiators = [x for x in nsinfo
+ if x in formatted_initiator_list]
if visible_targets:
LOG.debug("Filtered targets is: %s", visible_targets)
if len(wwn_str) != 16:
return wwn_str
else:
- return ':'.join(
+ return b':'.join(
[wwn_str[i:i + 2] for i in range(0, len(wwn_str), 2)])
@lockutils.synchronized('brcd', 'fcfabric-', True)
formatted_initiator_list)
LOG.debug("Lookup service:target list from caller-%s",
formatted_target_list)
- visible_targets = filter(lambda x: x in formatted_target_list,
- nsinfo)
- visible_initiators = filter(lambda x: x in
- formatted_initiator_list, nsinfo)
+ visible_targets = [x for x in nsinfo
+ if x in formatted_target_list]
+ visible_initiators = [x for x in nsinfo
+ if x in formatted_initiator_list]
if visible_targets:
LOG.debug("Filtered targets is: %s", visible_targets)
def __new__(class_, *args, **kwargs):
if not hasattr(class_, "_instance"):
- class_._instance = object.__new__(class_, *args, **kwargs)
+ class_._instance = object.__new__(class_)
return class_._instance
def __init__(self, **kwargs):
cinder.tests.unit.windows.test_windows_remotefs
cinder.tests.unit.windows.test_windows_utils
cinder.tests.unit.wsgi
+cinder.tests.unit.zonemanager.test_brcd_fc_san_lookup_service
+cinder.tests.unit.zonemanager.test_brcd_fc_zone_client_cli
+cinder.tests.unit.zonemanager.test_brcd_fc_zone_driver
+cinder.tests.unit.zonemanager.test_brcd_lookup_service
+cinder.tests.unit.zonemanager.test_cisco_fc_san_lookup_service
+cinder.tests.unit.zonemanager.test_cisco_fc_zone_client_cli
+cinder.tests.unit.zonemanager.test_cisco_fc_zone_driver
+cinder.tests.unit.zonemanager.test_cisco_lookup_service
+cinder.tests.unit.zonemanager.test_fc_zone_manager
+cinder.tests.unit.zonemanager.test_volume_driver