# Configure the base constants, defaults etc...
_m_client.configure_mock(**self.mock_client_conf)
+ _m_client.getWsApiVersion.return_value = self.wsapi_version_latest
+
# If m_conf, drop those over the top of the base_conf.
if m_conf is not None:
_m_client.configure_mock(**m_conf)
common,
self.volume,
self.connector)
+ # On Python 3, hash is randomized, and so set() is used to get
+ # the expected order
+ fcwwns = list(set(('123456789054321', '123456789012345')))
expected = [
mock.call.getVolume('osv-0DM4qZEVSKON-DXN-NwVpw'),
mock.call.getCPG(HPE3PAR_CPG),
mock.call.getHost('fakehost'),
- mock.call.modifyHost(
- 'fakehost', {
- 'FCWWNs': ['123456789012345', '123456789054321'],
- 'pathOperation': 1}),
+ mock.call.modifyHost('fakehost',
+ {'FCWWNs': fcwwns,
+ 'pathOperation': 1}),
mock.call.getHost('fakehost')]
mock_client.assert_has_calls(expected)
"""
import ast
-import base64
import json
import math
import pprint
import six
import uuid
+from oslo_serialization import base64
from oslo_utils import importutils
hpe3parclient = importutils.try_import("hpe3parclient")
2.0.53 - Fix volume size conversion. bug #1513158
3.0.0 - Rebranded HP to HPE.
3.0.1 - Fixed find_existing_vluns bug #1515033
+ 3.0.2 - Python 3 support
"""
- VERSION = "3.0.1"
+ VERSION = "3.0.2"
stats = {}
def _encode_name(self, name):
uuid_str = name.replace("-", "")
vol_uuid = uuid.UUID('urn:uuid:%s' % uuid_str)
- vol_encoded = base64.b64encode(vol_uuid.bytes)
+ vol_encoded = base64.encode_as_text(vol_uuid.bytes)
# 3par doesn't allow +, nor /
vol_encoded = vol_encoded.replace('+', '.')
2.0.22 - Update driver to use ABC metaclasses
2.0.23 - Added update_migrated_volume. bug # 1492023
3.0.0 - Rebranded HP to HPE.
+ 3.0.1 - Python 3 support
"""
- VERSION = "3.0.0"
+ VERSION = "3.0.1"
def __init__(self, *args, **kwargs):
super(HPE3PARISCSIDriver, self).__init__(*args, **kwargs)
nsp_counts[nsp] = nsp_counts[nsp] + 1
# identify key (nsp) of least used nsp
- current_smallest_count = sys.maxint
+ current_smallest_count = sys.maxsize
for (nsp, count) in nsp_counts.items():
if count < current_smallest_count:
current_least_used_nsp = nsp
cinder.tests.unit.test_hitachi_hnas_backend
cinder.tests.unit.test_hitachi_hnas_iscsi
cinder.tests.unit.test_hitachi_hnas_nfs
+cinder.tests.unit.test_hpe3par
cinder.tests.unit.test_hp_xp_fc
cinder.tests.unit.test_hplefthand
cinder.tests.unit.test_huawei_drivers