aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/cinder
diff options
context:
space:
mode:
authorAlex Schultz <aschultz@redhat.com>2016-10-07 15:43:37 -0600
committerAlex Schultz <aschultz@redhat.com>2016-12-05 08:26:55 -0700
commitf418c79632a7f21ff6ab11ef1715cd4a5b361789 (patch)
tree90532068592ddf8bd49056826d20bb330734ff15 /manifests/profile/base/cinder
parent77c1ca1243fbc38210e9f6264c5c36b546d1a95a (diff)
Add cinder profile spec tests
This change adds rspec testing for the cinder profiles with in puppet-tripleo. Additionally while testing, it was found that the backends may incorrectly have an extra , included in the settings for cinder volume when running puppet 3. This change includes a fix the cinder volume backends to make sure we are not improperly configuring it with a trailing comma. Change-Id: Ibdfee330413b6f9aecdf42a5508c21126fc05973
Diffstat (limited to 'manifests/profile/base/cinder')
-rw-r--r--manifests/profile/base/cinder/volume.pp20
1 files changed, 13 insertions, 7 deletions
diff --git a/manifests/profile/base/cinder/volume.pp b/manifests/profile/base/cinder/volume.pp
index 7d562ec..64927b6 100644
--- a/manifests/profile/base/cinder/volume.pp
+++ b/manifests/profile/base/cinder/volume.pp
@@ -108,13 +108,19 @@ class tripleo::profile::base::cinder::volume (
$cinder_rbd_backend_name = undef
}
- $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend_name,
- $cinder_rbd_backend_name,
- $cinder_eqlx_backend_name,
- $cinder_dellsc_backend_name,
- $cinder_netapp_backend_name,
- $cinder_nfs_backend_name,
- $cinder_user_enabled_backends])
+ $backends = delete_undef_values([$cinder_iscsi_backend_name,
+ $cinder_rbd_backend_name,
+ $cinder_eqlx_backend_name,
+ $cinder_dellsc_backend_name,
+ $cinder_netapp_backend_name,
+ $cinder_nfs_backend_name,
+ $cinder_user_enabled_backends])
+ # NOTE(aschultz): during testing it was found that puppet 3 may incorrectly
+ # include a "" in the previous array which is not removed by the
+ # delete_undef_values function. So we need to make sure we don't have any
+ # "" strings in our array.
+ $cinder_enabled_backends = delete($backends, '')
+
class { '::cinder::backends' :
enabled_backends => $cinder_enabled_backends,
}