Ensure non-empty host list in pools

Some of the host options should not be empty. This enforces that using
parameter types.

Change-Id: Ibb5444462d0b30e8b99199196ec4c36d6f6545ba
This commit is contained in:
Takashi Kajinami 2023-10-28 12:21:51 +09:00
parent 6a61e9b9a2
commit 93fde35225
2 changed files with 5 additions and 5 deletions

View File

@ -60,10 +60,10 @@ class designate::backend::bind9 (
$rndc_controls = undef, $rndc_controls = undef,
$rndc_port = 953, $rndc_port = 953,
Hash[Integer, String] $ns_records = {1 => 'ns1.example.org.'}, Hash[Integer, String] $ns_records = {1 => 'ns1.example.org.'},
Array[String[1]] $nameservers = ['127.0.0.1'], Array[String[1], 1] $nameservers = ['127.0.0.1'],
Array[String[1]] $bind9_hosts = ['127.0.0.1'], Array[String[1], 1] $bind9_hosts = ['127.0.0.1'],
$dns_port = 53, $dns_port = 53,
Array[String[1]] $mdns_hosts = ['127.0.0.1'], Array[String[1], 1] $mdns_hosts = ['127.0.0.1'],
$mdns_port = 5354, $mdns_port = 5354,
Boolean $configure_bind = true, Boolean $configure_bind = true,
Boolean $manage_pool = true, Boolean $manage_pool = true,

View File

@ -38,9 +38,9 @@
# #
class designate::backend::pdns4 ( class designate::backend::pdns4 (
String[1] $api_token, String[1] $api_token,
Array[String[1]] $pdns4_hosts = ['127.0.0.1'], Array[String[1], 1] $pdns4_hosts = ['127.0.0.1'],
$pdns4_port = 53, $pdns4_port = 53,
Array[String[1]] $mdns_hosts = ['127.0.0.1'], Array[String[1], 1] $mdns_hosts = ['127.0.0.1'],
$mdns_port = 5354, $mdns_port = 5354,
String[1] $api_endpoint = 'http://127.0.0.1:8081', String[1] $api_endpoint = 'http://127.0.0.1:8081',
Optional[String[1]] $tsigkey_name = undef, Optional[String[1]] $tsigkey_name = undef,