Merge "Implement retype for Pure drivers"
This commit is contained in:
commit
04cdaa0ede
@ -1028,6 +1028,12 @@ class PureBaseVolumeDriverTestCase(PureDriverTestCase):
|
||||
self.array.rename_volume.assert_called_with(vol_name,
|
||||
unmanaged_vol_name)
|
||||
|
||||
def test_retype(self):
|
||||
# Ensure that we return true no matter what the inputs are
|
||||
retyped, update = self.driver.retype(None, None, None, None, None)
|
||||
self.assertTrue(retyped)
|
||||
self.assertIsNone(update)
|
||||
|
||||
|
||||
class PureISCSIDriverTestCase(PureDriverTestCase):
|
||||
|
||||
|
@ -605,6 +605,15 @@ class PureBaseVolumeDriver(san.SanDriver):
|
||||
|
||||
return connection
|
||||
|
||||
def retype(self, context, volume, new_type, diff, host):
|
||||
"""Retype from one volume type to another on the same backend.
|
||||
|
||||
For a Pure Array there is currently no differentiation between types
|
||||
of volumes. This means that changing from one type to another on the
|
||||
same array should be a no-op.
|
||||
"""
|
||||
return True, None
|
||||
|
||||
|
||||
class PureISCSIDriver(PureBaseVolumeDriver, san.SanISCSIDriver):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user