Expose swift_container and swift_endpoint_url in ironic::glance
Unfortunately, ironic cannot detect swift_endpoint_url from the service catalog, so it has to be provided for 'ansible' and 'direct' deploy methods. Change-Id: I9b19625ed7d86a7827e0c3ef16de1ef9b0976eb0 Related: blueprint ansible-deploy
This commit is contained in:
parent
e4fcf84bdf
commit
18d90c9a11
@ -66,6 +66,15 @@
|
||||
# Can not be set together with swift_account.
|
||||
# Defaults to undef, which leaves the configuration intact
|
||||
#
|
||||
# [*swift_container*]
|
||||
# (optional) Swift container where Glance images are stored. Used for
|
||||
# generating temporary URLs.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_endpoint_url*]
|
||||
# (optional) Swift endpoint to use for generating temporary URLs.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*swift_temp_url_key*]
|
||||
# (optional) The secret token given to Swift to allow temporary URL
|
||||
# downloads. Required for several drivers (e.g. agent_ipmitool).
|
||||
@ -88,6 +97,8 @@ class ironic::glance (
|
||||
$num_retries = $::os_service_default,
|
||||
$api_insecure = $::os_service_default,
|
||||
$swift_account = $::os_service_default,
|
||||
$swift_container = $::os_service_default,
|
||||
$swift_endpoint_url = $::os_service_default,
|
||||
$swift_temp_url_key = $::os_service_default,
|
||||
$swift_temp_url_duration = $::os_service_default,
|
||||
$swift_account_project_name = undef,
|
||||
@ -123,6 +134,8 @@ class ironic::glance (
|
||||
'glance/glance_api_servers': value => $api_servers_converted;
|
||||
'glance/glance_num_retries': value => $num_retries_real;
|
||||
'glance/glance_api_insecure': value => $api_insecure_real;
|
||||
'glance/swift_container': value => $swift_container;
|
||||
'glance/swift_endpoint_url': value => $swift_endpoint_url;
|
||||
'glance/swift_temp_url_key': value => $swift_temp_url_key_real, secret => true;
|
||||
'glance/swift_temp_url_duration': value => $swift_temp_url_duration_real;
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Exposes ``swift_container`` and ``swift_endpoint_url`` in the
|
||||
``ironic::glance`` manifest. The latter is required for ``ansible`` and
|
||||
``direct`` deploy interfaces.
|
@ -45,6 +45,8 @@ describe 'ironic::glance' do
|
||||
is_expected.to contain_ironic_config('glance/glance_api_insecure').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('glance/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_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)
|
||||
is_expected.to contain_ironic_config('glance/swift_temp_url_duration').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
@ -63,6 +65,8 @@ describe 'ironic::glance' do
|
||||
:api_insecure => true,
|
||||
:num_retries => 42,
|
||||
:swift_account => '00000000-0000-0000-0000-000000000000',
|
||||
:swift_container => 'glance',
|
||||
:swift_endpoint_url => 'http://example2.com',
|
||||
:swift_temp_url_key => 'the-key',
|
||||
:swift_temp_url_duration => 3600,
|
||||
)
|
||||
@ -80,6 +84,8 @@ describe 'ironic::glance' do
|
||||
is_expected.to contain_ironic_config('glance/glance_api_insecure').with_value(p[:api_insecure])
|
||||
is_expected.to contain_ironic_config('glance/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_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)
|
||||
is_expected.to contain_ironic_config('glance/swift_temp_url_duration').with_value(p[:swift_temp_url_duration])
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user