diff --git a/manifests/profile/base/cinder/volume/dellemc_powermax.pp b/manifests/profile/base/cinder/volume/dellemc_powermax.pp index 98e455604..614b32796 100644 --- a/manifests/profile/base/cinder/volume/dellemc_powermax.pp +++ b/manifests/profile/base/cinder/volume/dellemc_powermax.pp @@ -33,7 +33,7 @@ # Defaults to hiera('step') # class tripleo::profile::base::cinder::volume::dellemc_powermax ( - $backend_name = hiera('cinder::backend::dellemc_powermax::volume_backend_name', ['tripleo_dellemc_powermx']), + $backend_name = hiera('cinder::backend::dellemc_powermax::volume_backend_name', ['tripleo_dellemc_powermax']), $multi_config = hiera('cinder::backend::dellemc_powermax::volume_multi_config', {}), $step = Integer(hiera('step')), ) { @@ -51,7 +51,7 @@ class tripleo::profile::base::cinder::volume::dellemc_powermax ( 'CinderPowermaxPortGroups' => hiera('cinder::backend::dellemc_powermax::powermax_port_groups', undef), } - $backend_name.each |String $backend| { + any2array($backend_name).each |String $backend| { $backend_config = merge($backend_defaults, pick($multi_config[$backend], {})) cinder::backend::dellemc_powermax { $backend : diff --git a/spec/classes/tripleo_profile_base_cinder_powermax_spec.rb b/spec/classes/tripleo_profile_base_cinder_powermax_spec.rb index 58d448501..3dcfe6c0c 100644 --- a/spec/classes/tripleo_profile_base_cinder_powermax_spec.rb +++ b/spec/classes/tripleo_profile_base_cinder_powermax_spec.rb @@ -40,9 +40,8 @@ describe 'tripleo::profile::base::cinder::volume::dellemc_powermax' do it 'should trigger complete configuration' do is_expected.to contain_cinder__backend__dellemc_powermax('tripleo_dellemc_powermax') end - end - context 'with multiple backends' do + context 'with multiple backends' do let(:params) { { :backend_name => ['tripleo_dellemc_powermax_1', 'tripleo_dellemc_powermax_2'], :multi_config => { 'tripleo_dellemc_powermax_2' => { 'CinderPowermaxStorageProtocol' => 'FC' }}, @@ -57,7 +56,9 @@ describe 'tripleo::profile::base::cinder::volume::dellemc_powermax' do is_expected.to contain_cinder_config('tripleo_dellemc_powermax_2/volume_driver') .with_value('cinder.volume.drivers.dell_emc.powermax.fc.PowerMaxFCDriver') end - end + end + end + end on_supported_os.each do |os, facts| context "on #{os}" do @@ -69,4 +70,3 @@ describe 'tripleo::profile::base::cinder::volume::dellemc_powermax' do end end end -end diff --git a/spec/classes/tripleo_profile_base_cinder_volume_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_spec.rb index 220379925..0e7347ba1 100644 --- a/spec/classes/tripleo_profile_base_cinder_volume_spec.rb +++ b/spec/classes/tripleo_profile_base_cinder_volume_spec.rb @@ -299,6 +299,7 @@ describe 'tripleo::profile::base::cinder::volume' do is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_sc') is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_xtremio') is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellsc') + is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::dellemc_powermax') is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::netapp') is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::veritas_hyperscale') is_expected.to_not contain_class('tripleo::profile::base::cinder::volume::nfs') @@ -315,15 +316,16 @@ describe 'tripleo::profile::base::cinder::volume' do context 'with all tripleo backends' do before :each do params.merge!({ - :cinder_enable_nfs_backend => true, - :cinder_enable_rbd_backend => true, - :cinder_enable_iscsi_backend => true, - :cinder_enable_pure_backend => true, - :cinder_enable_dellemc_sc_backend => true, - :cinder_enable_dellsc_backend => true, - :cinder_enable_dellemc_xtremio_backend => true, - :cinder_enable_netapp_backend => true, - :cinder_enable_vrts_hs_backend => true, + :cinder_enable_nfs_backend => true, + :cinder_enable_rbd_backend => true, + :cinder_enable_iscsi_backend => true, + :cinder_enable_pure_backend => true, + :cinder_enable_dellemc_powermax_backend => true, + :cinder_enable_dellemc_sc_backend => true, + :cinder_enable_dellsc_backend => true, + :cinder_enable_dellemc_xtremio_backend => true, + :cinder_enable_netapp_backend => true, + :cinder_enable_vrts_hs_backend => true, }) end it 'should configure all backends' do @@ -332,6 +334,7 @@ describe 'tripleo::profile::base::cinder::volume' do is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_sc') is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_xtremio') is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellsc') + is_expected.to contain_class('tripleo::profile::base::cinder::volume::dellemc_powermax') is_expected.to contain_class('tripleo::profile::base::cinder::volume::netapp') is_expected.to contain_class('tripleo::profile::base::cinder::volume::veritas_hyperscale') is_expected.to contain_class('tripleo::profile::base::cinder::volume::nfs') @@ -340,8 +343,8 @@ describe 'tripleo::profile::base::cinder::volume' do is_expected.to contain_class('tripleo::profile::base::cinder') is_expected.to contain_class('cinder::volume') is_expected.to contain_class('cinder::backends').with( - :enabled_backends => ['tripleo_iscsi', 'tripleo_ceph', 'tripleo_pure', 'tripleo_dellsc', 'tripleo_dellemc_sc', 'tripleo_dellemc_xtremio', - 'tripleo_netapp','tripleo_nfs','Veritas_HyperScale'] + :enabled_backends => ['tripleo_iscsi', 'tripleo_ceph', 'tripleo_pure', 'tripleo_dellsc', 'tripleo_dellemc_sc','tripleo_dellemc_powermax', + 'tripleo_dellemc_xtremio', 'tripleo_netapp','tripleo_nfs','Veritas_HyperScale'] ) end end