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
This commit is contained in:
Luigi Toscano 2019-01-25 17:36:52 +01:00
parent 5b8ea47ff8
commit 9b5d759255
2 changed files with 18 additions and 18 deletions

View File

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

View File

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