diff --git a/manifests/init.pp b/manifests/init.pp index 396f609c..a327093b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -97,6 +97,9 @@ # Defaults to undef # [*public_router_id*] # Defaults to '' +# [*sahara_plugins*] +# (optional) List of enabled Sahara plugins +# Defaults to undef # [*cinder_available*] # Defaults to true # [*glance_available*] @@ -221,6 +224,8 @@ class tempest( $public_network_id = undef, # Upstream has a bad defaul t - set it to empty string. $public_router_id = '', + # Sahara config + $sahara_plugins = undef, # Service configuration $cinder_available = true, $glance_available = true, @@ -415,4 +420,10 @@ be provided.') } } + if $sahara_available { + tempest_config { + 'data-processing-feature-enabled/plugins': value => $sahara_plugins, + } + } + } diff --git a/spec/classes/tempest_spec.rb b/spec/classes/tempest_spec.rb index 0186c610..5862c5ba 100644 --- a/spec/classes/tempest_spec.rb +++ b/spec/classes/tempest_spec.rb @@ -103,6 +103,18 @@ describe 'tempest' do end end + context 'with sahara_plugins' do + let :params do + { :configure_images => false, + :sahara_available => true, + :sahara_plugins => ['vanilla'] } + end + + it 'properly configures Sahara plugins in tempest.conf' do + is_expected.to contain_tempest_config('data-processing-feature-enabled/plugins').with_value(['vanilla']) + end + end + context 'with parameters' do let :params do { :configure_images => true,