From fd3d9ceb621e5f82a8278cce23e623393a98c160 Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Mon, 7 Oct 2019 15:10:34 -0700 Subject: [PATCH] Fixes to support fog-openstack-1.x fog-openstack-1.x already appends "auth/tokens" so we no longer need to do that. In addition, re-add openstack_endpoint_type which is now fixed now that this [1] has been released upstream. [1] https://github.com/fog/fog-openstack/pull/494 Change-Id: I06ee3681ff8bc90f15b2b0ecbdcaebe475709b31 Signed-off-by: Lance Albertson --- recipes/identity_registration.rb | 4 +++- spec/identity_registration_spec.rb | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 57b7367..b63c135 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -33,12 +33,14 @@ admin_pass = get_password 'user', node['openstack']['identity']['admin_user'] admin_project = node['openstack']['identity']['admin_project'] admin_domain = node['openstack']['identity']['admin_domain_name'] service_domain_name = node['openstack']['telemetry']['conf']['keystone_authtoken']['user_domain_name'] +endpoint_type = node['openstack']['identity']['endpoint_type'] connection_params = { - openstack_auth_url: "#{auth_url}/auth/tokens", + openstack_auth_url: auth_url, openstack_username: admin_user, openstack_api_key: admin_pass, openstack_project_name: admin_project, openstack_domain_name: admin_domain, + openstack_endpoint_type: endpoint_type, } %w(telemetry telemetry_metric aodh).each do |telemetry_service| diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb index f484fe2..ca34b22 100644 --- a/spec/identity_registration_spec.rb +++ b/spec/identity_registration_spec.rb @@ -25,11 +25,12 @@ describe 'openstack-telemetry::identity_registration' do end connection_params = { - openstack_auth_url: 'http://127.0.0.1:5000/v3/auth/tokens', + openstack_auth_url: 'http://127.0.0.1:5000/v3', openstack_username: 'admin', openstack_api_key: 'admin-pass', openstack_project_name: 'admin', openstack_domain_name: 'default', + openstack_endpoint_type: 'internalURL', } service_user = service_name url = "http://127.0.0.1:#{port}"