3 describe 'cinder::volume::vmdk' do
7 :host_ip => '172.16.16.16',
8 :host_password => 'asdf',
9 :host_username => 'user'
13 let :optional_params do
15 :volume_folder => 'cinder-volume-folder',
16 :api_retry_count => 5,
17 :max_object_retrieval => 200,
18 :task_poll_interval => 10,
19 :image_transfer_timeout_secs => 3600,
20 :wsdl_location => 'http://127.0.0.1:8080/vmware/SDK/wsdl/vim25/vimService.wsdl'
24 it 'should configure vmdk driver in cinder.conf' do
25 should contain_cinder_config('DEFAULT/volume_driver').with_value('cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver')
26 should contain_cinder_config('DEFAULT/vmware_host_ip').with_value(params[:host_ip])
27 should contain_cinder_config('DEFAULT/vmware_host_username').with_value(params[:host_username])
28 should contain_cinder_config('DEFAULT/vmware_host_password').with_value(params[:host_password])
29 should contain_cinder_config('DEFAULT/vmware_volume_folder').with_value('cinder-volumes')
30 should contain_cinder_config('DEFAULT/vmware_api_retry_count').with_value(10)
31 should contain_cinder_config('DEFAULT/vmware_max_object_retrieval').with_value(100)
32 should contain_cinder_config('DEFAULT/vmware_task_poll_interval').with_value(5)
33 should contain_cinder_config('DEFAULT/vmware_image_transfer_timeout_secs').with_value(7200)
34 should_not contain_cinder_config('DEFAULT/vmware_wsdl_location')
37 it 'marks vmware_host_password as secret' do
38 should contain_cinder_config('DEFAULT/vmware_host_password').with_secret( true )
41 it 'installs vmdk python driver' do
42 should contain_package('python-suds').with(
47 context 'with optional parameters' do
49 params.merge!(optional_params)
52 it 'should configure vmdk driver in cinder.conf' do
53 should contain_cinder_config('DEFAULT/vmware_volume_folder').with_value(params[:volume_folder])
54 should contain_cinder_config('DEFAULT/vmware_api_retry_count').with_value(params[:api_retry_count])
55 should contain_cinder_config('DEFAULT/vmware_max_object_retrieval').with_value(params[:max_object_retrieval])
56 should contain_cinder_config('DEFAULT/vmware_task_poll_interval').with_value(params[:task_poll_interval])
57 should contain_cinder_config('DEFAULT/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs])
58 should contain_cinder_config('DEFAULT/vmware_wsdl_location').with_value(params[:wsdl_location])