summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Pena <jpena@redhat.com>2016-10-17 13:26:15 +0200
committerJavier Peña <jpena@redhat.com>2017-06-06 13:56:56 +0000
commit9bcf09c6efdacc9ca08044fe943af4ff9e253676 (patch)
tree355e802f9106a7fea76c4faeaa178974497740c8
parent83c229fad4085289f361ed53817732d2787fdff8 (diff)
Enable Keystone v3 support for providersstable/newton
tempest_glance_id_setter and tempest_neutron_net_id_setter were previously using Credentialsv2_0, which do not work in a Keystone v3 environment (and that's what we should be using today). Closes-Bug: #1633864 Depends-On: If692ea758e0cacb621b84499e27c585755ee9718 Change-Id: I95ea682064ff6365622fc31c562b42014fc52303 (cherry picked from commit 74424c4a4bbcf32dd6133ed0190515e300f2eccb)
Notes
Notes (review): Code-Review+2: Emilien Macchi <emilien@redhat.com> Code-Review+2: Alex Schultz <aschultz@redhat.com> Workflow+1: Alex Schultz <aschultz@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 06 Jun 2017 23:40:50 +0000 Reviewed-on: https://review.openstack.org/471315 Project: openstack/puppet-tempest Branch: refs/heads/stable/newton
-rw-r--r--lib/puppet/provider/tempest.rb7
-rw-r--r--lib/puppet/provider/tempest_glance_id_setter/openstack.rb2
-rw-r--r--lib/puppet/provider/tempest_neutron_net_id_setter/openstack.rb2
3 files changed, 9 insertions, 2 deletions
diff --git a/lib/puppet/provider/tempest.rb b/lib/puppet/provider/tempest.rb
index 6ec9e2d..68d145c 100644
--- a/lib/puppet/provider/tempest.rb
+++ b/lib/puppet/provider/tempest.rb
@@ -27,6 +27,11 @@ class Puppet::Provider::Tempest < Puppet::Provider::Openstack
27 @credentials.password = tempest_credentials['admin_password'] 27 @credentials.password = tempest_credentials['admin_password']
28 @credentials.project_name = tempest_credentials['admin_project_name'] 28 @credentials.project_name = tempest_credentials['admin_project_name']
29 @credentials.auth_url = tempest_credentials['auth_endpoint'] 29 @credentials.auth_url = tempest_credentials['auth_endpoint']
30 if @credentials.version == '3'
31 @credentials.user_domain_name = tempest_credentials['admin_domain_name']
32 @credentials.project_domain_name = tempest_credentials['admin_domain_name']
33 @credentials.auth_url = tempest_credentials['auth_endpoint_v3']
34 end
30 raise error unless @credentials.set? 35 raise error unless @credentials.set?
31 Puppet::Provider::Openstack.request(service, action, properties, @credentials) 36 Puppet::Provider::Openstack.request(service, action, properties, @credentials)
32 end 37 end
@@ -37,6 +42,8 @@ class Puppet::Provider::Tempest < Puppet::Provider::Openstack
37 t['admin_password'] = tempest_file['auth']['admin_password'] 42 t['admin_password'] = tempest_file['auth']['admin_password']
38 t['admin_project_name'] = tempest_file['auth']['admin_project_name'] 43 t['admin_project_name'] = tempest_file['auth']['admin_project_name']
39 t['auth_endpoint'] = tempest_file['identity']['uri'] 44 t['auth_endpoint'] = tempest_file['identity']['uri']
45 t['auth_endpoint_v3'] = tempest_file['identity']['uri_v3']
46 t['admin_domain_name'] = tempest_file['auth']['admin_domain_name']
40 return t 47 return t
41 end 48 end
42 49
diff --git a/lib/puppet/provider/tempest_glance_id_setter/openstack.rb b/lib/puppet/provider/tempest_glance_id_setter/openstack.rb
index bc43360..7c91223 100644
--- a/lib/puppet/provider/tempest_glance_id_setter/openstack.rb
+++ b/lib/puppet/provider/tempest_glance_id_setter/openstack.rb
@@ -5,7 +5,7 @@ Puppet::Type.type(:tempest_glance_id_setter).provide(
5 :parent => Puppet::Provider::Tempest 5 :parent => Puppet::Provider::Tempest
6) do 6) do
7 7
8 @credentials = Puppet::Provider::Openstack::CredentialsV2_0.new 8 @credentials = Puppet::Provider::Openstack::CredentialsV3.new
9 9
10 def exists? 10 def exists?
11 lines.find do |line| 11 lines.find do |line|
diff --git a/lib/puppet/provider/tempest_neutron_net_id_setter/openstack.rb b/lib/puppet/provider/tempest_neutron_net_id_setter/openstack.rb
index 1a60133..e9542d6 100644
--- a/lib/puppet/provider/tempest_neutron_net_id_setter/openstack.rb
+++ b/lib/puppet/provider/tempest_neutron_net_id_setter/openstack.rb
@@ -5,7 +5,7 @@ Puppet::Type.type(:tempest_neutron_net_id_setter).provide(
5 :parent => Puppet::Provider::Tempest 5 :parent => Puppet::Provider::Tempest
6) do 6) do
7 7
8 @credentials = Puppet::Provider::Openstack::CredentialsV2_0.new 8 @credentials = Puppet::Provider::Openstack::CredentialsV3.new
9 9
10 def exists? 10 def exists?
11 lines.find do |line| 11 lines.find do |line|