Add nova::glance::valid_interfaces parameter

Change-Id: I57708346784af2b949d7ab0cdbc42db4187e33c8
This commit is contained in:
Tobias Urdin 2021-01-25 14:02:08 +01:00
parent 8bc2c16c15
commit 482414b513
3 changed files with 13 additions and 0 deletions

View File

@ -8,6 +8,10 @@
# (optional) Override the endpoint to use to talk to Glance.
# Defaults to $::os_service_default
#
# [*valid_interfaces*]
# (optional) List of interfaces, in order of preference.
# Defaults to $::os_service_default
#
# [*num_retries*]
# (optional) Number of retries in glance operation
# Defaults to $::os_service_default
@ -37,6 +41,7 @@
#
class nova::glance (
$endpoint_override = $::os_service_default,
$valid_interfaces = $::os_service_default,
$num_retries = $::os_service_default,
$enable_rbd_download = $::os_service_default,
$rbd_user = $::os_service_default,
@ -52,6 +57,7 @@ class nova::glance (
nova_config {
'glance/endpoint_override': value => $endpoint_override_real;
'glance/valid_interfaces': value => join(any2array($valid_interfaces), ',');
'glance/num_retries': value => $num_retries_real;
'glance/enable_rbd_download': value => $enable_rbd_download;
'glance/rbd_user': value => $rbd_user;

View File

@ -0,0 +1,4 @@
---
features:
- |
Added parameter valid_interfaces to nova::glance class.

View File

@ -10,6 +10,7 @@ describe 'nova::glance' do
it 'configure default params' do
is_expected.to contain_nova_config('glance/endpoint_override').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('glance/valid_interfaces').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('glance/num_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('glance/enable_rbd_download').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('glance/rbd_user').with_value('<SERVICE DEFAULT>')
@ -23,6 +24,7 @@ describe 'nova::glance' do
let :params do
{
:endpoint_override => 'http://localhost:9292',
:valid_interfaces => 'internal',
:num_retries => 3,
:enable_rbd_download => true,
:rbd_user => 'nova',
@ -34,6 +36,7 @@ describe 'nova::glance' do
it 'configure glance params' do
is_expected.to contain_nova_config('glance/endpoint_override').with_value('http://localhost:9292')
is_expected.to contain_nova_config('glance/valid_interfaces').with_value('internal')
is_expected.to contain_nova_config('glance/num_retries').with_value(3)
is_expected.to contain_nova_config('glance/enable_rbd_download').with_value(true)
is_expected.to contain_nova_config('glance/rbd_user').with_value('nova')