Skip to content

Commit

Permalink
Add ability to disable installation of nova utilities
Browse files Browse the repository at this point in the history
Install them by default, preserving previous behavior.

Change-Id: I01ab67330b4a66f0af44a0c83c81dc9601cf57b5
Closes-bug: #1281392
  • Loading branch information
mgagne committed Feb 26, 2014
1 parent 324bd9a commit d39d4c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion manifests/init.pp
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions spec/classes/nova_init_spec.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d39d4c4

Please sign in to comment.