Enforce yaml format for policy files

Support for json format has been removed[1]. Also require boolean
parameter for purge_config.

[1] d689704739abac1711403b3379537e80de212d91

Change-Id: Ib243acde3d31f599efe6cbbc67bc651212d71e98
This commit is contained in:
Takashi Kajinami 2024-09-30 12:32:38 +09:00
parent 7bc0f9abc8
commit 31e1a0f087
2 changed files with 14 additions and 14 deletions

View File

@ -39,15 +39,15 @@
#
class horizon::policy(
# common parameters
$file_mode = '0640',
$file_format = 'yaml',
$purge_config = false,
$file_mode = '0640',
Enum['yaml'] $file_format = 'yaml',
Boolean $purge_config = false,
# service specific parameters
Hash $cinder_policies = {},
Hash $glance_policies = {},
Hash $keystone_policies = {},
Hash $neutron_policies = {},
Hash $nova_policies = {},
Hash $cinder_policies = {},
Hash $glance_policies = {},
Hash $keystone_policies = {},
Hash $neutron_policies = {},
Hash $nova_policies = {},
) {
include horizon::deps

View File

@ -16,7 +16,7 @@
# Defaults to '0640'
#
# [*file_format*]
# (Optional) Format for file contents. Valid values
# (Optional) Format for file contents. Valid value is 'yaml'
# Defaults to 'yaml'.
#
# [*purge_config*]
@ -25,11 +25,11 @@
# Defaults to false.
#
define horizon::policy::base(
String[1] $policy_file = $name,
Hash $policies = {},
$file_mode = '0640',
$file_format = 'yaml',
$purge_config = false,
String[1] $policy_file = $name,
Hash $policies = {},
$file_mode = '0640',
Enum['yaml'] $file_format = 'yaml',
Boolean $purge_config = false,
) {
include horizon::deps
include horizon::params