Merge "Retype functionality in Tintri driver"

This commit is contained in:
Jenkins 2015-12-11 03:20:39 +00:00 committed by Gerrit Code Review
commit 7b15095907
2 changed files with 14 additions and 0 deletions

View File

@ -245,3 +245,9 @@ class TintriDriverTestCase(test.TestCase):
volume = fake_volume.fake_volume_obj(self.context)
volume.provider_location = self._provider_location
self._driver.unmanage(volume)
def test_retype(self):
volume = fake_volume.fake_volume_obj(self.context)
retype, update = self._driver.retype(None, volume, None, None, None)
self.assertTrue(retype)
self.assertIsNone(update)

View File

@ -704,6 +704,14 @@ class TintriDriver(driver.ManageableVD,
raise exception.ManageExistingInvalidReference(
existing_ref=vol_ref, reason=_('Volume not found.'))
def retype(self, context, volume, new_type, diff, host):
"""Retype from one volume type to another.
At this point Tintri VMstore does not differentiate between
volume types on the same array. This is a no-op for us.
"""
return True, None
class TClient(object):
"""REST client for Tintri storage."""