'Select a suitable pool based on configured pools.'

def test_get_storage_pool_configured_pools(self):

    vol = VOLUME.copy()
    pool_type = 'dedup'
    self.conf.violin_dedup_only_pools = ['PoolA', 'PoolB']
    self.conf.violin_dedup_capable_pools = ['PoolC', 'PoolD']
    selected_pool = {'dedup': True, 'storage_pool': 'PoolA', 'storage_pool_id': 123, 'thin': True}
    conf = {'pool.select_storage_pool.return_value': selected_pool}
    self.driver.vmem_mg = self.setup_mock_concerto(m_conf=conf)
    self.driver._get_violin_extra_spec = mock.Mock(return_value='StoragePoolA')
    result = self.driver._get_storage_pool(vol, 100, pool_type, 'create_lun')
    self.assertEqual(result, selected_pool)
    self.driver.vmem_mg.pool.select_storage_pool.assert_called_with(100, pool_type, None, self.conf.violin_dedup_only_pools, self.conf.violin_dedup_capable_pools, 'random', 'create_lun')
