'display_name': 'vol2',
'consistencygroup_id': None,
'display_description': 'test volume',
- 'volume_type_id': None}
+ 'volume_type_id': None,
+ 'provider_location': 'system^FNM11111|type^lun|id^1|version^05.03.00',
+ 'volume_metadata': [{'key': 'lun_type', 'value': 'lun'}]}
volume_in_cg = {
'name': 'vol2',
'volume_id': '1'}
self.assertEqual(expected_info, connect_info)
+ def test_update_migrated_volume(self):
+ self.driverSetup()
+ expected_update = {'metadata': {'lun_type': 'lun'}}
+ model_update = self.driver.update_migrated_volume(
+ None, self.testData.test_volume,
+ self.testData.test_volume2, 'available')
+ self.assertDictMatch(expected_update, model_update)
+
class EMCVNXCLIDArrayBasedDriverTestCase(DriverTestCaseBase):
def setUp(self):
cgsnapshot,
snapshots)
- def update_migrated_volume(self, context, volume, new_volume):
+ def update_migrated_volume(self, context, volume, new_volume,
+ original_volume_status=None):
"""Returns model update for migrated volume."""
- return self.cli.update_migrated_volume(context, volume, new_volume)
+ return self.cli.update_migrated_volume(context, volume, new_volume,
+ original_volume_status)
def create_export_snapshot(self, context, snapshot, connector):
"""Creates a snapshot mount point for snapshot."""
cgsnapshot,
snapshots)
- def update_migrated_volume(self, context, volume, new_volume):
+ def update_migrated_volume(self, context, volume, new_volume,
+ original_volume_status=None):
"""Returns model update for migrated volume."""
- return self.cli.update_migrated_volume(context, volume, new_volume)
+ return self.cli.update_migrated_volume(context, volume, new_volume,
+ original_volume_status)
def create_export_snapshot(self, context, snapshot, connector):
"""Creates a snapshot mount point for snapshot."""
'metadata': volume_metadata}
return moved, model_update
- def update_migrated_volume(self, context, volume, new_volume):
+ def update_migrated_volume(self, context, volume, new_volume,
+ original_volume_status):
lun_type = self._extract_provider_location_for_lun(
new_volume['provider_location'], 'type')
volume_metadata = self._get_volume_metadata(volume)