3 describe 'cinder::backend::vmdk' do
5 let(:title) { 'hippo' }
9 :host_ip => '172.16.16.16',
10 :host_password => 'asdf',
11 :host_username => 'user'
15 let :optional_params do
17 :volume_folder => 'cinder-volume-folder',
18 :api_retry_count => 5,
19 :max_object_retrieval => 200,
20 :task_poll_interval => 10,
21 :image_transfer_timeout_secs => 3600,
22 :wsdl_location => 'http://127.0.0.1:8080/vmware/SDK/wsdl/vim25/vimService.wsdl'
26 it 'should configure vmdk driver in cinder.conf' do
27 should contain_cinder_config('hippo/volume_backend_name').with_value('hippo')
28 should contain_cinder_config('hippo/volume_driver').with_value('cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver')
29 should contain_cinder_config('hippo/vmware_host_ip').with_value(params[:host_ip])
30 should contain_cinder_config('hippo/vmware_host_username').with_value(params[:host_username])
31 should contain_cinder_config('hippo/vmware_host_password').with_value(params[:host_password])
32 should contain_cinder_config('hippo/vmware_volume_folder').with_value('cinder-volumes')
33 should contain_cinder_config('hippo/vmware_api_retry_count').with_value(10)
34 should contain_cinder_config('hippo/vmware_max_object_retrieval').with_value(100)
35 should contain_cinder_config('hippo/vmware_task_poll_interval').with_value(5)
36 should contain_cinder_config('hippo/vmware_image_transfer_timeout_secs').with_value(7200)
37 should_not contain_cinder_config('hippo/vmware_wsdl_location')
40 it 'installs suds python package' do
41 should contain_package('python-suds').with(
45 context 'with optional parameters' do
47 params.merge!(optional_params)
50 it 'should configure vmdk driver in cinder.conf' do
51 should contain_cinder_config('hippo/vmware_volume_folder').with_value(params[:volume_folder])
52 should contain_cinder_config('hippo/vmware_api_retry_count').with_value(params[:api_retry_count])
53 should contain_cinder_config('hippo/vmware_max_object_retrieval').with_value(params[:max_object_retrieval])
54 should contain_cinder_config('hippo/vmware_task_poll_interval').with_value(params[:task_poll_interval])
55 should contain_cinder_config('hippo/vmware_image_transfer_timeout_secs').with_value(params[:image_transfer_timeout_secs])
56 should contain_cinder_config('hippo/vmware_wsdl_location').with_value(params[:wsdl_location])