From 43ab03de72fb0cffd3e9e13efdd8fbdc2fa615ee Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 15 Feb 2020 20:58:57 +0900 Subject: [PATCH] Add region_name for service_auth Add region_name for service_auth configuration, so that we can specify the keystone region where octavia user is created. Change-Id: I4fc556fad4f5051a7a0272f1cb2001afa6d0b05e --- manifests/service_auth.pp | 7 ++++++- .../add-service-auth-region_name-48573c729f77a6b7.yaml | 5 +++++ spec/classes/octavia_service_auth_spec.rb | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-service-auth-region_name-48573c729f77a6b7.yaml diff --git a/manifests/service_auth.pp b/manifests/service_auth.pp index 719360a4..eccfc775 100644 --- a/manifests/service_auth.pp +++ b/manifests/service_auth.pp @@ -31,7 +31,10 @@ # (optional) keystone authentication type # Defaults to $::os_service_default # - +# [*region_name*] +# (Optional) The region in which the identity server can be found. +# Defaults to $::os_service_default. +# class octavia::service_auth ( $auth_url = $::os_service_default, $username = $::os_service_default, @@ -40,6 +43,7 @@ class octavia::service_auth ( $user_domain_name = $::os_service_default, $project_domain_name = $::os_service_default, $auth_type = $::os_service_default, + $region_name = $::os_service_default, ) { include octavia::deps @@ -52,5 +56,6 @@ class octavia::service_auth ( 'service_auth/user_domain_name' : value => $user_domain_name; 'service_auth/project_domain_name' : value => $project_domain_name; 'service_auth/auth_type' : value => $auth_type; + 'service_auth/region_name' : value => $region_name; } } diff --git a/releasenotes/notes/add-service-auth-region_name-48573c729f77a6b7.yaml b/releasenotes/notes/add-service-auth-region_name-48573c729f77a6b7.yaml new file mode 100644 index 00000000..f4b397a6 --- /dev/null +++ b/releasenotes/notes/add-service-auth-region_name-48573c729f77a6b7.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new octavia::service_auth::region_name parameter was added to specify + keystone region where we expect service auth indentity is created diff --git a/spec/classes/octavia_service_auth_spec.rb b/spec/classes/octavia_service_auth_spec.rb index 711c5f00..27dcc0e0 100644 --- a/spec/classes/octavia_service_auth_spec.rb +++ b/spec/classes/octavia_service_auth_spec.rb @@ -12,6 +12,7 @@ describe 'octavia::service_auth' do is_expected.to contain_octavia_config('service_auth/user_domain_name').with_value('') is_expected.to contain_octavia_config('service_auth/project_domain_name').with_value('') is_expected.to contain_octavia_config('service_auth/auth_type').with_value('') + is_expected.to contain_octavia_config('service_auth/region_name').with_value('') end end @@ -24,6 +25,7 @@ describe 'octavia::service_auth' do :user_domain_name => 'my_domain_name', :project_domain_name => 'our_domain_name', :auth_type => 'password', + :region_name => 'region2', } end @@ -35,6 +37,7 @@ describe 'octavia::service_auth' do is_expected.to contain_octavia_config('service_auth/user_domain_name').with_value('my_domain_name') is_expected.to contain_octavia_config('service_auth/project_domain_name').with_value('our_domain_name') is_expected.to contain_octavia_config('service_auth/auth_type').with_value('password') + is_expected.to contain_octavia_config('service_auth/region_name').with_value('region2') end end end