diff --git a/manifests/api.pp b/manifests/api.pp index a21eaf817..7be1271b8 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -9,7 +9,7 @@ # # [*enabled*] # (optional) Whether the nova api service will be run -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -148,7 +148,7 @@ # class nova::api( $admin_password, - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present', $auth_uri = false, diff --git a/manifests/cells.pp b/manifests/cells.pp index 4080d4742..b1f3d9207 100644 --- a/manifests/cells.pp +++ b/manifests/cells.pp @@ -24,7 +24,7 @@ # # [*enabled*] # Use Nova Cells or not -# Defaults to 'False' +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -150,7 +150,7 @@ class nova::cells ( $create_cells = true, $db_check_interval = '60', $driver = 'nova.cells.rpc_driver.CellsRPCDriver', - $enabled = false, + $enabled = true, $ensure_package = 'present', $instance_updated_at_threshold = '3600', $instance_update_num_instances = '1', diff --git a/manifests/cert.pp b/manifests/cert.pp index d37754a34..1d3a6ff17 100644 --- a/manifests/cert.pp +++ b/manifests/cert.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether or not to enable the nova cert service -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -17,7 +17,7 @@ # Defaults to 'present' # class nova::cert( - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present' ) { diff --git a/manifests/compute.pp b/manifests/compute.pp index be56c4af8..beea4e8c5 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether to enable the nova-compute service -# Defaults to false +# Defaults to true # # [*heal_instance_info_cache_interval*] # (optional) Controls how often the instance info should be updated. @@ -112,7 +112,7 @@ # { 'vendor_id':'4321','product_id':'8765','physical_network':'default' } ] " # class nova::compute ( - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present', $vnc_enabled = true, diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 591277c9c..5bb869082 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether to enable the nova-conductor service -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -21,7 +21,7 @@ # Defaults to undef (i.e. parameter will not be present) # class nova::conductor( - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present', $workers = undef, diff --git a/manifests/consoleauth.pp b/manifests/consoleauth.pp index 90d5005ff..d5764873e 100644 --- a/manifests/consoleauth.pp +++ b/manifests/consoleauth.pp @@ -9,7 +9,7 @@ # # [*enabled*] # (optional) Whether the nova consoleauth service will be run -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -20,7 +20,7 @@ # Defaults to 'present' # class nova::consoleauth( - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present' ) { diff --git a/manifests/generic_service.pp b/manifests/generic_service.pp index e4a0ea824..8d193d3a3 100644 --- a/manifests/generic_service.pp +++ b/manifests/generic_service.pp @@ -33,7 +33,7 @@ define nova::generic_service( $package_name, $service_name, - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present' ) { diff --git a/manifests/network.pp b/manifests/network.pp index 94c01c139..b6b5da561 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -36,7 +36,7 @@ # # [*enabled*] # (optional) Whether the network service should be enabled. -# Defaults to false +# Defaults to true # # [*network_manager*] # (optional) The type of network manager to use. @@ -66,7 +66,7 @@ class nova::network( $num_networks = 1, $network_size = 255, $floating_range = false, - $enabled = false, + $enabled = true, $network_manager = 'nova.network.manager.FlatDHCPManager', $config_overrides = {}, $create_networks = true, diff --git a/manifests/objectstore.pp b/manifests/objectstore.pp index 0594585d7..78077688d 100644 --- a/manifests/objectstore.pp +++ b/manifests/objectstore.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether to enable the service -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -21,7 +21,7 @@ # Defaults to '0.0.0.0' # class nova::objectstore( - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present', $bind_address = '0.0.0.0' diff --git a/manifests/scheduler.pp b/manifests/scheduler.pp index ee787142e..329eca0c3 100644 --- a/manifests/scheduler.pp +++ b/manifests/scheduler.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether to run the scheduler service -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -21,7 +21,7 @@ # Defaults to 'nova.scheduler.filter_scheduler.FilterScheduler' # class nova::scheduler( - $enabled = false, + $enabled = true, $manage_service = true, $ensure_package = 'present', $scheduler_driver = 'nova.scheduler.filter_scheduler.FilterScheduler', diff --git a/manifests/spicehtml5proxy.pp b/manifests/spicehtml5proxy.pp index 4a4ab51cb..6960a25cc 100644 --- a/manifests/spicehtml5proxy.pp +++ b/manifests/spicehtml5proxy.pp @@ -10,7 +10,7 @@ # # [*enabled*] # (optional) enable spicehtml5proxy service -# true/false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -29,7 +29,7 @@ # Defaults to 'present' # class nova::spicehtml5proxy( - $enabled = false, + $enabled = true, $manage_service = true, $host = '0.0.0.0', $port = '6082', diff --git a/manifests/vncproxy.pp b/manifests/vncproxy.pp index 63ba31faa..d70e33225 100644 --- a/manifests/vncproxy.pp +++ b/manifests/vncproxy.pp @@ -6,7 +6,7 @@ # # [*enabled*] # (optional) Whether to run the vncproxy service -# Defaults to false +# Defaults to true # # [*manage_service*] # (optional) Whether to start/stop the service @@ -34,7 +34,7 @@ # Defaults to '/vnc_auto.html' # class nova::vncproxy( - $enabled = false, + $enabled = true, $manage_service = true, $vncproxy_protocol = 'http', $host = '0.0.0.0', diff --git a/spec/acceptance/basic_nova_spec.rb b/spec/acceptance/basic_nova_spec.rb index 4e738e4bc..5a0d66fab 100644 --- a/spec/acceptance/basic_nova_spec.rb +++ b/spec/acceptance/basic_nova_spec.rb @@ -94,26 +94,22 @@ describe 'basic nova' do password => 'a_big_secret', } class { '::nova::api': - enabled => true, admin_password => 'a_big_secret', identity_uri => 'http://127.0.0.1:35357/', osapi_v3 => true, } - class { '::nova::cert': enabled => true } + class { '::nova::cert': } class { '::nova::client': } - class { '::nova::conductor': enabled => true } - class { '::nova::consoleauth': enabled => true } + class { '::nova::conductor': } + class { '::nova::consoleauth': } class { '::nova::cron::archive_deleted_rows': } - class { '::nova::compute': - enabled => true, - vnc_enabled => true, - } + class { '::nova::compute': vnc_enabled => true } class { '::nova::compute::libvirt': migration_support => true, vncserver_listen => '0.0.0.0', } - class { '::nova::scheduler': enabled => true } - class { '::nova::vncproxy': enabled => true } + class { '::nova::scheduler': } + class { '::nova::vncproxy': } # TODO: networking with neutron EOS diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 6fe090a8d..fa81d1d28 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -21,9 +21,9 @@ describe 'nova::api' do it 'installs nova-api package and service' do is_expected.to contain_service('nova-api').with( :name => platform_params[:nova_api_service], - :ensure => 'stopped', + :ensure => 'running', :hasstatus => true, - :enable => false + :enable => true ) is_expected.to contain_package('nova-api').with( :name => platform_params[:nova_api_package], @@ -78,7 +78,7 @@ describe 'nova::api' do context 'with overridden parameters' do before do params.merge!({ - :enabled => true, + :enabled => false, :ensure_package => '2012.1-2', :auth_host => '10.0.0.1', :auth_port => 1234, @@ -111,9 +111,9 @@ describe 'nova::api' do ) is_expected.to contain_service('nova-api').with( :name => platform_params[:nova_api_service], - :ensure => 'running', + :ensure => 'stopped', :hasstatus => true, - :enable => true + :enable => false ) end diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index db637161d..a6778bfbd 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -13,9 +13,9 @@ describe 'nova::compute' do it 'installs nova-compute package and service' do is_expected.to contain_service('nova-compute').with({ :name => platform_params[:nova_compute_service], - :ensure => 'stopped', + :ensure => 'running', :hasstatus => true, - :enable => false + :enable => true }) is_expected.to contain_package('nova-compute').with({ :name => platform_params[:nova_compute_package], @@ -47,7 +47,7 @@ describe 'nova::compute' do context 'with overridden parameters' do let :params do - { :enabled => true, + { :enabled => false, :ensure_package => '2012.1-2', :vncproxy_host => '127.0.0.1', :network_device_mtu => 9999, @@ -65,9 +65,9 @@ describe 'nova::compute' do it 'installs nova-compute package and service' do is_expected.to contain_service('nova-compute').with({ :name => platform_params[:nova_compute_service], - :ensure => 'running', + :ensure => 'stopped', :hasstatus => true, - :enable => true + :enable => false }) is_expected.to contain_package('nova-compute').with({ :name => platform_params[:nova_compute_package], diff --git a/spec/classes/nova_conductor_spec.rb b/spec/classes/nova_conductor_spec.rb index 9eae435d2..d2f5fb0ea 100644 --- a/spec/classes/nova_conductor_spec.rb +++ b/spec/classes/nova_conductor_spec.rb @@ -6,10 +6,6 @@ describe 'nova::conductor' do 'include nova' end - let :params do - { :enabled => true } - end - shared_examples 'nova-conductor' do @@ -44,8 +40,8 @@ describe 'nova::conductor' do end context 'with overriden workers parameter' do - before do - params.merge!({:workers => '5' }) + let :params do + {:workers => '5' } end it { is_expected.to contain_nova_config('conductor/workers').with_value('5') } end diff --git a/spec/classes/nova_network_spec.rb b/spec/classes/nova_network_spec.rb index 8554c501b..c982e1322 100644 --- a/spec/classes/nova_network_spec.rb +++ b/spec/classes/nova_network_spec.rb @@ -34,9 +34,6 @@ describe 'nova::network' do ) } describe 'with enabled as true' do - let :params do - default_params.merge(:enabled => true) - end it { is_expected.to contain_service('nova-network').with( 'name' => 'nova-network', 'ensure' => 'running', @@ -45,6 +42,9 @@ describe 'nova::network' do )} end describe 'when enabled is set to false' do + let :params do + default_params.merge(:enabled => false) + end it { is_expected.to contain_service('nova-network').with( 'name' => 'nova-network', 'ensure' => 'stopped', @@ -206,9 +206,9 @@ describe 'nova::network' do end it { is_expected.to contain_service('nova-network').with( 'name' => 'openstack-nova-network', - 'ensure' => 'stopped', + 'ensure' => 'running', 'hasstatus' => true, - 'enable' => false + 'enable' => true )} it { is_expected.to contain_package('nova-network').with_name('openstack-nova-network') } end diff --git a/spec/classes/nova_scheduler_spec.rb b/spec/classes/nova_scheduler_spec.rb index b2235bc50..34e7f2c2a 100644 --- a/spec/classes/nova_scheduler_spec.rb +++ b/spec/classes/nova_scheduler_spec.rb @@ -6,10 +6,6 @@ describe 'nova::scheduler' do 'include nova' end - let :params do - { :enabled => true } - end - shared_examples 'nova-scheduler' do diff --git a/spec/classes/nova_spicehtml5_proxy_spec.rb b/spec/classes/nova_spicehtml5_proxy_spec.rb index 4828be3ea..f339242db 100644 --- a/spec/classes/nova_spicehtml5_proxy_spec.rb +++ b/spec/classes/nova_spicehtml5_proxy_spec.rb @@ -6,10 +6,6 @@ describe 'nova::spicehtml5proxy' do 'include nova' end - let :params do - { :enabled => true } - end - shared_examples 'nova-spicehtml5proxy' do it 'configures nova.conf' do diff --git a/spec/classes/nova_vnc_proxy_spec.rb b/spec/classes/nova_vnc_proxy_spec.rb index 4fe3ab612..9ada59248 100644 --- a/spec/classes/nova_vnc_proxy_spec.rb +++ b/spec/classes/nova_vnc_proxy_spec.rb @@ -6,52 +6,50 @@ describe 'nova::vncproxy' do 'include nova' end - let :params do - {:enabled => true} - end + context 'with default parameters' do - describe 'on debian platforms' do - let :facts do - { :osfamily => 'Debian' } - end - - it { is_expected.to contain_package('python-numpy').with( - :ensure => 'present', - :name => 'python-numpy' - )} - - it { is_expected.to contain_nova_config('DEFAULT/novncproxy_host').with(:value => '0.0.0.0') } - it { is_expected.to contain_nova_config('DEFAULT/novncproxy_port').with(:value => '6080') } - it { is_expected.to contain_nova_config('DEFAULT/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') } - - it { is_expected.to contain_package('nova-vncproxy').with( - :name => 'nova-novncproxy', - :ensure => 'present' - ) } - it { is_expected.to contain_service('nova-vncproxy').with( - :name => 'nova-novncproxy', - :hasstatus => true, - :ensure => 'running' - )} - - describe 'with manage_service as false' do - let :params do - { :enabled => true, - :manage_service => false - } + describe 'on debian platforms' do + let :facts do + { :osfamily => 'Debian' } end - it { is_expected.to contain_service('nova-vncproxy').without_ensure } - end - describe 'with package version' do - let :params do - {:ensure_package => '2012.1-2'} - end - it { is_expected.to contain_package('nova-vncproxy').with( - 'ensure' => '2012.1-2' + it { is_expected.to contain_package('python-numpy').with( + :ensure => 'present', + :name => 'python-numpy' )} - end + it { is_expected.to contain_nova_config('DEFAULT/novncproxy_host').with(:value => '0.0.0.0') } + it { is_expected.to contain_nova_config('DEFAULT/novncproxy_port').with(:value => '6080') } + it { is_expected.to contain_nova_config('DEFAULT/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') } + + it { is_expected.to contain_package('nova-vncproxy').with( + :name => 'nova-novncproxy', + :ensure => 'present' + ) } + it { is_expected.to contain_service('nova-vncproxy').with( + :name => 'nova-novncproxy', + :hasstatus => true, + :ensure => 'running' + )} + + describe 'with manage_service as false' do + let :params do + { :enabled => true, + :manage_service => false + } + end + it { is_expected.to contain_service('nova-vncproxy').without_ensure } + end + + describe 'with package version' do + let :params do + {:ensure_package => '2012.1-2'} + end + it { is_expected.to contain_package('nova-vncproxy').with( + 'ensure' => '2012.1-2' + )} + end + end end describe 'on debian OS' do diff --git a/spec/defines/nova_generic_service_spec.rb b/spec/defines/nova_generic_service_spec.rb index 3b2a8a4bb..1c127bcff 100644 --- a/spec/defines/nova_generic_service_spec.rb +++ b/spec/defines/nova_generic_service_spec.rb @@ -9,8 +9,7 @@ describe 'nova::generic_service' do let :params do { :package_name => 'foo', - :service_name => 'food', - :enabled => true + :service_name => 'food' } end diff --git a/spec/shared_examples.rb b/spec/shared_examples.rb index a1ea42860..16b2f3152 100644 --- a/spec/shared_examples.rb +++ b/spec/shared_examples.rb @@ -16,16 +16,16 @@ shared_examples 'generic nova service' do |service| }) is_expected.to contain_service(service[:name]).with({ :name => service[:service_name], - :ensure => 'stopped', + :ensure => 'running', :hasstatus => true, - :enable => false + :enable => true }) end end context 'with overridden parameters' do let :params do - { :enabled => true, + { :enabled => false, :ensure_package => '2012.1-2' } end @@ -37,9 +37,9 @@ shared_examples 'generic nova service' do |service| }) is_expected.to contain_service(service[:name]).with({ :name => service[:service_name], - :ensure => 'running', + :ensure => 'stopped', :hasstatus => true, - :enable => true + :enable => false }) end end