code
stringlengths
3
6.57k
self.assertEqual((None, [])
self.driver.client.find_available_qos(qos)
self.assertEqual(("11", u'["0", "1", "2"]')
self.driver.create_volume(self.hyper_volume)
self.assertEqual(metadata, lun_info['metadata'])
ddt.data(FAKE_POOLS_UNSUPPORT_REPORT, FAKE_POOLS_SUPPORT_REPORT)
mock.patch.object(rest_client.RestClient, 'delete_lun')
self.driver.client.login()
mock_delete_lun.assert_called_with('1')
self.driver.client.login()
self.driver.metro.create_hypermetro('2', param)
self.assertEqual(FAKE_FIND_POOL_RESPONSE['ID'], lun_PARENTID)
test_hypermetro_none_map_info_fail(self, mock_metadata)
ddt.data(FAKE_POOLS_UNSUPPORT_REPORT, FAKE_POOLS_SUPPORT_REPORT)
self.driver.delete_volume(self.hyper_volume)
ddt.data(FAKE_POOLS_UNSUPPORT_REPORT, FAKE_POOLS_SUPPORT_REPORT)
mock.patch.object(rest_client.RestClient, 'delete_hypermetro')
mock_delete_lun.assert_called_with('11')
test_manage_existing_get_size_invalid_reference(self)
mock.patch.object(rest_client.RestClient, 'get_lun_info')
self.assertEqual(2, size)
self.assertIsNotNone(re.search('LUN status is not normal', ex.msg)
ddt.data(FAKE_POOLS_UNSUPPORT_REPORT, FAKE_POOLS_SUPPORT_REPORT)
self.assertIsNotNone(re.search('HyperMetroPair', ex.msg)
ddt.data(FAKE_POOLS_UNSUPPORT_REPORT, FAKE_POOLS_SUPPORT_REPORT)
mock.patch.object(rest_client.RestClient, 'get_hypermetro_pairs')
mock.patch.object(rest_client.RestClient, 'rename_lun')
exception.VolumeBackendAPIException(data='err')
self.assertEqual(expected_val, model_update)
self.assertIsNotNone(re.search('SplitMirror', ex.msg)
self.assertIsNotNone(re.search('migration', ex.msg)
mock.patch.object(rest_client.RestClient, 'rename_lun')
self.assertEqual(expected_val, model_update)
test_unmanage(self)
self.driver.unmanage(self.volume)
test_manage_existing_snapshot_abnormal(self)
mock.patch.object(rest_client.RestClient, 'rename_snapshot')
self.assertEqual({'provider_location': 'ID1'}, model_update)
self.assertEqual({'provider_location': 'ID1'}, model_update)
self.assertEqual(2, size)
self.assertEqual(2, size)
self.assertEqual(2, size)
test_unmanage_snapshot(self)
self.driver.unmanage_snapshot(self.snapshot)
ddt.data(sync_replica_specs, async_replica_specs)
test_create_replication_success(self, mock_type)
self.mock_object(replication.ReplicaCommonDriver, 'sync')
self.driver.create_volume(self.replica_volume)
replication.to_string(driver_data)
self.assertEqual(driver_data, model_update['replication_driver_data'])
self.assertEqual('available', model_update['replication_status'])
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
mock.Mock(return_value={})
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
mock.Mock(return_value={})
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
exception.VolumeBackendAPIException(data='err')
self.mock_object(replication.ReplicaPairManager, '_delete_pair')
self.mock_object(mock_module, mock_func, mock_value)
ddt.data(FAKE_POOLS_UNSUPPORT_REPORT, FAKE_POOLS_SUPPORT_REPORT)
test_delete_replication_success(self, pool_data)
self.mock_object(replication.ReplicaCommonDriver, 'split')
self.driver.delete_volume(self.replica_volume)
self.driver.delete_volume(self.replica_volume)
unittest.skip("Skip until bug #1578986 is fixed")
test_wait_volume_online(self)
replica.wait_volume_online(self.driver.client, lun_info)
replica.wait_volume_online(self.driver.client, lun_info)
unittest.skip("Skip until bug #1578986 is fixed")
test_wait_second_access(self)
replication.PairOp(self.driver.client)
replication.ReplicaCommonDriver(self.configuration, op)
common_driver.wait_second_access(pair_id, access_ro)
unittest.skip("Skip until bug #1578986 is fixed")
test_wait_replica_ready(self)
replication.PairOp(self.driver.client)
replication.ReplicaCommonDriver(self.configuration, op)
common_driver.wait_replica_ready(pair_id)
common_driver.wait_replica_ready(pair_id)
test_failover_to_current(self)
FakeISCSIStorage(configuration=self.configuration)
driver.do_setup()
self.assertIn(driver.active_backend_id, ('', None)
self.assertEqual(old_client, driver.client)
self.assertEqual(old_replica_client, driver.replica_client)
self.assertEqual(old_replica, driver.replica)
self.assertEqual('default', secondary_id)
self.assertEqual(0, len(volumes_update)
test_failover_normal_volumes(self)
FakeISCSIStorage(configuration=self.configuration)
driver.do_setup()
self.assertEqual(REPLICA_BACKEND_ID, driver.active_backend_id)
self.assertEqual(old_client, driver.replica_client)
self.assertEqual(old_replica_client, driver.client)