Merge "Add ability to configure filesystem metadata related parameters"
This commit is contained in:
commit
5717748d57
|
@ -135,6 +135,16 @@
|
|||
# properties.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*filesystem_store_metadata_file*]
|
||||
# (optional) The path to a file which contains the metadata to be returned
|
||||
# with any location associated with the filesystem store
|
||||
# properties.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*filesystem_store_file_perm*]
|
||||
# (optional) File access permissions for the image files.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*location_strategy*]
|
||||
# (optional) Strategy used to determine the image location order.
|
||||
# Defaults to $::os_service_default.
|
||||
|
@ -322,6 +332,8 @@ class glance::api(
|
|||
$log_facility = undef,
|
||||
$show_image_direct_url = $::os_service_default,
|
||||
$show_multiple_locations = $::os_service_default,
|
||||
$filesystem_store_metadata_file = $::os_service_default,
|
||||
$filesystem_store_file_perm = $::os_service_default,
|
||||
$location_strategy = $::os_service_default,
|
||||
$purge_config = false,
|
||||
$cert_file = $::os_service_default,
|
||||
|
@ -467,6 +479,11 @@ class glance::api(
|
|||
}
|
||||
}
|
||||
|
||||
glance_api_config {
|
||||
'glance_store/filesystem_store_metadata_file': value => $filesystem_store_metadata_file;
|
||||
'glance_store/filesystem_store_file_perm': value => $filesystem_store_file_perm;
|
||||
}
|
||||
|
||||
resources { 'glance_api_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
features:
|
||||
- Add new parameter 'filesystem_store_metadata_file',
|
||||
This parameters needs to be set with file path which
|
||||
must contain a valid JSON object with the keys 'id' and
|
||||
'mountpoint'.
|
||||
- Add new parameter 'filesystem_store_file_perm',
|
||||
File access permissions for the image files.
|
|
@ -25,6 +25,8 @@ describe 'glance::api' do
|
|||
:workers => '7',
|
||||
:show_image_direct_url => '<SERVICE DEFAULT>',
|
||||
:show_multiple_locations => '<SERVICE DEFAULT>',
|
||||
:filesystem_store_metadata_file => '<SERVICE DEFAULT>',
|
||||
:filesystem_store_file_perm => '<SERVICE DEFAULT>',
|
||||
:location_strategy => '<SERVICE DEFAULT>',
|
||||
:purge_config => false,
|
||||
:delayed_delete => '<SERVICE DEFAULT>',
|
||||
|
@ -67,6 +69,8 @@ describe 'glance::api' do
|
|||
:workers => '5',
|
||||
:show_image_direct_url => true,
|
||||
:show_multiple_locations => true,
|
||||
:filesystem_store_metadata_file => '/etc/glance/glance-metadata-file.conf',
|
||||
:filesystem_store_file_perm => '0644',
|
||||
:location_strategy => 'store_type',
|
||||
:delayed_delete => 'true',
|
||||
:scrub_time => '10',
|
||||
|
@ -168,6 +172,15 @@ describe 'glance::api' do
|
|||
end
|
||||
end
|
||||
|
||||
it 'is_expected.to lay down default glance_store api config' do
|
||||
[
|
||||
'filesystem_store_metadata_file',
|
||||
'filesystem_store_file_perm',
|
||||
].each do |config|
|
||||
is_expected.to contain_glance_api_config("glance_store/#{config}").with_value(param_hash[config.intern])
|
||||
end
|
||||
end
|
||||
|
||||
it 'is_expected.to lay down default task & taskflow_executor config' do
|
||||
is_expected.to contain_glance_api_config('task/task_time_to_live').with_value(param_hash[:task_time_to_live])
|
||||
is_expected.to contain_glance_api_config('task/task_executor').with_value(param_hash[:task_executor])
|
||||
|
|
Loading…
Reference in New Issue