Merge "Add manage_existing and unmanage to BaseVD"
This commit is contained in:
commit
57bf48aecb
|
@ -1828,3 +1828,24 @@ class GlusterFsDriverTestCase(test.TestCase):
|
|||
mock.sentinel.host)
|
||||
|
||||
self.assertEqual((False, None), ret)
|
||||
|
||||
def test_manage_existing_is_there(self):
|
||||
"""Ensure that driver.manage_existing() is there."""
|
||||
|
||||
drv = self._driver
|
||||
|
||||
volume = self._simple_volume(id=mock.sentinel.manage_id)
|
||||
|
||||
self.assertRaises(NotImplementedError,
|
||||
drv.manage_existing,
|
||||
volume, mock.sentinel.existing_ref)
|
||||
|
||||
def test_unmanage_is_there(self):
|
||||
"""Ensure that driver.unmanage() is there."""
|
||||
|
||||
drv = self._driver
|
||||
|
||||
volume = self._simple_volume(id=mock.sentinel.unmanage_id)
|
||||
self.assertRaises(NotImplementedError,
|
||||
drv.unmanage,
|
||||
volume)
|
||||
|
|
|
@ -1406,6 +1406,22 @@ class BaseVD(object):
|
|||
"""
|
||||
return (False, None)
|
||||
|
||||
def manage_existing(self, volume, existing_ref):
|
||||
"""Manage exiting stub.
|
||||
|
||||
This is for drivers that don't implement manage_existing().
|
||||
"""
|
||||
msg = _("Manage existing volume not implemented.")
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
def unmanage(self, volume):
|
||||
"""Unmanage stub.
|
||||
|
||||
This is for drivers that don't implement unmanage().
|
||||
"""
|
||||
msg = _("Unmanage volume not implemented.")
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class LocalVD(object):
|
||||
|
|
Loading…
Reference in New Issue