diff --git a/cinder/tests/unit/test_hitachi_hnas_iscsi.py b/cinder/tests/unit/test_hitachi_hnas_iscsi.py index 8a22ac86740..b980bd508a6 100644 --- a/cinder/tests/unit/test_hitachi_hnas_iscsi.py +++ b/cinder/tests/unit/test_hitachi_hnas_iscsi.py @@ -415,6 +415,7 @@ class HNASiSCSIDriverTest(test.TestCase): vol = self._create_volume() conn = self.driver.initialize_connection(vol, connector) self.assertTrue('3260' in conn['data']['target_portal']) + self.assertTrue(type(conn['data']['target_lun']) is int) self.backend.add_iscsi_conn = mock.MagicMock() self.backend.add_iscsi_conn.side_effect = putils.ProcessExecutionError diff --git a/cinder/volume/drivers/hitachi/hnas_iscsi.py b/cinder/volume/drivers/hitachi/hnas_iscsi.py index 43c10f3228a..418e9450df3 100644 --- a/cinder/volume/drivers/hitachi/hnas_iscsi.py +++ b/cinder/volume/drivers/hitachi/hnas_iscsi.py @@ -36,7 +36,7 @@ from cinder.volume.drivers.hitachi import hnas_backend from cinder.volume import utils from cinder.volume import volume_types -HDS_HNAS_ISCSI_VERSION = '4.1.0' +HDS_HNAS_ISCSI_VERSION = '4.3.0' LOG = logging.getLogger(__name__) @@ -174,6 +174,8 @@ class HDSISCSIDriver(driver.ISCSIDriver): Version 3.3.0: Fixed iSCSI target limitation error Version 4.0.0: Added manage/unmanage features Version 4.1.0: Fixed XML parser checks on blank options + Version 4.2.0: Fixed SSH and cluster_admin_ip0 verification + Version 4.3.0: Fixed attachment with os-brick 1.0.0 """ def __init__(self, *args, **kwargs): @@ -701,7 +703,7 @@ class HDSISCSIDriver(driver.ISCSIDriver): properties['target_discovered'] = False properties['target_portal'] = hnas_portal properties['target_iqn'] = fulliqn - properties['target_lun'] = hlun + properties['target_lun'] = int(hlun) properties['volume_id'] = volume['id'] properties['auth_username'] = connector['initiator']