From c6a23f4e07b79aef5156ef4c67fb197d1b55ea00 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 17 Jan 2024 15:30:28 +0900 Subject: [PATCH] healthcheck: Expose allowed_source_ranges ... which was added to puppet-oslo recently. Depends-on: https://review.opendev.org/905557 Change-Id: I6d91c2159eb005963afe04f99dafb34d97927f83 --- manifests/healthcheck.pp | 7 +++++++ ...healthcheck-allowed_source_ranges-a23636d1e47859e9.yaml | 5 +++++ spec/classes/neutron_healthcheck_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/healthcheck-allowed_source_ranges-a23636d1e47859e9.yaml diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index a13b02abb..21f4782e1 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -13,6 +13,11 @@ # that information back as part of a request. # Defaults to $facts['os_service_default'] # +# [*allowed_source_ranges*] +# (Optional) A list of network addresses to limit source ip allowed to access +# healthcheck information. +# Defaults to $facts['os_service_default'] +# # [*disable_by_file_path*] # (Optional) Check the presence of a file to determine if an application # is running on a port. @@ -26,6 +31,7 @@ class neutron::healthcheck ( $detailed = $facts['os_service_default'], $backends = $facts['os_service_default'], + $allowed_source_ranges = $facts['os_service_default'], $disable_by_file_path = $facts['os_service_default'], $disable_by_file_paths = $facts['os_service_default'], ) { @@ -35,6 +41,7 @@ class neutron::healthcheck ( oslo::healthcheck { 'neutron_config': detailed => $detailed, backends => $backends, + allowed_source_ranges => $allowed_source_ranges, disable_by_file_path => $disable_by_file_path, disable_by_file_paths => $disable_by_file_paths, } diff --git a/releasenotes/notes/healthcheck-allowed_source_ranges-a23636d1e47859e9.yaml b/releasenotes/notes/healthcheck-allowed_source_ranges-a23636d1e47859e9.yaml new file mode 100644 index 000000000..fee759645 --- /dev/null +++ b/releasenotes/notes/healthcheck-allowed_source_ranges-a23636d1e47859e9.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``neutron::healthcheck::allowed_source_ranges`` parameter has been + added. diff --git a/spec/classes/neutron_healthcheck_spec.rb b/spec/classes/neutron_healthcheck_spec.rb index c35edcff1..30fc8afdd 100644 --- a/spec/classes/neutron_healthcheck_spec.rb +++ b/spec/classes/neutron_healthcheck_spec.rb @@ -13,6 +13,7 @@ describe 'neutron::healthcheck' do is_expected.to contain_oslo__healthcheck('neutron_config').with( :detailed => '', :backends => '', + :allowed_source_ranges => '', :disable_by_file_path => '', :disable_by_file_paths => '', ) @@ -24,6 +25,7 @@ describe 'neutron::healthcheck' do { :detailed => true, :backends => ['disable_by_file'], + :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], :disable_by_file_path => '/etc/neutron/healthcheck/disabled', :disable_by_file_paths => ['9696:/etc/neutron/healthcheck/disabled'], } @@ -33,6 +35,7 @@ describe 'neutron::healthcheck' do is_expected.to contain_oslo__healthcheck('neutron_config').with( :detailed => true, :backends => ['disable_by_file'], + :allowed_source_ranges => ['10.0.0.0/24', '10.0.1.0/24'], :disable_by_file_path => '/etc/neutron/healthcheck/disabled', :disable_by_file_paths => ['9696:/etc/neutron/healthcheck/disabled'], )