Add support for [glance] swift_account_prefix

Depends-on: https://review.opendev.org/823913
Change-Id: Ie88c25c3722e850530f81d395e62f9e50093e7be
This commit is contained in:
Takashi Kajinami
2022-02-09 18:06:34 +09:00
parent d703dd602f
commit cd74ca4f31
3 changed files with 15 additions and 0 deletions

View File

@@ -63,6 +63,11 @@
# Can not be set together with swift_account_project_name.
# Defaults to $::os_service_default
#
# [*swift_account_prefix*]
# (optional) The prefix added to the project uuid to determine the swift
# account.
# Defaults to $::os_service_default
#
# [*swift_container*]
# (optional) Swift container where Glance images are stored. Used for
# generating temporary URLs.
@@ -112,6 +117,7 @@ class ironic::glance (
$num_retries = $::os_service_default,
$api_insecure = $::os_service_default,
$swift_account = $::os_service_default,
$swift_account_prefix = $::os_service_default,
$swift_container = $::os_service_default,
$swift_endpoint_url = $::os_service_default,
$swift_temp_url_key = $::os_service_default,
@@ -157,6 +163,7 @@ has no effect. Please use ironic::glance::endpoint_override instead.")
'glance/region_name': value => $region_name;
'glance/num_retries': value => $num_retries;
'glance/insecure': value => $api_insecure;
'glance/swift_account_prefix': value => $swift_account_prefix;
'glance/swift_container': value => $swift_container;
'glance/swift_endpoint_url': value => $swift_endpoint_url;
'glance/swift_temp_url_key': value => $swift_temp_url_key, secret => true;

View File

@@ -0,0 +1,5 @@
---
features:
- |
Now puppet-ironic supports managing the ``[glance] swift_account_prefix``
parameter, using the ``ironic::glance::swift_account_prefix`` parameter.

View File

@@ -46,6 +46,7 @@ describe 'ironic::glance' do
is_expected.to contain_ironic_config('glance/insecure').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('glance/num_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('glance/swift_account').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('glance/swift_account_prefix').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('glance/swift_container').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('glance/swift_endpoint_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('glance/swift_temp_url_key').with_value('<SERVICE DEFAULT>').with_secret(true)
@@ -68,6 +69,7 @@ describe 'ironic::glance' do
:api_insecure => true,
:num_retries => 42,
:swift_account => '00000000-0000-0000-0000-000000000000',
:swift_account_prefix => 'AUTH',
:swift_container => 'glance',
:swift_endpoint_url => 'http://example2.com',
:swift_temp_url_key => 'the-key',
@@ -89,6 +91,7 @@ describe 'ironic::glance' do
is_expected.to contain_ironic_config('glance/insecure').with_value(p[:api_insecure])
is_expected.to contain_ironic_config('glance/num_retries').with_value(p[:num_retries])
is_expected.to contain_ironic_config('glance/swift_account').with_value(p[:swift_account])
is_expected.to contain_ironic_config('glance/swift_account_prefix').with_value(p[:swift_account_prefix])
is_expected.to contain_ironic_config('glance/swift_container').with_value(p[:swift_container])
is_expected.to contain_ironic_config('glance/swift_endpoint_url').with_value(p[:swift_endpoint_url])
is_expected.to contain_ironic_config('glance/swift_temp_url_key').with_value(p[:swift_temp_url_key]).with_secret(true)