Merge "Add support for [healthcheck] enable_by_file_paths"
This commit is contained in:
3 changed files with 21 additions and 0 deletions
@@ -32,6 +32,11 @@
#isrunningonaport.Expectsa"port:path"listofstrings.
#Defaultsto$facts['os_service_default']
#
#[*enable_by_file_paths*]
#(Optional)Checkthepresenceoffiles.UsedbyEnableByFilesHealthcheck
#plugin.
#Defaultsto$facts['os_service_default']
#
defineoslo::healthcheck(
$detailed=$facts['os_service_default'],
$backends=$facts['os_service_default'],
@@ -39,11 +44,13 @@ define oslo::healthcheck(
$ignore_proxied_requests=$facts['os_service_default'],
$disable_by_file_path=$facts['os_service_default'],
$disable_by_file_paths=$facts['os_service_default'],
$enable_by_file_paths=$facts['os_service_default'],
){
$backends_real = join(any2array($backends), ',')
$allowed_source_ranges_real = join(any2array($allowed_source_ranges), ',')
$disable_by_file_paths_real = join(any2array($disable_by_file_paths), ',')
$enable_by_file_paths_real = join(any2array($enable_by_file_paths), ',')
$healthcheck_options = {
'healthcheck/detailed' => { value => $detailed },
@@ -52,6 +59,7 @@ define oslo::healthcheck(
'healthcheck/ignore_proxied_requests'=>{ value => $ignore_proxied_requests },
'healthcheck/disable_by_file_path'=>{ value => $disable_by_file_path },
'healthcheck/disable_by_file_paths'=>{ value => $disable_by_file_paths_real },
'healthcheck/enable_by_file_paths'=>{ value => $enable_by_file_paths_real },
}
create_resources($name,$healthcheck_options)
}
@@ -0,0 +1,5 @@
---
features:
- |
The new ``oslo::healthcheck::enable_by_file_paths`` parameter has been
added.
@@ -18,6 +18,7 @@ describe 'oslo::healthcheck' do
is_expected.to contain_keystone_config('healthcheck/ignore_proxied_requests').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('healthcheck/disable_by_file_path').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('healthcheck/disable_by_file_paths').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('healthcheck/enable_by_file_paths').with_value('<SERVICE DEFAULT>')
end
end
@@ -32,6 +33,10 @@ describe 'oslo::healthcheck' do
'5000:/etc/keystone/healthcheck/public-disabled',
'35357:/etc/keystone/healthcheck/admin-disabled'
],
:enable_by_file_paths => [
'/etc/keystone/healthcheck/enabled0',
'/etc/keystone/healthcheck/enabled1'
],
:ignore_proxied_requests => false,
}
end
@@ -51,6 +56,9 @@ describe 'oslo::healthcheck' do
is_expected.to contain_keystone_config('healthcheck/disable_by_file_paths').with_value(
'5000:/etc/keystone/healthcheck/public-disabled,35357:/etc/keystone/healthcheck/admin-disabled'
)
is_expected.to contain_keystone_config('healthcheck/enable_by_file_paths').with_value(
'/etc/keystone/healthcheck/enabled0,/etc/keystone/healthcheck/enabled1'
)
end
end
end
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.