Browse Source

Merge "Swift backend: Add the swift_store_service_type parameter"

changes/47/791347/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
76d1c5bff9
3 changed files with 19 additions and 3 deletions
  1. +11
    -3
      manifests/backend/multistore/swift.pp
  2. +5
    -0
      releasenotes/notes/swift_store_service_type-8eaf7267b24c6283.yaml
  3. +3
    -0
      spec/defines/glance_backend_multistore_swift_spec.rb

+ 11
- 3
manifests/backend/multistore/swift.pp View File

@ -56,16 +56,22 @@
# Optional. Default: $::os_service_default.
#
# [*swift_store_endpoint_type*]
# Optional. Default: 'internalURL'
# Optional. Endpoint type of Swift service.
# Default: 'internalURL'
#
# [*swift_store_service_type*]
# Optional. Type of the swift service to use.
# Default: $::os_service_default.
#
# [*swift_store_region*]
# Optional. Default: $::os_service_default.
# Optional. The region of Swift endpoint to use by Glance.
# Default: $::os_service_default.
#
# [*default_swift_reference*]
# Optional. The reference to the default swift
# account/backing store parameters to use for adding
# new images. String value.
# Default to 'ref1'.
# Default: 'ref1'.
#
# [*swift_buffer_on_upload*]
# Optional. Default: $::os_service_default.
@ -95,6 +101,7 @@ define glance::backend::multistore::swift(
$swift_store_large_object_chunk_size = $::os_service_default,
$swift_store_create_container_on_put = $::os_service_default,
$swift_store_endpoint_type = 'internalURL',
$swift_store_service_type = $::os_service_default,
$swift_store_region = $::os_service_default,
$default_swift_reference = 'ref1',
$swift_buffer_on_upload = $::os_service_default,
@ -124,6 +131,7 @@ define glance::backend::multistore::swift(
"${name}/swift_store_large_object_size": value => $swift_store_large_object_size;
"${name}/swift_store_large_object_chunk_size": value => $swift_store_large_object_chunk_size;
"${name}/swift_store_endpoint_type": value => $swift_store_endpoint_type;
"${name}/swift_store_service_type": value => $swift_store_service_type;
"${name}/swift_store_config_file": value => $swift_store_config_file_real;
"${name}/default_swift_reference": value => $default_swift_reference;
"${name}/swift_buffer_on_upload": value => $swift_buffer_on_upload;


+ 5
- 0
releasenotes/notes/swift_store_service_type-8eaf7267b24c6283.yaml View File

@ -0,0 +1,5 @@
---
features:
- |
The ``swift_store_service_type`` parameter has been added to
the ``glance::backend::multistore::swift`` resource type.

+ 3
- 0
spec/defines/glance_backend_multistore_swift_spec.rb View File

@ -45,6 +45,7 @@ describe 'glance::backend::multistore::swift' do
is_expected.to contain_glance_api_config('swift/swift_store_container').with_value('<SERVICE DEFAULT>')
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_service_type').with_value('<SERVICE DEFAULT>')
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('/etc/glance/glance-swift.conf')
is_expected.to contain_glance_api_config('swift/default_swift_reference').with_value('ref1')
@ -74,6 +75,7 @@ describe 'glance::backend::multistore::swift' do
:swift_store_container => 'swift',
:swift_store_create_container_on_put => true,
:swift_store_endpoint_type => 'publicURL',
:swift_store_service_type => 'object-store',
:swift_store_region => 'RegionTwo',
:swift_store_config_file => '/etc/glance/glance-swift2.conf',
:default_swift_reference => 'swift_creds',
@ -89,6 +91,7 @@ describe 'glance::backend::multistore::swift' do
is_expected.to contain_glance_api_config('swift/swift_store_large_object_size').with_value('100')
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_service_type').with_value('object-store')
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-swift2.conf')
is_expected.to contain_glance_api_config('swift/default_swift_reference').with_value('swift_creds')


Loading…
Cancel
Save