Skip to content

Commit

Permalink
Kea 2.4 Updates
Browse files Browse the repository at this point in the history
- Update installation packages to cover versions greater than 2.2
- Kitchen test with Kea 2.4
- Updates for Kea 2.4 release
  - Add `allocator` property to `config_dhcp4`
  - Add `allocator` and `pd_allocator` property to `config_dhcp6`
  - Add `template_test` property to `config_dhcp4_client_class` and `config_dhcp6_client_class`
  • Loading branch information
bmhughes committed Jul 12, 2023
1 parent 9c9a4d9 commit a536d35
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
- 'centos-stream-9'
- 'rockylinux-8'
- 'rockylinux-9'
- 'fedora-36'
- 'fedora-38'
- 'debian-11'
- 'debian-12'
- 'ubuntu-2004'
- 'ubuntu-2204'
suite:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ This file is used to list changes made in each version of isc_kea.

## Unreleased

- Update installation packages to cover versions greater than 2.2
- Kitchen test with Kea 2.4
- Updates for Kea 2.4 release
- Add `allocator` property to `config_dhcp4`
- Add `allocator` and `pd_allocator` property to `config_dhcp6`
- Add `template_test` property to `config_dhcp4_client_class` and `config_dhcp6_client_class`

## 1.0.2 - *2023-07-12*

## 1.0.1 - *2023-07-03*
Expand Down
16 changes: 8 additions & 8 deletions libraries/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def default_kea_debian_key_url
'https://dl.cloudsmith.io/public/isc/kea-2-2/gpg.A8CB727C62565FF8.key'
when '2-3'
'https://dl.cloudsmith.io/public/isc/kea-2-3/gpg.DA05D46B7BABA24A.key'
when '2-4'
'https://dl.cloudsmith.io/public/isc/kea-2-4/gpg.0D9D9A1439E23DB9.key'
else
raise ArgumentError, "Unsupported version #{install_version}"
end
Expand All @@ -60,18 +62,16 @@ def default_kea_debian_key_url
def default_kea_install_packages
case node['platform_family']
when 'amazon', 'fedora', 'rhel'
case install_version.gsub('-', '.').to_f
when 2.3
%w(isc-kea isc-kea-admin isc-kea-common isc-kea-ctrl-agent isc-kea-devel isc-kea-dhcp-ddns isc-kea-dhcp4 isc-kea-dhcp6 isc-kea-doc isc-kea-hooks isc-kea-perfdhcp)
else
if install_version.gsub('-', '.').to_f <= 2.2
%w(isc-kea isc-kea-devel isc-kea-hooks isc-kea-libs isc-kea-shell)
else
%w(isc-kea isc-kea-admin isc-kea-common isc-kea-ctrl-agent isc-kea-devel isc-kea-dhcp-ddns isc-kea-dhcp4 isc-kea-dhcp6 isc-kea-doc isc-kea-hooks isc-kea-perfdhcp)
end
when 'debian'
case install_version.gsub('-', '.').to_f
when 2.3
%w(isc-kea isc-kea-dev isc-kea-perfdhcp)
else
if install_version.gsub('-', '.').to_f <= 2.2
%w(isc-kea-admin isc-kea-common isc-kea-ctrl-agent isc-kea-dev isc-kea-dhcp-ddns-server isc-kea-dhcp4-server isc-kea-dhcp6-server isc-kea-doc)
else
%w(isc-kea isc-kea-dev isc-kea-perfdhcp)
end
else
raise ArgumentError, "Unsupported platform family #{node['platform_family']}"
Expand Down
3 changes: 3 additions & 0 deletions resources/config_dhcp4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def auto_accumulator_options_override
{ config_path_override: %w(Dhcp4) }.freeze
end

property :allocator, String,
equal_to: %w(iterative random flq)

property :authoritative, [true, false]

property :boot_file_name, String
Expand Down
2 changes: 2 additions & 0 deletions resources/config_dhcp4_client_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def auto_accumulator_options_override

property :test, String

property :template_test, String

property :option_def, [Array, Hash],
coerce: proc { |p| p.is_a?(Array) ? p.deep_sort : [p.deep_sort] }

Expand Down
6 changes: 6 additions & 0 deletions resources/config_dhcp6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def auto_accumulator_options_override
{ config_path_override: %w(Dhcp6) }.freeze
end

property :allocator, String,
equal_to: %w(iterative random)

property :cache_threshold, Integer

property :cache_max_age, Integer
Expand Down Expand Up @@ -77,6 +80,9 @@ def auto_accumulator_options_override

property :parked_packet_limit, Integer

property :pd_allocator, String,
equal_to: %w(iterative random flq)

property :preferred_lifetime, Integer

property :rapid_commit, String
Expand Down
2 changes: 2 additions & 0 deletions resources/config_dhcp6_client_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def auto_accumulator_options_override

property :test, String

property :template_test, String

property :option_def, [Array, Hash],
coerce: proc { |p| p.is_a?(Array) ? p.deep_sort : [p.deep_sort] }

Expand Down
3 changes: 3 additions & 0 deletions resources/partial/_config_dhcp4_parameters_subnet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# limitations under the License.
#

property :allocator, String,
equal_to: %w(iterative random flq)

property :subnet_4o6_interface, String

property :subnet_4o6_interface_id, String
Expand Down
6 changes: 6 additions & 0 deletions resources/partial/_config_dhcp6_parameters_subnet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# limitations under the License.
#

property :allocator, String,
equal_to: %w(iterative random)

property :cache_threshold, [Integer, Float]

property :cache_max_age, [Integer, Float]
Expand Down Expand Up @@ -57,6 +60,9 @@

property :max_valid_lifetime, Integer

property :pd_allocator, String,
equal_to: %w(iterative random flq)

property :preferred_lifetime, Integer

property :rapid_commit, [true, false]
Expand Down
2 changes: 1 addition & 1 deletion test/cookbooks/isc_kea_test/recipes/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
#

isc_kea_install 'kea' do
install_version '2.3'
install_version '2.4'
action :install
end

0 comments on commit a536d35

Please sign in to comment.