diff --git a/manifests/backend/gpfs.pp b/manifests/backend/gpfs.pp index 8300949c..46ab5a72 100644 --- a/manifests/backend/gpfs.pp +++ b/manifests/backend/gpfs.pp @@ -8,6 +8,10 @@ # (required) Specifies the path of the GPFS directory where Block Storage # volume and snapshot files are stored. # +# [*volume_backend_name*] +# (optional) The name of the cinder::backend::gpfs resource +# Defaults to $name. +# # [*gpfs_images_dir*] # (optional) Specifies the path of the Image service repository in GPFS. # Leave undefined if not storing images in GPFS. Defaults to "None" via @@ -92,6 +96,7 @@ # define cinder::backend::gpfs ( $gpfs_mount_point_base, + $volume_backend_name = $name, $gpfs_images_dir = $facts['os_service_default'], $gpfs_images_share_mode = $facts['os_service_default'], $gpfs_max_clone_depth = $facts['os_service_default'], @@ -118,6 +123,7 @@ define cinder::backend::gpfs ( cinder_config { "${name}/volume_driver": value => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver'; + "${name}/volume_backend_name": value => $volume_backend_name; "${name}/gpfs_max_clone_depth": value => $gpfs_max_clone_depth; "${name}/gpfs_mount_point_base": value => $gpfs_mount_point_base; "${name}/gpfs_sparse_volumes": value => $gpfs_sparse_volumes; @@ -133,9 +139,9 @@ define cinder::backend::gpfs ( } if $manage_volume_type { - cinder_type { $name: + cinder_type { $volume_backend_name: ensure => present, - properties => ["volume_backend_name=${name}"], + properties => ["volume_backend_name=${volume_backend_name}"], } } diff --git a/releasenotes/notes/gpfs-volume-backend-name-5047746591b15231.yaml b/releasenotes/notes/gpfs-volume-backend-name-5047746591b15231.yaml new file mode 100644 index 00000000..3f60f331 --- /dev/null +++ b/releasenotes/notes/gpfs-volume-backend-name-5047746591b15231.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``cinder::backend::gpfs::volume_backend_name`` parameter has been + added. diff --git a/spec/defines/cinder_backend_gpfs_spec.rb b/spec/defines/cinder_backend_gpfs_spec.rb index 28a8fd7e..b37e1eff 100644 --- a/spec/defines/cinder_backend_gpfs_spec.rb +++ b/spec/defines/cinder_backend_gpfs_spec.rb @@ -47,6 +47,7 @@ describe 'cinder::backend::gpfs' do it { is_expected.to contain_cinder_config('gpfs/volume_driver').with_value( 'cinder.volume.drivers.ibm.gpfs.GPFSDriver' )} + it { is_expected.to contain_cinder_config('gpfs/volume_backend_name').with_value('gpfs') } it { params_hash.each_pair do |config,value|