Change keystone v2.0 url to v3

Change-Id: Ic90c6394acad605b4a2172b4993bf32cab3e7c20
This commit is contained in:
Tobias Urdin 2019-02-24 13:01:33 +01:00
parent e51177e296
commit 97c5ff3874
5 changed files with 13 additions and 5 deletions

View File

@ -82,7 +82,7 @@ class Puppet::Provider::Glance < Puppet::Provider::Openstack
if g.key?('auth_url') if g.key?('auth_url')
"#{g['auth_url']}/" "#{g['auth_url']}/"
else else
"#{g['auth_protocol']}://#{g['auth_host']}:#{g['auth_port']}#{g['auth_admin_prefix']}/v2.0/" "#{g['auth_protocol']}://#{g['auth_host']}:#{g['auth_port']}#{g['auth_admin_prefix']}/v3/"
end end
end end

View File

@ -12,7 +12,7 @@
# Required. Swift store key. # Required. Swift store key.
# #
# [*swift_store_auth_address*] # [*swift_store_auth_address*]
# Optional. Default: 'http://127.0.0.1:5000/v2.0/' # Optional. Default: 'http://127.0.0.1:5000/v3/'
# #
# [*swift_store_auth_project_domain_id*] # [*swift_store_auth_project_domain_id*]
# Optional. Useful when keystone auth is version 3. Default: default # Optional. Useful when keystone auth is version 3. Default: default
@ -59,7 +59,7 @@
class glance::backend::swift( class glance::backend::swift(
$swift_store_user, $swift_store_user,
$swift_store_key, $swift_store_key,
$swift_store_auth_address = 'http://127.0.0.1:5000/v2.0/', $swift_store_auth_address = 'http://127.0.0.1:5000/v3/',
$swift_store_container = $::os_service_default, $swift_store_container = $::os_service_default,
$swift_store_auth_version = '2', $swift_store_auth_version = '2',
$swift_store_auth_project_domain_id = 'default', $swift_store_auth_project_domain_id = 'default',

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
Glance providers will now build a Keystone V3 instead of V2.0 URL if
the [keystone_authtoken]/auth_url is not set in glance config.
- |
The default value of glance::backend::swift::swift_store_auth_address
is changed from http://127.0.0.1:5000/v2.0/ to http://127.0.0.1:5000/v3/

View File

@ -31,7 +31,7 @@ describe 'glance::backend::swift' do
is_expected.to contain_glance_swift_config('ref1/key').with_value('key') is_expected.to contain_glance_swift_config('ref1/key').with_value('key')
is_expected.to contain_glance_swift_config('ref1/user').with_value('user') is_expected.to contain_glance_swift_config('ref1/user').with_value('user')
is_expected.to contain_glance_swift_config('ref1/auth_version').with_value('2') is_expected.to contain_glance_swift_config('ref1/auth_version').with_value('2')
is_expected.to contain_glance_swift_config('ref1/auth_address').with_value('http://127.0.0.1:5000/v2.0/') is_expected.to contain_glance_swift_config('ref1/auth_address').with_value('http://127.0.0.1:5000/v3/')
is_expected.to contain_glance_swift_config('ref1/user_domain_id').with_value('default') is_expected.to contain_glance_swift_config('ref1/user_domain_id').with_value('default')
is_expected.to contain_glance_swift_config('ref1/project_domain_id').with_value('default') is_expected.to contain_glance_swift_config('ref1/project_domain_id').with_value('default')
end end

View File

@ -10,7 +10,7 @@ describe provider_class do
ENV['OS_USERNAME'] = 'test' ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123' ENV['OS_PASSWORD'] = 'abc123'
ENV['OS_PROJECT_NAME'] = 'test' ENV['OS_PROJECT_NAME'] = 'test'
ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v2.0' ENV['OS_AUTH_URL'] = 'http://127.0.0.1:5000/v3'
end end
describe 'when managing an image' do describe 'when managing an image' do