mock_volume_get.assert_called_with(self.context, vol['id'])
+ def test_retype_volume(self):
+ vol = tests_utils.create_volume(self.context)
+ new_type = 'fake'
+ diff = {}
+ host = 'fake_host'
+ retyped = self.volume.driver.retype(self.context, vol, new_type,
+ diff, host)
+ self.assertTrue(retyped)
+
def test_update_migrated_volume(self):
fake_volume_id = 'vol1'
fake_new_volume_id = 'vol2'
existing_ref = {"source-name": existing_ref}
return self.manage_existing(snapshot_temp, existing_ref)
+ def retype(self, context, volume, new_type, diff, host):
+ """Retypes a volume, allow QoS and extra_specs change."""
+
+ LOG.debug('LVM retype called for volume %s. No action '
+ 'required for LVM volumes.',
+ volume['id'])
+ return True
+
def migrate_volume(self, ctxt, volume, host, thin=False, mirror_count=0):
"""Optimize the migration if the destination is on the same server.