From 97c5ff3874fc2cf59eacd0f2fdd87f898747b400 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 24 Feb 2019 13:01:33 +0100 Subject: [PATCH] Change keystone v2.0 url to v3 Change-Id: Ic90c6394acad605b4a2172b4993bf32cab3e7c20 --- lib/puppet/provider/glance.rb | 2 +- manifests/backend/swift.pp | 4 ++-- .../notes/change-keystone-v3-ea41e2839447cd71.yaml | 8 ++++++++ spec/classes/glance_backend_swift_spec.rb | 2 +- spec/unit/provider/glance_image_spec.rb | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/change-keystone-v3-ea41e2839447cd71.yaml diff --git a/lib/puppet/provider/glance.rb b/lib/puppet/provider/glance.rb index caadfcc9..288facf6 100644 --- a/lib/puppet/provider/glance.rb +++ b/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 diff --git a/manifests/backend/swift.pp b/manifests/backend/swift.pp index c791464d..a30284ed 100644 --- a/manifests/backend/swift.pp +++ b/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', diff --git a/releasenotes/notes/change-keystone-v3-ea41e2839447cd71.yaml b/releasenotes/notes/change-keystone-v3-ea41e2839447cd71.yaml new file mode 100644 index 00000000..a1d90013 --- /dev/null +++ b/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/ diff --git a/spec/classes/glance_backend_swift_spec.rb b/spec/classes/glance_backend_swift_spec.rb index 796807d8..9eb1c7ac 100644 --- a/spec/classes/glance_backend_swift_spec.rb +++ b/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 diff --git a/spec/unit/provider/glance_image_spec.rb b/spec/unit/provider/glance_image_spec.rb index dc688b2b..b00cba2b 100644 --- a/spec/unit/provider/glance_image_spec.rb +++ b/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