Validate authentication_type
Currently we expect only 'cephx' or 'none' as authentication_type. This enforces that limitation using parameter types.. Change-Id: I9d783e500f94b3f474d657ab10b1594ab6e6e65b
This commit is contained in:
parent
c55e22b8a3
commit
843fa12939
@ -142,40 +142,40 @@
|
||||
#
|
||||
class ceph (
|
||||
$fsid,
|
||||
$ensure = present,
|
||||
$authentication_type = 'cephx',
|
||||
$keyring = undef,
|
||||
$osd_journal_size = undef,
|
||||
$osd_max_object_name_len = undef,
|
||||
$osd_max_object_namespace_len = undef,
|
||||
$osd_pool_default_pg_num = undef,
|
||||
$osd_pool_default_pgp_num = undef,
|
||||
$osd_pool_default_size = undef,
|
||||
$osd_pool_default_min_size = undef,
|
||||
$osd_pool_default_crush_rule = undef,
|
||||
$osd_crush_update_on_start = undef,
|
||||
$mon_osd_full_ratio = undef,
|
||||
$mon_osd_nearfull_ratio = undef,
|
||||
$mon_initial_members = undef,
|
||||
$mon_host = undef,
|
||||
$ms_bind_ipv4 = undef,
|
||||
$ms_bind_ipv6 = undef,
|
||||
$require_signatures = undef,
|
||||
$cluster_require_signatures = undef,
|
||||
$service_require_signatures = undef,
|
||||
$sign_messages = undef,
|
||||
$cluster_network = undef,
|
||||
$public_network = undef,
|
||||
$public_addr = undef,
|
||||
$osd_max_backfills = undef,
|
||||
$osd_recovery_max_active = undef,
|
||||
$osd_recovery_op_priority = undef,
|
||||
$osd_recovery_max_single_start = undef,
|
||||
$osd_max_scrubs = undef,
|
||||
$osd_op_threads = undef,
|
||||
$rbd_default_features = undef,
|
||||
$ensure = present,
|
||||
Enum['cephx', 'none'] $authentication_type = 'cephx',
|
||||
$keyring = undef,
|
||||
$osd_journal_size = undef,
|
||||
$osd_max_object_name_len = undef,
|
||||
$osd_max_object_namespace_len = undef,
|
||||
$osd_pool_default_pg_num = undef,
|
||||
$osd_pool_default_pgp_num = undef,
|
||||
$osd_pool_default_size = undef,
|
||||
$osd_pool_default_min_size = undef,
|
||||
$osd_pool_default_crush_rule = undef,
|
||||
$osd_crush_update_on_start = undef,
|
||||
$mon_osd_full_ratio = undef,
|
||||
$mon_osd_nearfull_ratio = undef,
|
||||
$mon_initial_members = undef,
|
||||
$mon_host = undef,
|
||||
$ms_bind_ipv4 = undef,
|
||||
$ms_bind_ipv6 = undef,
|
||||
$require_signatures = undef,
|
||||
$cluster_require_signatures = undef,
|
||||
$service_require_signatures = undef,
|
||||
$sign_messages = undef,
|
||||
$cluster_network = undef,
|
||||
$public_network = undef,
|
||||
$public_addr = undef,
|
||||
$osd_max_backfills = undef,
|
||||
$osd_recovery_max_active = undef,
|
||||
$osd_recovery_op_priority = undef,
|
||||
$osd_recovery_max_single_start = undef,
|
||||
$osd_max_scrubs = undef,
|
||||
$osd_op_threads = undef,
|
||||
$rbd_default_features = undef,
|
||||
# DEPRECATED PARAMETERS
|
||||
$set_osd_params = false,
|
||||
$set_osd_params = false,
|
||||
) {
|
||||
|
||||
include ceph::params
|
||||
|
@ -45,12 +45,12 @@
|
||||
# Optional. Defaults to false
|
||||
#
|
||||
define ceph::mgr (
|
||||
$enable = true,
|
||||
$ensure = running,
|
||||
$cluster = 'ceph',
|
||||
$authentication_type = 'cephx',
|
||||
$key = undef,
|
||||
Boolean $inject_key = false,
|
||||
$enable = true,
|
||||
$ensure = running,
|
||||
$cluster = 'ceph',
|
||||
Enum['cephx', 'none'] $authentication_type = 'cephx',
|
||||
$key = undef,
|
||||
Boolean $inject_key = false,
|
||||
) {
|
||||
file { '/var/lib/ceph/mgr':
|
||||
ensure => directory,
|
||||
|
@ -62,7 +62,7 @@ define ceph::mon (
|
||||
$mon_enable = true,
|
||||
$public_addr = undef,
|
||||
$cluster = undef,
|
||||
$authentication_type = 'cephx',
|
||||
Enum['cephx', 'none'] $authentication_type = 'cephx',
|
||||
$key = undef,
|
||||
$keyring = undef,
|
||||
$exec_timeout = $ceph::params::exec_timeout,
|
||||
|
@ -185,7 +185,7 @@
|
||||
class ceph::profile::params (
|
||||
$fsid = undef,
|
||||
$release = undef,
|
||||
$authentication_type = undef,
|
||||
Optional[Enum['cephx', 'none']] $authentication_type = undef,
|
||||
$mon_initial_members = undef,
|
||||
$mon_host = undef,
|
||||
$ms_bind_ipv4 = undef,
|
||||
|
@ -79,7 +79,7 @@ describe 'ceph::profile::client' do
|
||||
context 'without cephx and client_keys' do
|
||||
let :pre_condition do
|
||||
"class { 'ceph::profile::params':
|
||||
authentication_type => 'undef',
|
||||
authentication_type => 'none',
|
||||
client_keys => {}
|
||||
}"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user