Support customizing pool attributes

Change-Id: Ic3093b91eddeeadbf9fb751df905e259a6f5c6c5
This commit is contained in:
Takashi Kajinami
2024-03-18 01:59:03 +09:00
parent e15d0acdc7
commit beb10536cb
5 changed files with 53 additions and 22 deletions

View File

@@ -54,6 +54,10 @@
# packets to.
# Defaults to [].
#
# [*attributes*]
# (Optional) Pool attribtes used by scheduling.
# Defaults to {}
#
# DEPRECATED PARAMETERS
#
# [*configure_bind*]
@@ -78,6 +82,7 @@ class designate::backend::bind9 (
$mdns_port = 5354,
Boolean $clean_zonefile = false,
Array[String[1]] $also_notifies = [],
Hash[String[1], String[1]] $attributes = {},
# DEPRECATED PARAMETERS
Boolean $configure_bind = true,
Boolean $manage_pool = true,

View File

@@ -37,6 +37,10 @@
# packets to.
# Defaults to [].
#
# [*attributes*]
# (Optional) Pool attribtes used by scheduling.
# Defaults to {}
#
# DEPRECATED PARAMETERS
#
# [*manage_pool*]
@@ -52,6 +56,7 @@ class designate::backend::pdns4 (
String[1] $api_endpoint = 'http://127.0.0.1:8081',
Optional[String[1]] $tsigkey_name = undef,
Array[String[1]] $also_notifies = [],
Hash[String[1], String[1]] $attributes = {},
# DEPRECATED PARAMETERS
Boolean $manage_pool = true,
) {

View File

@@ -0,0 +1,7 @@
---
features:
- |
The ``attributes`` parameter has been added to the following classes.
- ``designate::backend::bind9``
- ``designate::backend::pdns4``

View File

@@ -1,7 +1,14 @@
---
- name: default
description: Default pool
<% if @attributes.empty? -%>
attributes: {}
<% else -%>
attributes:
<% @attributes.sort.each do |key, val| -%>
<%= key %>: <%= val %>
<% end -%>
<% end -%>
ns_records:
<% @ns_records.sort.each do |priority, hostname| -%>

View File

@@ -1,7 +1,14 @@
---
- name: default
description: Default pool
<% if @attributes.empty? -%>
attributes: {}
<% else -%>
attributes:
<% @attributes.sort.each do |key, val| -%>
<%= key %>: <%= val %>
<% end -%>
<% end -%>
targets:
<% @pdns4_hosts.each do |pdns4_host| -%>