diff --git a/manifests/cinder/all.pp b/manifests/cinder/all.pp index 38a2212..82613d2 100644 --- a/manifests/cinder/all.pp +++ b/manifests/cinder/all.pp @@ -20,6 +20,7 @@ class openstack::cinder::all( $db_user = 'cinder', $db_host = '127.0.0.1', $db_dbname = 'cinder', + $sql_idle_timeout = '3600', $package_ensure = present, $bind_host = '0.0.0.0', $api_paste_config = '/etc/cinder/api-paste.ini', @@ -30,6 +31,7 @@ class openstack::cinder::all( $iscsi_ip_address = '127.0.0.1', $setup_test_volume = false, $manage_volumes = true, + $debug = false, $verbose = false ) { @@ -43,6 +45,7 @@ class openstack::cinder::all( class {'::cinder': sql_connection => $sql_connection, + sql_idle_timeout => $sql_idle_timeout, rpc_backend => $rpc_backend, rabbit_userid => $rabbit_userid, rabbit_password => $rabbit_password, @@ -52,6 +55,7 @@ class openstack::cinder::all( rabbit_virtual_host => $rabbit_virtual_host, package_ensure => $package_ensure, api_paste_config => $api_paste_config, + debug => $debug, verbose => $verbose, } diff --git a/manifests/controller.pp b/manifests/controller.pp index caac303..47d6177 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -219,6 +219,10 @@ class openstack::controller ( $cinder_db_user = 'cinder', $cinder_db_dbname = 'cinder', $cinder_bind_address = '0.0.0.0', + $manage_volumes = false, + $volume_group = 'cinder-volumes', + $setup_test_volume = false, + $iscsi_ip_address = '127.0.0.1', # Neutron $neutron = true, $physical_network = 'default', @@ -508,7 +512,7 @@ class openstack::controller ( fail('Must set cinder user password when setting up a cinder controller') } - class { 'openstack::cinder::controller': + class { 'openstack::cinder::all': bind_host => $cinder_bind_address, sql_idle_timeout => $sql_idle_timeout, keystone_auth_host => $keystone_host, @@ -522,8 +526,11 @@ class openstack::controller ( db_user => $cinder_db_user, db_type => $db_type, db_host => $db_host, - api_enabled => $enabled, - scheduler_enabled => $enabled, + manage_volumes => $manage_volumes, + volume_group => $volume_group, + setup_test_volume => $setup_test_volume, + iscsi_ip_address => $iscsi_ip_address, + enabled => $enabled, debug => $debug, verbose => $verbose } diff --git a/spec/classes/openstack_cinder_all_spec.rb b/spec/classes/openstack_cinder_all_spec.rb index 7b49cb6..e3713d4 100644 --- a/spec/classes/openstack_cinder_all_spec.rb +++ b/spec/classes/openstack_cinder_all_spec.rb @@ -17,6 +17,7 @@ describe 'openstack::cinder::all' do it 'should configure using the default values' do should contain_class('cinder').with( :sql_connection => "mysql://cinder:#{params[:db_password]}@127.0.0.1/cinder?charset=utf8", + :sql_idle_timeout => '3600', :rpc_backend => 'cinder.openstack.common.rpc.impl_kombu', :rabbit_userid => 'openstack', :rabbit_password => params[:rabbit_password], @@ -26,6 +27,7 @@ describe 'openstack::cinder::all' do :rabbit_virtual_host => '/', :package_ensure => 'present', :api_paste_config => '/etc/cinder/api-paste.ini', + :debug => false, :verbose => false ) should contain_class('cinder::api').with( diff --git a/spec/classes/openstack_controller_spec.rb b/spec/classes/openstack_controller_spec.rb index 9974afe..ceec94f 100644 --- a/spec/classes/openstack_controller_spec.rb +++ b/spec/classes/openstack_controller_spec.rb @@ -160,7 +160,7 @@ describe 'openstack::controller' do end end - context 'when account secutiry is not enabled' do + context 'when account security is not enabled' do let :params do default_params.merge( {:mysql_account_security => false} @@ -523,7 +523,8 @@ describe 'openstack::controller' do it 'should not contain cinder classes' do should_not contain_class('cinder') should_not contain_class('cinder::api') - should_not contain_class('cinder:"scheduler') + should_not contain_class('cinder::scheduler') + should_not contain_class('cinder::volume') end end