Import base parameter types for ::policy
Import the parameter types from openstacklib::policy so that parameter types are validated at module level, instead of internal resource call. Also remove the tag which is no longer necessary after dependency refactoring. Change-Id: I4d66c8753708fc993ff9f6053a367afc65dc9a76 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -46,13 +46,13 @@
|
||||
# Defaults to false.
|
||||
#
|
||||
class trove::policy (
|
||||
$enforce_scope = $facts['os_service_default'],
|
||||
$enforce_new_defaults = $facts['os_service_default'],
|
||||
Hash $policies = {},
|
||||
$policy_path = '/etc/trove/policy.yaml',
|
||||
$policy_default_rule = $facts['os_service_default'],
|
||||
$policy_dirs = $facts['os_service_default'],
|
||||
Boolean $purge_config = false,
|
||||
$enforce_scope = $facts['os_service_default'],
|
||||
$enforce_new_defaults = $facts['os_service_default'],
|
||||
Openstacklib::Policies $policies = {},
|
||||
Stdlib::Absolutepath $policy_path = '/etc/trove/policy.yaml',
|
||||
$policy_default_rule = $facts['os_service_default'],
|
||||
$policy_dirs = $facts['os_service_default'],
|
||||
Boolean $purge_config = false,
|
||||
) {
|
||||
include trove::deps
|
||||
include trove::params
|
||||
@@ -64,13 +64,11 @@ class trove::policy (
|
||||
file_group => $trove::params::group,
|
||||
file_format => 'yaml',
|
||||
purge_config => $purge_config,
|
||||
tag => 'trove',
|
||||
}
|
||||
|
||||
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
||||
|
||||
# policy config should occur in the config block also as soon as
|
||||
# puppet-trove supports it. Leave commented out for now.
|
||||
# policy config should occur in the config block also.
|
||||
Anchor['trove::config::begin']
|
||||
-> Openstacklib::Policy[$policy_path]
|
||||
-> Anchor['trove::config::end']
|
||||
|
@@ -33,7 +33,6 @@ describe 'trove::policy' do
|
||||
:file_group => 'trove',
|
||||
:file_format => 'yaml',
|
||||
:purge_config => false,
|
||||
:tag => 'trove',
|
||||
)
|
||||
is_expected.to contain_oslo__policy('trove_config').with(
|
||||
:enforce_scope => false,
|
||||
@@ -64,7 +63,6 @@ describe 'trove::policy' do
|
||||
:file_group => 'trove',
|
||||
:file_format => 'yaml',
|
||||
:purge_config => true,
|
||||
:tag => 'trove',
|
||||
)
|
||||
is_expected.to contain_oslo__policy('trove_config').with(
|
||||
:enforce_scope => false,
|
||||
|
Reference in New Issue
Block a user