mdns: Improve parameter coverage
Change-Id: I140b3c9bc136d488bd5080e1ecb888c4bd703813
This commit is contained in:
@@ -36,6 +36,10 @@
|
||||
# (Optional) mDNS TCP Receive Timeout.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*all_tcp*]
|
||||
# (Optional) Send all traffic over TCP.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*query_enforce_tsig*]
|
||||
# (Optional) Enforce all incoming queries (including AXFR) are TSIG signed.
|
||||
# Defaults to $::os_service_default.
|
||||
@@ -52,6 +56,14 @@
|
||||
# (Optional) mDNS host:port pairs to listen on.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*topic*]
|
||||
# (Optional) RPC topic name for mdns.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*xfr_timeout*]
|
||||
# (Optional) Timeout in seconds for XFR's.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class designate::mdns (
|
||||
$package_ensure = present,
|
||||
$mdns_package_name = $::designate::params::mdns_package_name,
|
||||
@@ -61,10 +73,13 @@ class designate::mdns (
|
||||
$threads = $::os_service_default,
|
||||
$tcp_backlog = $::os_service_default,
|
||||
$tcp_recv_timeout = $::os_service_default,
|
||||
$all_tcp = $::os_service_default,
|
||||
$query_enforce_tsig = $::os_service_default,
|
||||
$storage_driver = $::os_service_default,
|
||||
$max_message_size = $::os_service_default,
|
||||
$listen = $::os_service_default,
|
||||
$topic = $::os_service_default,
|
||||
$xfr_timeout = $::os_service_default,
|
||||
) inherits designate::params {
|
||||
|
||||
include designate::deps
|
||||
@@ -75,10 +90,13 @@ class designate::mdns (
|
||||
'service:mdns/threads' : value => $threads;
|
||||
'service:mdns/tcp_backlog' : value => $tcp_backlog;
|
||||
'service:mdns/tcp_recv_timeout' : value => $tcp_recv_timeout;
|
||||
'service:mdns/all_tcp' : value => $all_tcp;
|
||||
'service:mdns/query_enforce_tsig' : value => $query_enforce_tsig;
|
||||
'service:mdns/storage_driver' : value => $storage_driver;
|
||||
'service:mdns/max_message_size' : value => $max_message_size;
|
||||
'service:mdns/listen' : value => join(any2array($listen), ',');
|
||||
'service:mdns/topic' : value => $topic;
|
||||
'service:mdns/xfr_timeout' : value => $xfr_timeout;
|
||||
}
|
||||
|
||||
designate::generic_service { 'mdns':
|
||||
|
8
releasenotes/notes/mdns-opts-4f1647414b360aed.yaml
Normal file
8
releasenotes/notes/mdns-opts-4f1647414b360aed.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``designate::mdns`` class now supports the following new parameters.
|
||||
|
||||
- ``all_tcp``
|
||||
- ``topic``
|
||||
- ``xfer_timeout``
|
@@ -36,10 +36,13 @@ describe 'designate::mdns' do
|
||||
is_expected.to contain_designate_config('service:mdns/threads').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/tcp_backlog').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/tcp_recv_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/all_tcp').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/query_enforce_tsig').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/storage_driver').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/max_message_size').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/listen').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/topic').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_designate_config('service:mdns/xfr_timeout').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when using custom options' do
|
||||
@@ -49,10 +52,13 @@ describe 'designate::mdns' do
|
||||
:threads => 4,
|
||||
:tcp_backlog => 100,
|
||||
:tcp_recv_timeout => 0.5,
|
||||
:all_tcp => false,
|
||||
:query_enforce_tsig => true,
|
||||
:storage_driver => 'sqlalchemy',
|
||||
:max_message_size => 65535,
|
||||
:listen => ['192.0.2.10:5354', '192.0.2.20:5354'],
|
||||
:topic => 'mdns',
|
||||
:xfr_timeout => 10,
|
||||
})
|
||||
end
|
||||
it 'configures designate-mdns with custom options ' do
|
||||
@@ -60,10 +66,13 @@ describe 'designate::mdns' do
|
||||
is_expected.to contain_designate_config('service:mdns/threads').with_value(4)
|
||||
is_expected.to contain_designate_config('service:mdns/tcp_backlog').with_value(100)
|
||||
is_expected.to contain_designate_config('service:mdns/tcp_recv_timeout').with_value(0.5)
|
||||
is_expected.to contain_designate_config('service:mdns/all_tcp').with_value(false)
|
||||
is_expected.to contain_designate_config('service:mdns/query_enforce_tsig').with_value(true)
|
||||
is_expected.to contain_designate_config('service:mdns/storage_driver').with_value('sqlalchemy')
|
||||
is_expected.to contain_designate_config('service:mdns/max_message_size').with_value(65535)
|
||||
is_expected.to contain_designate_config('service:mdns/listen').with_value('192.0.2.10:5354,192.0.2.20:5354')
|
||||
is_expected.to contain_designate_config('service:mdns/topic').with_value('mdns')
|
||||
is_expected.to contain_designate_config('service:mdns/xfr_timeout').with_value(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user