Merge "Allow enabling custom backends with manila"

This commit is contained in:
Zuul 2019-06-29 05:21:36 +00:00 committed by Gerrit Code Review
commit f30590e8d4

View File

@ -46,6 +46,10 @@
# (Optional) Whether or not the vnx backend is enabled # (Optional) Whether or not the vnx backend is enabled
# Defaults to hiera('manila_backend_vnx_enabled', false) # Defaults to hiera('manila_backend_vnx_enabled', false)
# #
# [*manila_user_enabled_backends*]
# (Optional) List of additional backend stanzas to activate
# Defaults to hiera('manila_user_enabled_backends', undef)
#
# [*step*] # [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates # (Optional) The current step in deployment. See tripleo-heat-templates
# for more details. # for more details.
@ -59,6 +63,7 @@ class tripleo::profile::base::manila::share (
$backend_unity_enabled = hiera('manila_backend_unity_enabled', false), $backend_unity_enabled = hiera('manila_backend_unity_enabled', false),
$backend_vnx_enabled = hiera('manila_backend_vnx_enabled', false), $backend_vnx_enabled = hiera('manila_backend_vnx_enabled', false),
$backend_cephfs_enabled = hiera('manila_backend_cephfs_enabled', false), $backend_cephfs_enabled = hiera('manila_backend_cephfs_enabled', false),
$manila_user_enabled_backends = hiera('manila_user_enabled_backends', undef),
$step = Integer(hiera('step')), $step = Integer(hiera('step')),
) { ) {
include ::tripleo::profile::base::manila include ::tripleo::profile::base::manila
@ -241,17 +246,16 @@ class tripleo::profile::base::manila::share (
} }
} }
$manila_enabled_backends = delete_undef_values( $backends = delete_undef_values(concat([], $manila_generic_backend,
[
$manila_generic_backend,
$manila_cephfs_backend, $manila_cephfs_backend,
$manila_netapp_backend, $manila_netapp_backend,
$manila_vmax_backend, $manila_vmax_backend,
$manila_isilon_backend, $manila_isilon_backend,
$manila_unity_backend, $manila_unity_backend,
$manila_vnx_backend $manila_vnx_backend,
] $manila_user_enabled_backends))
) $manila_enabled_backends = delete($backends, '')
class { '::manila::backends' : class { '::manila::backends' :
enabled_share_backends => $manila_enabled_backends, enabled_share_backends => $manila_enabled_backends,
} }