
This commit refactors the cinder manifests to make them more consistent with other manifests: * removed default value for keystone_password * removed the prefix cinder_ from class parameters (it is redundant) * set package_ensure defaults to present * removed extra package_ensure parameter * changed $iscsi_enabled to $volume_driver (this change is being done in anticipation of needing additional volume drivers) * add test coverage * simple updates to .gitignore * refactor sql_connection to be composed of multiple class paramters for consistency. It also delete the openstack::cinder class b/c I could not seem to declare ::cinder while it existed. Change-Id: I4a7b49d95957675be82c3b77958ae9d0c47eb4fa
55 lines
1.7 KiB
Ruby
55 lines
1.7 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'openstack::cinder::controller' do
|
|
|
|
let :required_params do
|
|
{
|
|
:db_password => 'db_password',
|
|
:rabbit_password => 'rabpass',
|
|
:keystone_password => 'user_pass'
|
|
}
|
|
end
|
|
|
|
let :facts do
|
|
{ :osfamily => 'Redhat' }
|
|
end
|
|
|
|
let :params do
|
|
required_params
|
|
end
|
|
|
|
it 'should configure using the default values' do
|
|
should contain_class('cinder').with(
|
|
:sql_connection => "mysql://cinder:#{required_params[:db_password]}@127.0.0.1/cinder?charset=utf8",
|
|
:rpc_backend => 'cinder.openstack.common.rpc.impl_kombu',
|
|
:rabbit_userid => 'guest',
|
|
:rabbit_password => required_params[:rabbit_password],
|
|
:rabbit_host => '127.0.0.1',
|
|
:rabbit_port => '5672',
|
|
:rabbit_hosts => nil,
|
|
:rabbit_virtual_host => '/',
|
|
:package_ensure => 'present',
|
|
:api_paste_config => '/etc/cinder/api-paste.ini',
|
|
:verbose => false
|
|
)
|
|
should contain_class('cinder::api').with(
|
|
:keystone_password => required_params[:keystone_password],
|
|
:keystone_enabled => true,
|
|
:keystone_user => 'cinder',
|
|
:keystone_auth_host => 'localhost',
|
|
:keystone_auth_port => '35357',
|
|
:keystone_auth_protocol => 'http',
|
|
:service_port => '5000',
|
|
:package_ensure => 'present',
|
|
:bind_host => '0.0.0.0',
|
|
:enabled => true
|
|
)
|
|
should contain_class('cinder::scheduler').with(
|
|
:scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler',
|
|
:package_ensure => 'present',
|
|
:enabled => true
|
|
)
|
|
end
|
|
|
|
end
|