From 9b5d759255188c56065c8aedfaccbf317c4284d7 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Fri, 25 Jan 2019 17:36:52 +0100 Subject: [PATCH] Deploy Sahara with unversioned endpoints Sahara supports unversioned endpoint also for the current API v1.1, and deploying with unversioned endpoints is a better setting if people want to use both API v1.1 and the (soon-stable) API v2 at the same time. See https://review.openstack.org/#/c/582285/ for more details. Depends-On: https://review.openstack.org/633162 Closes-Bug: #1782147 Change-Id: I50c87c03c4a1524246562cc849432e50a1e809ce --- manifests/keystone/auth.pp | 18 +++++++++--------- spec/classes/sahara_keystone_auth_spec.rb | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 7a8272fd..35dcd4d4 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -42,25 +42,25 @@ # [*public_url*] # (Optional) The endpoint's public url. # This url should *not* contain any trailing '/'. -# Defaults to 'http://127.0.0.1:8386/v1.1/%(tenant_id)s' +# Defaults to 'http://127.0.0.1:8386' # # [*admin_url*] # (Optional) The endpoint's admin url. # This url should *not* contain any trailing '/'. -# Defaults to 'http://127.0.0.1:8386/v1.1/%(tenant_id)s' +# Defaults to 'http://127.0.0.1:8386' # # [*internal_url*] # (Optional) The endpoint's internal url. # This url should *not* contain any trailing '/'. -# Defaults to 'http://127.0.0.1:8386/v1.1/%(tenant_id)s' +# Defaults to 'http://127.0.0.1:8386' # # === Examples # # class { 'sahara::keystone::auth': # password => 'secret', -# public_url => 'https://10.0.0.10:8386/v1.1/%(tenant_id)s', -# internal_url => 'https://10.0.0.11:8386/v1.1/%(tenant_id)s', -# admin_url => 'https://10.0.0.11:8386/v1.1/%(tenant_id)s', +# public_url => 'https://10.0.0.10:8386', +# internal_url => 'https://10.0.0.11:8386', +# admin_url => 'https://10.0.0.11:8386', # } # class sahara::keystone::auth( @@ -73,9 +73,9 @@ class sahara::keystone::auth( $service_description = 'Sahara Data Processing', $configure_endpoint = true, $region = 'RegionOne', - $public_url = 'http://127.0.0.1:8386/v1.1/%(tenant_id)s', - $admin_url = 'http://127.0.0.1:8386/v1.1/%(tenant_id)s', - $internal_url = 'http://127.0.0.1:8386/v1.1/%(tenant_id)s', + $public_url = 'http://127.0.0.1:8386', + $admin_url = 'http://127.0.0.1:8386', + $internal_url = 'http://127.0.0.1:8386', ) { include ::sahara::deps diff --git a/spec/classes/sahara_keystone_auth_spec.rb b/spec/classes/sahara_keystone_auth_spec.rb index ede1c3be..3f8e1008 100644 --- a/spec/classes/sahara_keystone_auth_spec.rb +++ b/spec/classes/sahara_keystone_auth_spec.rb @@ -29,9 +29,9 @@ describe 'sahara::keystone::auth' do it { is_expected.to contain_keystone_endpoint('RegionOne/sahara::data-processing').with( :ensure => 'present', - :public_url => "http://127.0.0.1:8386/v1.1/%(tenant_id)s", - :admin_url => "http://127.0.0.1:8386/v1.1/%(tenant_id)s", - :internal_url => "http://127.0.0.1:8386/v1.1/%(tenant_id)s" + :public_url => "http://127.0.0.1:8386", + :admin_url => "http://127.0.0.1:8386", + :internal_url => "http://127.0.0.1:8386" ) } end @@ -49,16 +49,16 @@ describe 'sahara::keystone::auth' do context 'with endpoint parameters' do let :params do { :password => 'sahara_password', - :public_url => 'https://10.10.10.10:80/v1.1/%(tenant_id)s', - :internal_url => 'http://10.10.10.11:81/v1.1/%(tenant_id)s', - :admin_url => 'http://10.10.10.12:81/v1.1/%(tenant_id)s' } + :public_url => 'https://10.10.10.10:80', + :internal_url => 'http://10.10.10.11:81', + :admin_url => 'http://10.10.10.12:81' } end it { is_expected.to contain_keystone_endpoint('RegionOne/sahara::data-processing').with( :ensure => 'present', - :public_url => 'https://10.10.10.10:80/v1.1/%(tenant_id)s', - :internal_url => 'http://10.10.10.11:81/v1.1/%(tenant_id)s', - :admin_url => 'http://10.10.10.12:81/v1.1/%(tenant_id)s' + :public_url => 'https://10.10.10.10:80', + :internal_url => 'http://10.10.10.11:81', + :admin_url => 'http://10.10.10.12:81' ) } end