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
changes/03/768103/1
Takashi Kajinami 8 months ago
parent
commit
26e26d115d
  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
@ -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,

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_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')

Loading…
Cancel
Save