Browse Source

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
(cherry picked from commit 26e26d115d)
(cherry picked from commit ddb7d4e48e)
changes/69/769369/1
Takashi Kajinami 7 months ago
parent
commit
b25937265d
  1. 4
      manifests/backend/multistore/swift.pp
  2. 7
      releasenotes/notes/change-default-of-swift_store_config_file-e59ff9753f3612a7.yaml
  3. 6
      spec/defines/glance_backend_multistore_swift_spec.rb

4
manifests/backend/multistore/swift.pp

@ -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
@ -88,7 +88,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',
$store_description = $::os_service_default,
) {

7
releasenotes/notes/change-default-of-swift_store_config_file-e59ff9753f3612a7.yaml

@ -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.

6
spec/defines/glance_backend_multistore_swift_spec.rb

@ -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_swift_config('ref1/key').with_value('key')
is_expected.to contain_glance_swift_config('ref1/user').with_value('user')
@ -73,7 +73,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',
}
end
@ -86,7 +86,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_swift_config('swift_creds/key').with_value('key2')
is_expected.to contain_glance_swift_config('swift_creds/user').with_value('user2')

Loading…
Cancel
Save