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: I385786aeb58fe1c2e4b2433dc4932f135756519e
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-09-27 23:50:31 +09:00
parent 82cd9b89f2
commit ea4421397f
2 changed files with 7 additions and 10 deletions

View File

@@ -46,13 +46,13 @@
# Defaults to false. # Defaults to false.
# #
class neutron::policy ( class neutron::policy (
$enforce_scope = $facts['os_service_default'], $enforce_scope = $facts['os_service_default'],
$enforce_new_defaults = $facts['os_service_default'], $enforce_new_defaults = $facts['os_service_default'],
Hash $policies = {}, Openstacklib::Policies $policies = {},
$policy_path = '/etc/neutron/policy.yaml', Stdlib::Absolutepath $policy_path = '/etc/neutron/policy.yaml',
$policy_default_rule = $facts['os_service_default'], $policy_default_rule = $facts['os_service_default'],
$policy_dirs = $facts['os_service_default'], $policy_dirs = $facts['os_service_default'],
Boolean $purge_config = false, Boolean $purge_config = false,
) { ) {
include neutron::deps include neutron::deps
include neutron::params include neutron::params
@@ -64,7 +64,6 @@ class neutron::policy (
file_group => $neutron::params::group, file_group => $neutron::params::group,
file_format => 'yaml', file_format => 'yaml',
purge_config => $purge_config, purge_config => $purge_config,
tag => 'neutron',
} }
create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) create_resources('openstacklib::policy', { $policy_path => $policy_parameters })

View File

@@ -33,7 +33,6 @@ describe 'neutron::policy' do
:file_group => 'neutron', :file_group => 'neutron',
:file_format => 'yaml', :file_format => 'yaml',
:purge_config => false, :purge_config => false,
:tag => 'neutron',
) )
is_expected.to contain_oslo__policy('neutron_config').with( is_expected.to contain_oslo__policy('neutron_config').with(
:enforce_scope => false, :enforce_scope => false,
@@ -64,7 +63,6 @@ describe 'neutron::policy' do
:file_group => 'neutron', :file_group => 'neutron',
:file_format => 'yaml', :file_format => 'yaml',
:purge_config => true, :purge_config => true,
:tag => 'neutron',
) )
is_expected.to contain_oslo__policy('neutron_config').with( is_expected.to contain_oslo__policy('neutron_config').with(
:enforce_scope => false, :enforce_scope => false,