Merge "Allow overriding share protocols with manila" into stable/ussuri
This commit is contained in:
commit
58a2ab94a0
manifests/profile/base/manila
releasenotes/notes
spec/classes
@ -18,6 +18,10 @@
|
|||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
|
# [*enabled_share_protocols*]
|
||||||
|
# (Optional) Share protocols enabled on the manila API service.
|
||||||
|
# Defaults to hiera('manila_enabled_share_protocols', undef)
|
||||||
|
#
|
||||||
# [*backend_generic_enabled*]
|
# [*backend_generic_enabled*]
|
||||||
# (Optional) Whether or not the generic backend is enabled
|
# (Optional) Whether or not the generic backend is enabled
|
||||||
# Defaults to hiera('manila_backend_generic_enabled', false)
|
# Defaults to hiera('manila_backend_generic_enabled', false)
|
||||||
@ -77,6 +81,7 @@
|
|||||||
# Defaults to hiera('step')
|
# Defaults to hiera('step')
|
||||||
|
|
||||||
class tripleo::profile::base::manila::api (
|
class tripleo::profile::base::manila::api (
|
||||||
|
$enabled_share_protocols = hiera('manila_enabled_share_protocols', undef),
|
||||||
$backend_generic_enabled = hiera('manila_backend_generic_enabled', false),
|
$backend_generic_enabled = hiera('manila_backend_generic_enabled', false),
|
||||||
$backend_netapp_enabled = hiera('manila_backend_netapp_enabled', false),
|
$backend_netapp_enabled = hiera('manila_backend_netapp_enabled', false),
|
||||||
$backend_vmax_enabled = hiera('manila_backend_vmax_enabled', false),
|
$backend_vmax_enabled = hiera('manila_backend_vmax_enabled', false),
|
||||||
@ -112,21 +117,31 @@ class tripleo::profile::base::manila::api (
|
|||||||
|
|
||||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
if $step >= 4 or ($step >= 3 and $sync_db) {
|
||||||
include tripleo::profile::base::apache
|
include tripleo::profile::base::apache
|
||||||
if $backend_generic_enabled or $backend_netapp_enabled or $backend_vmax_enabled or
|
|
||||||
$backend_isilon_enabled or $backend_unity_enabled or $backend_vnx_enabled {
|
unless empty($enabled_share_protocols) {
|
||||||
$nfs_protocol = 'NFS'
|
$enabled_share_protocols_real = join(any2array($enabled_share_protocols), ',')
|
||||||
$cifs_protocol = 'CIFS'
|
|
||||||
} else {
|
} else {
|
||||||
$nfs_protocol = undef
|
if $backend_generic_enabled or $backend_netapp_enabled
|
||||||
$cifs_protocol = undef
|
or $backend_vmax_enabled or $backend_isilon_enabled
|
||||||
}
|
or $backend_unity_enabled or $backend_vnx_enabled {
|
||||||
if $backend_cephfs_enabled {
|
$nfs_protocol = 'NFS'
|
||||||
$cephfs_protocol = hiera('manila::backend::cephfs::cephfs_protocol_helper_type', 'CEPHFS')
|
$cifs_protocol = 'CIFS'
|
||||||
} else {
|
} else {
|
||||||
$cephfs_protocol = undef
|
$nfs_protocol = undef
|
||||||
|
$cifs_protocol = undef
|
||||||
|
}
|
||||||
|
if $backend_cephfs_enabled {
|
||||||
|
$cephfs_protocol = hiera(
|
||||||
|
'manila::backend::cephfs::cephfs_protocol_helper_type', 'CEPHFS')
|
||||||
|
} else {
|
||||||
|
$cephfs_protocol = undef
|
||||||
|
}
|
||||||
|
|
||||||
|
$enabled_share_protocols_real = join(delete_undef_values([$nfs_protocol,$cifs_protocol,$cephfs_protocol]), ',')
|
||||||
|
|
||||||
}
|
}
|
||||||
class { 'manila::api' :
|
class { 'manila::api' :
|
||||||
enabled_share_protocols => join(delete_undef_values([$nfs_protocol,$cifs_protocol,$cephfs_protocol]), ',')
|
enabled_share_protocols => $enabled_share_protocols_real
|
||||||
}
|
}
|
||||||
class { 'manila::wsgi::apache':
|
class { 'manila::wsgi::apache':
|
||||||
ssl_cert => $tls_certfile,
|
ssl_cert => $tls_certfile,
|
||||||
|
6
releasenotes/notes/bug-1831767-allow-configuring-enabled-protocols-manila-86b6662a8b617866.yaml
Normal file
6
releasenotes/notes/bug-1831767-allow-configuring-enabled-protocols-manila-86b6662a8b617866.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
It is now possible to override the ``enabled_share_protocols``
|
||||||
|
configuration for the Shared File Systems service (manila) with the
|
||||||
|
hiera parameter ``manila_enabled_share_protocols``.
|
@ -129,6 +129,29 @@ eos
|
|||||||
is_expected.to contain_class('tripleo::profile::base::manila::api')
|
is_expected.to contain_class('tripleo::profile::base::manila::api')
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with custom protocols' do
|
||||||
|
let(:params) { {
|
||||||
|
:step => 4,
|
||||||
|
:bootstrap_node => 'node.example.com',
|
||||||
|
:backend_generic_enabled => true,
|
||||||
|
:backend_cephfs_enabled => true,
|
||||||
|
:enabled_share_protocols => ['CIFS', 'CEPHFS'],
|
||||||
|
} }
|
||||||
|
|
||||||
|
it {
|
||||||
|
is_expected.to contain_class('tripleo::profile::base::manila::api')
|
||||||
|
is_expected.to contain_class('tripleo::profile::base::manila')
|
||||||
|
is_expected.to contain_class('tripleo::profile::base::manila::authtoken')
|
||||||
|
is_expected.to contain_class('tripleo::profile::base::manila::api')
|
||||||
|
is_expected.to contain_class('tripleo::profile::base::apache')
|
||||||
|
is_expected.to contain_class('manila::api').with(
|
||||||
|
:enabled_share_protocols => 'CIFS,CEPHFS'
|
||||||
|
)
|
||||||
|
is_expected.to contain_class('manila::wsgi::apache')
|
||||||
|
is_expected.to contain_class('tripleo::profile::base::manila::api')
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user