mock_client = self.setup_driver()
mock_client.getVolumeByName.return_value = {'id': self.volume_id}
+ mock_client.cloneVolume.return_value = {
+ 'iscsiIqn': self.connector['initiator']}
with mock.patch.object(hp_lefthand_rest_proxy.HPLeftHandRESTProxy,
'_create_client') as mock_do_setup:
mock_do_setup.return_value = mock_client
# execute create_cloned_volume
- self.driver.create_cloned_volume(
+ model_update = self.driver.create_cloned_volume(
self.cloned_volume, self.volume)
+ expected_iqn = 'iqn.1993-08.org.debian:01:222 0'
+ expected_location = "10.0.1.6:3260,1 %s" % expected_iqn
+ self.assertEqual(expected_location,
+ model_update['provider_location'])
+
expected = self.driver_startup_call_stack + [
mock.call.getVolumeByName('fakevolume'),
mock.call.cloneVolume('clone_volume', 1),
1.0.6 - Removing locks bug #1395953
1.0.7 - Fixed bug #1353137, Server was not removed from the HP
Lefthand backend after the last volume was detached.
+ 1.0.8 - Fixed bug #1418201, A cloned volume fails to attach.
"""
- VERSION = "1.0.7"
+ VERSION = "1.0.8"
device_stats = {}
client = self._login()
try:
volume_info = client.getVolumeByName(src_vref['name'])
- client.cloneVolume(volume['name'], volume_info['id'])
+ clone_info = client.cloneVolume(volume['name'], volume_info['id'])
+ return self._update_provider(clone_info)
except Exception as ex:
raise exception.VolumeBackendAPIException(ex)
finally: