puppet-cinder/spec/classes/cinder_volume_nfs_spec.rb
Donald Talton 91b1e26d70 Added NFS max use and oversub ratios
Added the ability to configure additional cinder options for allocating
the over-subscription ratio and for setting the max disk use ratio.

Change-Id: I5387563d5cc869e8be38c8d5a4d9c0d0fc3be469
2014-02-21 13:26:16 -08:00

44 lines
1.6 KiB
Ruby

require 'spec_helper'
describe 'cinder::volume::nfs' do
let :params do
{
:nfs_servers => ['10.10.10.10:/shares', '10.10.10.10:/shares2'],
:nfs_mount_options => 'vers=3',
:nfs_shares_config => '/etc/cinder/other_shares.conf',
:nfs_disk_util => 'du',
:nfs_sparsed_volumes => true,
:nfs_mount_point_base => '/cinder_mount_point',
:nfs_used_ratio => '0.95',
:nfs_oversub_ratio => '1.0',
}
end
describe 'nfs volume driver' do
it 'configures nfs volume driver' do
should contain_cinder_config('DEFAULT/volume_driver').with_value(
'cinder.volume.drivers.nfs.NfsDriver')
should contain_cinder_config('DEFAULT/nfs_shares_config').with_value(
'/etc/cinder/other_shares.conf')
should contain_cinder_config('DEFAULT/nfs_mount_options').with_value(
'vers=3')
should contain_cinder_config('DEFAULT/nfs_sparsed_volumes').with_value(
true)
should contain_cinder_config('DEFAULT/nfs_mount_point_base').with_value(
'/cinder_mount_point')
should contain_cinder_config('DEFAULT/nfs_disk_util').with_value(
'du')
should contain_cinder_config('DEFAULT/nfs_used_ratio').with_value(
'0.95')
should contain_cinder_config('DEFAULT/nfs_oversub_ratio').with_value(
'1.0')
should contain_file('/etc/cinder/other_shares.conf').with(
:content => "10.10.10.10:/shares\n10.10.10.10:/shares2",
:require => 'Package[cinder]',
:notify => 'Service[cinder-volume]'
)
end
end
end