Browse Source

Add region_name parameter to nova::ironic::common

... so that operators can use their customized region_name.

Change-Id: I2e907b59fec6c71f8305266f28a679d4a6e33d84
changes/32/718432/6
Takashi Kajinami 1 year ago
parent
commit
36f99a4389
  1. 6
      manifests/ironic/common.pp
  2. 5
      releasenotes/notes/nova-ironic-common-region_name-4ba5bacbfdf5ed47.yaml
  3. 3
      spec/classes/nova_ironic_common_spec.rb

6
manifests/ironic/common.pp

@ -24,6 +24,10 @@
# (optional) Override the endpoint to use to talk to Ironic.
# Defaults to $::os_service_default
#
# [*region_name*]
# (optional) Region name for connecting to ironic in admin context
# through the OpenStack Identity service.
#
# [*api_max_retries*]
# Max times for ironic driver to poll ironic api
#
@ -51,6 +55,7 @@ class nova::ironic::common (
$project_name = 'services',
$username = 'admin',
$endpoint_override = $::os_service_default,
$region_name = $::os_service_default,
$api_max_retries = $::os_service_default,
$api_retry_interval = $::os_service_default,
$user_domain_name = 'Default',
@ -73,6 +78,7 @@ Use nova::ironic::common::endpoint_override instead.')
'ironic/auth_url': value => $auth_url;
'ironic/project_name': value => $project_name;
'ironic/endpoint_override': value => $endpoint_override;
'ironic/region_name': value => $region_name;
'ironic/api_max_retries': value => $api_max_retries;
'ironic/api_retry_interval': value => $api_retry_interval;
'ironic/user_domain_name': value => $user_domain_name;

5
releasenotes/notes/nova-ironic-common-region_name-4ba5bacbfdf5ed47.yaml

@ -0,0 +1,5 @@
---
features:
- |
The new parameter, nova::ironic::common::region_name was added to set
keystone region used to connect to ironic in admin context.

3
spec/classes/nova_ironic_common_spec.rb

@ -12,6 +12,7 @@ describe 'nova::ironic::common' do
is_expected.to contain_nova_config('ironic/auth_url').with_value('http://127.0.0.1:5000/')
is_expected.to contain_nova_config('ironic/project_name').with_value('services')
is_expected.to contain_nova_config('ironic/endpoint_override').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('ironic/region_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('ironic/api_max_retries').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('ironic/api_retry_interval').with('value' => '<SERVICE DEFAULT>')
is_expected.to contain_nova_config('ironic/user_domain_name').with_value('Default')
@ -28,6 +29,7 @@ describe 'nova::ironic::common' do
:auth_url => 'http://10.0.0.10:5000/',
:project_name => 'services2',
:endpoint_override => 'http://10.0.0.10:6385/v1',
:region_name => 'regionTwo',
:api_max_retries => 60,
:api_retry_interval => 2,
:user_domain_name => 'custom_domain',
@ -42,6 +44,7 @@ describe 'nova::ironic::common' do
is_expected.to contain_nova_config('ironic/auth_url').with_value('http://10.0.0.10:5000/')
is_expected.to contain_nova_config('ironic/project_name').with_value('services2')
is_expected.to contain_nova_config('ironic/endpoint_override').with_value('http://10.0.0.10:6385/v1')
is_expected.to contain_nova_config('ironic/region_name').with_value('regionTwo')
is_expected.to contain_nova_config('ironic/api_max_retries').with('value' => '60')
is_expected.to contain_nova_config('ironic/api_retry_interval').with('value' => '2')
is_expected.to contain_nova_config('ironic/user_domain_name').with('value' => 'custom_domain')

Loading…
Cancel
Save