Merge "Add migrate_volume to BaseVD"
This commit is contained in:
commit
fc84c1b62d
@ -1792,3 +1792,16 @@ class GlusterFsDriverTestCase(test.TestCase):
|
|||||||
mock_upload_volume.assert_called_once_with(
|
mock_upload_volume.assert_called_once_with(
|
||||||
mock.ANY, mock.ANY, mock.ANY, upload_path)
|
mock.ANY, mock.ANY, mock.ANY, upload_path)
|
||||||
self.assertEqual(1, mock_create_temporary_file.call_count)
|
self.assertEqual(1, mock_create_temporary_file.call_count)
|
||||||
|
|
||||||
|
def test_migrate_volume_is_there(self):
|
||||||
|
"""Ensure that driver.migrate_volume() is there."""
|
||||||
|
|
||||||
|
drv = self._driver
|
||||||
|
|
||||||
|
ctxt = context.RequestContext('fake_user', 'fake_project')
|
||||||
|
volume = self._simple_volume()
|
||||||
|
ret = drv.migrate_volume(ctxt,
|
||||||
|
volume,
|
||||||
|
mock.sentinel.host)
|
||||||
|
|
||||||
|
self.assertEqual((False, None), ret)
|
||||||
|
@ -1400,6 +1400,14 @@ class BaseVD(object):
|
|||||||
"""
|
"""
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
def migrate_volume(self, context, volume, host):
|
||||||
|
"""Migrate volume stub.
|
||||||
|
|
||||||
|
This is for drivers that don't implement an enhanced version
|
||||||
|
of this operation.
|
||||||
|
"""
|
||||||
|
return (False, None)
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class LocalVD(object):
|
class LocalVD(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user