
Currently if a backend type parameter has not been specified in the upstream module one needs to rely on a custom layer to enable them. With this options even if not yet specified on the upstream module, user can specify extra options for each backends. Change-Id: I0387c86ff3e04a1d1c6b686f76d9c7c88c30a356
48 lines
1.7 KiB
Ruby
48 lines
1.7 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'cinder::backend::hp3par_iscsi' do
|
|
let (:title) { 'hp3par_iscsi' }
|
|
|
|
let :req_params do
|
|
{
|
|
:hp3par_api_url => 'https://172.0.0.2:8080/api/v1',
|
|
:hp3par_username => '3paradm',
|
|
:hp3par_password => 'password',
|
|
:hp3par_iscsi_ips => '172.0.0.3',
|
|
:san_ip => '172.0.0.2',
|
|
:san_login => '3paradm',
|
|
:san_password => 'password',
|
|
}
|
|
end
|
|
|
|
let :params do
|
|
req_params
|
|
end
|
|
|
|
describe 'hp3par_iscsi volume driver' do
|
|
it 'configure hp3par_iscsi volume driver' do
|
|
should contain_cinder_config('hp3par_iscsi/volume_driver').with_value('cinder.volume.drivers.san.hp.hp_3par_iscsi.HP3PARISCSIDriver')
|
|
should contain_cinder_config('hp3par_iscsi/hp3par_api_url').with_value('https://172.0.0.2:8080/api/v1')
|
|
should contain_cinder_config('hp3par_iscsi/hp3par_username').with_value('3paradm')
|
|
should contain_cinder_config('hp3par_iscsi/hp3par_password').with_value('password')
|
|
should contain_cinder_config('hp3par_iscsi/hp3par_iscsi_ips').with_value('172.0.0.3')
|
|
should contain_cinder_config('hp3par_iscsi/san_ip').with_value('172.0.0.2')
|
|
should contain_cinder_config('hp3par_iscsi/san_login').with_value('3paradm')
|
|
should contain_cinder_config('hp3par_iscsi/san_password').with_value('password')
|
|
end
|
|
end
|
|
|
|
describe 'hp3par_iscsi backend with additional configuration' do
|
|
before :each do
|
|
params.merge!({:extra_options => {'hp3par_iscsi/param1' => {'value' => 'value1'}}})
|
|
end
|
|
|
|
it 'configure hp3par_iscsi backend with additional configuration' do
|
|
should contain_cinder_config('hp3par_iscsi/param1').with({
|
|
:value => 'value1',
|
|
})
|
|
end
|
|
end
|
|
|
|
end
|