Currently, only drivers that inherit from ManageableVD
get the default unmanage() implementation.
This is not correct, because drivers can support unmanage
without driver code. Fix unmanage() in VolumeDriver to
support the LVM driver's unmanage operation.
(Regression from the refactoring done when introducing
abc classes.)
Closes-Bug: #
1493544
Change-Id: Iaacf10141559a2c88b5873722d1e237dc9223f27
self.volume.driver.manage_existing_snapshot_get_size,
snp, ref)
+ def test_lvm_unmanage(self):
+ volume = tests_utils.create_volume(self.context, status='available',
+ size=1, host=CONF.host)
+ ret = self.volume.driver.unmanage(volume)
+ self.assertEqual(ret, None)
+
class LVMVolumeDriverTestCase(DriverTestCase):
"""Test case for VolumeDriver"""
raise NotImplementedError(msg)
def unmanage(self, volume):
- msg = _("Unmanage volume not implemented.")
- raise NotImplementedError(msg)
+ pass
def manage_existing_snapshot(self, snapshot, existing_ref):
msg = _("Manage existing snapshot not implemented.")