Add parameter to customize service description
Change-Id: I9c35741f5e50d2190684b0b73c043c6125aec586
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
# (Optional) The service name.
|
||||
# Defaults to 'keystone'
|
||||
#
|
||||
# [*service_description*]
|
||||
# (Optional) Description for keystone service.
|
||||
# Defaults to 'OpenStack Identity Service'.
|
||||
#
|
||||
# [*admin_url*]
|
||||
# (Optional) Admin URL for Keystone endpoint.
|
||||
# This url should *not* contain any version or trailing '/'.
|
||||
@@ -70,6 +74,7 @@ class keystone::bootstrap (
|
||||
String[1] $service_project_name = 'services',
|
||||
String[1] $role_name = 'admin',
|
||||
String[1] $service_name = 'keystone',
|
||||
String[1] $service_description = 'OpenStack Identity Service',
|
||||
Keystone::KeystoneEndpointUrl $admin_url = 'http://127.0.0.1:5000',
|
||||
Keystone::KeystonePublicEndpointUrl $public_url = 'http://127.0.0.1:5000',
|
||||
Optional[Keystone::KeystoneEndpointUrl] $internal_url = undef,
|
||||
@@ -175,7 +180,8 @@ class keystone::bootstrap (
|
||||
})
|
||||
|
||||
ensure_resource('keystone_service', "${service_name}::identity", {
|
||||
'ensure' => 'present',
|
||||
'ensure' => 'present',
|
||||
'description' => $service_description,
|
||||
})
|
||||
|
||||
ensure_resource('keystone_endpoint', "${region}/${service_name}::identity", {
|
||||
|
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``keystone::bootstrap::service_description`` parameter has been
|
||||
added.
|
@@ -69,7 +69,10 @@ describe 'keystone::bootstrap' do
|
||||
:roles => ['admin'],
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_keystone_service('keystone::identity').with_ensure('present') }
|
||||
it { is_expected.to contain_keystone_service('keystone::identity').with(
|
||||
:ensure => 'present',
|
||||
:description => 'OpenStack Identity Service'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionOne/keystone::identity').with(
|
||||
:ensure => 'present',
|
||||
@@ -113,6 +116,7 @@ describe 'keystone::bootstrap' do
|
||||
:service_project_name => 'serviceproj',
|
||||
:role_name => 'adminrole',
|
||||
:service_name => 'servicename',
|
||||
:service_description => 'Alternative OpenStack Identity Service',
|
||||
:admin_url => 'http://admin:1234',
|
||||
:public_url => 'http://public:4321',
|
||||
:internal_url => 'http://internal:1342',
|
||||
@@ -181,7 +185,10 @@ describe 'keystone::bootstrap' do
|
||||
:roles => ['adminrole'],
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_keystone_service('servicename::identity').with_ensure('present') }
|
||||
it { is_expected.to contain_keystone_service('servicename::identity').with(
|
||||
:ensure => 'present',
|
||||
:description => 'Alternative OpenStack Identity Service'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_keystone_endpoint('RegionTwo/servicename::identity').with(
|
||||
:ensure => 'present',
|
||||
|
Reference in New Issue
Block a user