Use glance-swift.conf by default

This patch changes default of the swift_store_config_file parameter,
so that the configuration file generated by puppet-glance is used by
default, instead of requiring users to set the parameter explicitly.

Closes-Bug: #1908917
Change-Id: I4ac04a561746c227b245d11890d02c14a21965d0
This commit is contained in:
Takashi Kajinami 2020-12-22 01:10:39 +09:00
parent 73d1c92a41
commit 26e26d115d
3 changed files with 12 additions and 5 deletions

View File

@ -62,7 +62,7 @@
# Optional. Default: $::os_service_default.
#
# [*swift_store_config_file*]
# Optional. Default: $::os_service_default.
# Optional. Default: '/etc/glance/glance-swift.conf'
#
# [*default_swift_reference*]
# Optional. The reference to the default swift
@ -94,7 +94,7 @@ define glance::backend::multistore::swift(
$swift_store_create_container_on_put = $::os_service_default,
$swift_store_endpoint_type = 'internalURL',
$swift_store_region = $::os_service_default,
$swift_store_config_file = $::os_service_default,
$swift_store_config_file = '/etc/glance/glance-swift.conf',
$default_swift_reference = 'ref1',
$swift_buffer_on_upload = $::os_service_default,
$swift_upload_buffer_dir = $::os_service_default,

View File

@ -0,0 +1,7 @@
---
fixes:
- |
The ``swift::backend::multistore::swift::swift_store_config_file`` is
now set to ``/etc/glance/glance-swift.conf`` by default. Because of this
change the parameter is automatically set to use the configuration file
generated by puppet-glance.

View File

@ -46,7 +46,7 @@ describe 'glance::backend::multistore::swift' do
is_expected.to contain_glance_api_config('swift/swift_store_create_container_on_put').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('swift/swift_store_endpoint_type').with_value('internalURL')
is_expected.to contain_glance_api_config('swift/swift_store_region').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('/etc/glance/glance-swift.conf')
is_expected.to contain_glance_api_config('swift/default_swift_reference').with_value('ref1')
is_expected.to contain_glance_api_config('swift/swift_buffer_on_upload').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('swift/swift_upload_buffer_dir').with_value('<SERVICE DEFAULT>')
@ -75,7 +75,7 @@ describe 'glance::backend::multistore::swift' do
:swift_store_create_container_on_put => true,
:swift_store_endpoint_type => 'publicURL',
:swift_store_region => 'RegionTwo',
:swift_store_config_file => '/etc/glance/glance-swift.conf',
:swift_store_config_file => '/etc/glance/glance-swift2.conf',
:default_swift_reference => 'swift_creds',
:swift_buffer_on_upload => true,
:swift_upload_buffer_dir => '/var/glance/swift',
@ -90,7 +90,7 @@ describe 'glance::backend::multistore::swift' do
is_expected.to contain_glance_api_config('swift/swift_store_large_object_chunk_size').with_value('50')
is_expected.to contain_glance_api_config('swift/swift_store_endpoint_type').with_value('publicURL')
is_expected.to contain_glance_api_config('swift/swift_store_region').with_value('RegionTwo')
is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('/etc/glance/glance-swift.conf')
is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('/etc/glance/glance-swift2.conf')
is_expected.to contain_glance_api_config('swift/default_swift_reference').with_value('swift_creds')
is_expected.to contain_glance_api_config('swift/swift_buffer_on_upload').with_value(true)
is_expected.to contain_glance_api_config('swift/swift_upload_buffer_dir').with_value('/var/glance/swift')