from cinder.openstack.common import units
from cinder import test
from cinder.tests import fake_hp_3par_client as hp3parclient
+from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
from cinder.volume.drivers.san.hp import hp_3par_fc as hpfcdriver
from cinder.volume.drivers.san.hp import hp_3par_iscsi as hpdriver
from cinder.volume import qos_specs
mock_client.assert_has_calls(expected)
+ def test__safe_hostname(self):
+ long_hostname = "abc123abc123abc123abc123abc123abc123"
+ fixed_hostname = "abc123abc123abc123abc123abc123a"
+ common = hpcommon.HP3PARCommon(None)
+ safe_host = common._safe_hostname(long_hostname)
+ self.assertEqual(fixed_hostname, safe_host)
+
class TestHP3PARFCDriver(HP3PARBaseDriver, test.TestCase):
2.0.20 - Configurable SSH missing key policy and known hosts file
2.0.21 - Remove bogus invalid snapCPG=None exception
2.0.22 - HP 3PAR drivers should not claim to have 'infinite' space
+ 2.0.23 - Increase the hostname size from 23 to 31 Bug #1371242
"""
- VERSION = "2.0.22"
+ VERSION = "2.0.23"
stats = {}
index = len(hostname)
# we'll just chop this off for now.
- if index > 23:
- index = 23
+ if index > 31:
+ index = 31
return hostname[:index]