Browse Source

Change keystone v2.0 url to v3

Change-Id: Ic90c6394acad605b4a2172b4993bf32cab3e7c20
changes/37/638937/1
Tobias Urdin 3 years ago
parent
commit
97c5ff3874
  1. 2
      lib/puppet/provider/glance.rb
  2. 4
      manifests/backend/swift.pp
  3. 8
      releasenotes/notes/change-keystone-v3-ea41e2839447cd71.yaml
  4. 2
      spec/classes/glance_backend_swift_spec.rb
  5. 2
      spec/unit/provider/glance_image_spec.rb

2
lib/puppet/provider/glance.rb

@ -82,7 +82,7 @@ class Puppet::Provider::Glance < Puppet::Provider::Openstack
if g.key?('auth_url')
"#{g['auth_url']}/"
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

4
manifests/backend/swift.pp

@ -12,7 +12,7 @@
# Required. Swift store key.
#
# [*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*]
# Optional. Useful when keystone auth is version 3. Default: default
@ -59,7 +59,7 @@
class glance::backend::swift(
$swift_store_user,
$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_auth_version = '2',
$swift_store_auth_project_domain_id = 'default',

8
releasenotes/notes/change-keystone-v3-ea41e2839447cd71.yaml

@ -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/

2
spec/classes/glance_backend_swift_spec.rb

@ -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/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_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/project_domain_id').with_value('default')
end

2
spec/unit/provider/glance_image_spec.rb

@ -10,7 +10,7 @@ describe provider_class do
ENV['OS_USERNAME'] = 'test'
ENV['OS_PASSWORD'] = 'abc123'
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
describe 'when managing an image' do

Loading…
Cancel
Save