diff --git a/manifests/init.pp b/manifests/init.pp index c25827d04..d40d4cb90 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -188,6 +188,7 @@ $monitoring_notifications = false, $use_syslog = false, $log_facility = 'LOG_USER', + $install_utilities = true, # DEPRECATED PARAMETERS # this is how to query all resources from our clutser $nova_cluster_id = undef, @@ -223,7 +224,9 @@ require => Package['python'], } - class { 'nova::utilities': } + if $install_utilities { + class { 'nova::utilities': } + } # this anchor is used to simplify the graph between nova components by # allowing a resource to serve as a point where the configuration of nova begins diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index d96611f26..27dc75a97 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -96,6 +96,10 @@ should_not contain_nova_config('DEFAULT/notification_driver') end + it 'installs utilities' do + should contain_class('nova::utilities') + end + it 'disables syslog' do should contain_nova_config('DEFAULT/use_syslog').with_value(false) end @@ -120,7 +124,8 @@ :auth_strategy => 'foo', :ensure_package => '2012.1.1-15.el6', :monitoring_notifications => true, - :memcached_servers => ['memcached01:11211', 'memcached02:11211'] } + :memcached_servers => ['memcached01:11211', 'memcached02:11211'], + :install_utilities => false } end it 'installs packages' do @@ -166,12 +171,15 @@ should contain_nova_config('DEFAULT/notification_driver').with_value('nova.openstack.common.notifier.rpc_notifier') end + it 'does not install utilities' do + should_not contain_class('nova::utilities') + end + context 'with logging directory disabled' do before { params.merge!( :log_dir => false) } it { should contain_nova_config('DEFAULT/log_dir').with_ensure('absent') } end - end context 'with deprecated sql parameters' do