
The following change adds the ability to configure the following options for backends and volumes: For dellsc_iscsi: + dell_sc_verify_cert For glusterfs: + glusterfs_backup_mount_point + glusterfs_backup_share For nfs: + nfs_mount_attempts For rbd: + rados_connect_timeout + rados_connection_interval + rados_connection_retries + rbd_store_chunk_size For glusterfs we are also removing the deprecated glusterfs_disk_util which was removed in Icehouse. Change-Id: I08dd7dbc9ad51d40a64a25119ca8692c068ca80c
72 lines
2.2 KiB
Ruby
72 lines
2.2 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'cinder::backend::glusterfs' do
|
|
|
|
shared_examples_for 'glusterfs volume driver' do
|
|
let(:title) {'mygluster'}
|
|
|
|
let :facts do
|
|
@default_facts.merge({})
|
|
end
|
|
|
|
let :params do
|
|
{
|
|
:glusterfs_shares => ['10.10.10.10:/volumes', '10.10.10.11:/volumes'],
|
|
:glusterfs_shares_config => '/etc/cinder/other_shares.conf',
|
|
:glusterfs_sparsed_volumes => true,
|
|
:glusterfs_mount_point_base => '/cinder_mount_point',
|
|
}
|
|
end
|
|
|
|
it 'configures glusterfs volume driver' do
|
|
is_expected.to contain_cinder_config('mygluster/volume_driver').with_value(
|
|
'cinder.volume.drivers.glusterfs.GlusterfsDriver')
|
|
is_expected.to contain_cinder_config('mygluster/glusterfs_backup_mount_point').with_value(
|
|
'<SERVICE DEFAULT>')
|
|
is_expected.to contain_cinder_config('mygluster/glusterfs_backup_share').with_value(
|
|
'<SERVICE DEFAULT>')
|
|
is_expected.to contain_cinder_config('mygluster/glusterfs_shares_config').with_value(
|
|
'/etc/cinder/other_shares.conf')
|
|
is_expected.to contain_cinder_config('mygluster/glusterfs_sparsed_volumes').with_value(
|
|
true)
|
|
is_expected.to contain_cinder_config('mygluster/glusterfs_mount_point_base').with_value(
|
|
'/cinder_mount_point')
|
|
is_expected.to contain_file('/etc/cinder/other_shares.conf').with(
|
|
:content => "10.10.10.10:/volumes\n10.10.10.11:/volumes\n",
|
|
:require => 'Package[cinder]',
|
|
:notify => 'Service[cinder-volume]'
|
|
)
|
|
end
|
|
|
|
context 'glusterfs backend with additional configuration' do
|
|
before do
|
|
params.merge!({:extra_options => {'mygluster/param1' => { 'value' => 'value1' }}})
|
|
end
|
|
|
|
it 'configure glusterfs backend with additional configuration' do
|
|
is_expected.to contain_cinder_config('mygluster/param1').with({
|
|
:value => 'value1'
|
|
})
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
context 'on Debian platforms' do
|
|
let :facts do
|
|
{ :osfamily => 'Debian' }
|
|
end
|
|
|
|
it_configures 'glusterfs volume driver'
|
|
end
|
|
|
|
context 'on RedHat platforms' do
|
|
let :facts do
|
|
{ :osfamily => 'RedHat' }
|
|
end
|
|
|
|
it_configures 'glusterfs volume driver'
|
|
end
|
|
|
|
end
|