Fix the port of endpoint

The port is error for endpoint. We should fix it.

Change-Id: I38c5044c506ff4505d18ea046e5f450db3d2daa1
Closes-bug: #1808737
This commit is contained in:
ZhongShengping 2018-12-17 11:32:15 +08:00
parent af77837871
commit 265019a5d0
3 changed files with 33 additions and 25 deletions

View File

@ -33,7 +33,7 @@
#
# [*service_type*]
# (Optional) Type of service.
# Defaults to 'key-manager'.
# Defaults to 'artifact'.
#
# [*region*]
# (Optional) Region for endpoint.
@ -45,21 +45,21 @@
#
# [*service_description*]
# (Optional) Description of the service.
# Default to 'glare FIXME Service'
# Default to 'Glare Artifact Repository Service'
#
# [*public_url*]
# (0ptional) The endpoint's public url.
# This url should *not* contain any trailing '/'.
# Defaults to 'http://127.0.0.1:FIXME'
# Defaults to 'http://127.0.0.1:9494'
#
# [*admin_url*]
# (Optional) The endpoint's admin url.
# This url should *not* contain any trailing '/'.
# Defaults to 'http://127.0.0.1:FIXME'
# Defaults to 'http://127.0.0.1:9494'
#
# [*internal_url*]
# (Optional) The endpoint's internal url.
# Defaults to 'http://127.0.0.1:FIXME
# Defaults to 'http://127.0.0.1:9494
#
class glare::keystone::auth (
$password,
@ -70,12 +70,12 @@ class glare::keystone::auth (
$configure_user = true,
$configure_user_role = true,
$service_name = 'glare',
$service_description = 'glare FIXME Service',
$service_type = 'FIXME',
$service_description = 'Glare Artifact Repository Service',
$service_type = 'artifact',
$region = 'RegionOne',
$public_url = 'http://127.0.0.1:FIXME',
$admin_url = 'http://127.0.0.1:FIXME',
$internal_url = 'http://127.0.0.1:FIXME',
$public_url = 'http://127.0.0.1:9494',
$admin_url = 'http://127.0.0.1:9494',
$internal_url = 'http://127.0.0.1:9494',
) {
include ::glare::deps

View File

@ -0,0 +1,8 @@
---
upgrade:
- The default value for glare::keystone::auth::internal_url
is changed to 'http://127.0.0.1:9494'.
- The default value for glare::keystone::auth::admin_url
is changed to 'http://127.0.0.1:9494'.
- The default value for glare::keystone::auth::public_url
is changed to 'http://127.0.0.1:9494'.

View File

@ -22,16 +22,16 @@ describe 'glare::keystone::auth' do
:roles => ['admin']
)}
it { is_expected.to contain_keystone_service('glare::FIXME').with(
it { is_expected.to contain_keystone_service('glare::artifact').with(
:ensure => 'present',
:description => 'glare FIXME Service'
:description => 'Glare Artifact Repository Service'
) }
it { is_expected.to contain_keystone_endpoint('RegionOne/glare::FIXME').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/glare::artifact').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:FIXME',
:admin_url => 'http://127.0.0.1:FIXME',
:internal_url => 'http://127.0.0.1:FIXME',
:public_url => 'http://127.0.0.1:9494',
:admin_url => 'http://127.0.0.1:9494',
:internal_url => 'http://127.0.0.1:9494',
) }
end
@ -43,7 +43,7 @@ describe 'glare::keystone::auth' do
:admin_url => 'http://10.10.10.12:81', }
end
it { is_expected.to contain_keystone_endpoint('RegionOne/glare::FIXME').with(
it { is_expected.to contain_keystone_endpoint('RegionOne/glare::artifact').with(
:ensure => 'present',
:public_url => 'https://10.10.10.10:80',
:internal_url => 'http://10.10.10.11:81',
@ -59,8 +59,8 @@ describe 'glare::keystone::auth' do
it { is_expected.to contain_keystone_user('glarey') }
it { is_expected.to contain_keystone_user_role('glarey@services') }
it { is_expected.to contain_keystone_service('glare::FIXME') }
it { is_expected.to contain_keystone_endpoint('RegionOne/glare::FIXME') }
it { is_expected.to contain_keystone_service('glare::artifact') }
it { is_expected.to contain_keystone_endpoint('RegionOne/glare::artifact') }
end
context 'when overriding service name' do
@ -72,8 +72,8 @@ describe 'glare::keystone::auth' do
it { is_expected.to contain_keystone_user('glare') }
it { is_expected.to contain_keystone_user_role('glare@services') }
it { is_expected.to contain_keystone_service('glare_service::FIXME') }
it { is_expected.to contain_keystone_endpoint('RegionOne/glare_service::FIXME') }
it { is_expected.to contain_keystone_service('glare_service::artifact') }
it { is_expected.to contain_keystone_endpoint('RegionOne/glare_service::artifact') }
end
context 'when disabling user configuration' do
@ -87,9 +87,9 @@ describe 'glare::keystone::auth' do
it { is_expected.not_to contain_keystone_user('glare') }
it { is_expected.to contain_keystone_user_role('glare@services') }
it { is_expected.to contain_keystone_service('glare::FIXME').with(
it { is_expected.to contain_keystone_service('glare::artifact').with(
:ensure => 'present',
:description => 'glare FIXME Service'
:description => 'Glare Artifact Repository Service'
) }
end
@ -106,9 +106,9 @@ describe 'glare::keystone::auth' do
it { is_expected.not_to contain_keystone_user('glare') }
it { is_expected.not_to contain_keystone_user_role('glare@services') }
it { is_expected.to contain_keystone_service('glare::FIXME').with(
it { is_expected.to contain_keystone_service('glare::artifact').with(
:ensure => 'present',
:description => 'glare FIXME Service'
:description => 'Glare Artifact Repository Service'
) }
end