Ensure purge_config takes a boolean value

The purge_config parameters only accept boolean values. This enforces
that using the typed parameters.

This also adds a few boolean type enforcements to the ironic class
parameters, which were overlooked during the past attempt to add
boolean parameter validations.

Change-Id: I6a8e812ad92083eb2f139d535a33fd0a05773c13
This commit is contained in:
Takashi Kajinami 2023-07-18 01:01:30 +09:00
parent 7c5b921065
commit af81e83aeb
3 changed files with 10 additions and 9 deletions

View File

@ -241,7 +241,7 @@
# Defaults to $facts['os_service_default']
#
class ironic (
$enabled = true,
Boolean $enabled = true,
$package_ensure = 'present',
$my_ip = $facts['os_service_default'],
$my_ipv6 = $facts['os_service_default'],
@ -280,9 +280,9 @@ class ironic (
$amqp_sasl_config_name = $facts['os_service_default'],
$amqp_username = $facts['os_service_default'],
$amqp_password = $facts['os_service_default'],
$sync_db = true,
$db_online_data_migrations = false,
$purge_config = false,
Boolean $sync_db = true,
Boolean $db_online_data_migrations = false,
Boolean $purge_config = false,
$notification_transport_url = $facts['os_service_default'],
$notification_driver = $facts['os_service_default'],
$notification_topics = $facts['os_service_default'],
@ -298,9 +298,10 @@ class ironic (
include ironic::neutron
ensure_resource( 'package', 'ironic-common', {
ensure => $package_ensure,
name => $::ironic::params::common_package_name,
tag => ['openstack', 'ironic-package'],})
ensure => $package_ensure,
name => $::ironic::params::common_package_name,
tag => ['openstack', 'ironic-package'],
})
package { 'ironic-lib':
ensure => $package_ensure,

View File

@ -52,7 +52,7 @@ class ironic::inspector::policy (
$policy_path = '/etc/ironic-inspector/policy.yaml',
$policy_default_rule = $facts['os_service_default'],
$policy_dirs = $facts['os_service_default'],
$purge_config = false,
Boolean $purge_config = false,
) {
include ironic::deps

View File

@ -52,7 +52,7 @@ class ironic::policy (
$policy_path = '/etc/ironic/policy.yaml',
$policy_default_rule = $facts['os_service_default'],
$policy_dirs = $facts['os_service_default'],
$purge_config = false,
Boolean $purge_config = false,
) {
include ironic::deps