Merge "INFINIDAT: change create_child to create_snapshot"
This commit is contained in:
commit
597b49961d
@ -106,7 +106,7 @@ class InfiniboxDriverTestCaseBase(test.TestCase):
|
||||
self._mock_volume.get_size.return_value = 1 * units.Gi
|
||||
self._mock_volume.has_children.return_value = False
|
||||
self._mock_volume.get_logical_units.return_value = []
|
||||
self._mock_volume.create_child.return_value = self._mock_volume
|
||||
self._mock_volume.create_snapshot.return_value = self._mock_volume
|
||||
self._mock_host = mock.Mock()
|
||||
self._mock_host.get_luns.return_value = []
|
||||
self._mock_host.map_volume().get_lun.return_value = 1
|
||||
@ -340,7 +340,7 @@ class InfiniboxDriverTestCase(InfiniboxDriverTestCaseBase):
|
||||
test_clone, test_snapshot)
|
||||
|
||||
def test_create_volume_from_snapshot_create_fails(self):
|
||||
self._mock_volume.create_child.side_effect = self._raise_infinisdk
|
||||
self._mock_volume.create_snapshot.side_effect = self._raise_infinisdk
|
||||
self.assertRaises(exception.VolumeBackendAPIException,
|
||||
self.driver.create_volume_from_snapshot,
|
||||
test_clone, test_snapshot)
|
||||
|
@ -602,7 +602,7 @@ class InfiniboxVolumeDriver(san.SanISCSIDriver):
|
||||
"""
|
||||
infinidat_snapshot = self._get_infinidat_snapshot(snapshot)
|
||||
clone_name = self._make_volume_name(volume) + '-internal'
|
||||
infinidat_clone = infinidat_snapshot.create_child(name=clone_name)
|
||||
infinidat_clone = infinidat_snapshot.create_snapshot(name=clone_name)
|
||||
# we need a cinder-volume-like object to map the clone by name
|
||||
# (which is derived from the cinder id) but the clone is internal
|
||||
# so there is no such object. mock one
|
||||
|
Loading…
x
Reference in New Issue
Block a user