Make service tenant name configurable in keystone::roles::admin

Though "services" seems to be a fairly common name for the service
tenant, some people may prefer to use "service" or some other name.

The puppet-glance module, and others, do allow overriding the
service tenant name.

Change-Id: I4764cbf21821db96fac93ea4abdaf7d14bd12771
This commit is contained in:
Florian Haas
2013-05-10 13:34:23 +02:00
committed by Joe Topjian
parent 60040af2a3
commit f7f2ef7d45
2 changed files with 17 additions and 9 deletions

View File

@@ -29,11 +29,12 @@
class keystone::roles::admin(
$email,
$password,
$admin = 'admin',
$admin_tenant = 'openstack'
$admin = 'admin',
$admin_tenant = 'openstack',
$service_tenant = 'services'
) {
keystone_tenant { 'services':
keystone_tenant { $service_tenant:
ensure => present,
enabled => 'True',
description => 'Tenant for the openstack services',

View File

@@ -5,8 +5,9 @@ describe 'keystone::roles::admin' do
let :params do
{
:email => 'foo@bar',
:password => 'ChangeMe'
:email => 'foo@bar',
:password => 'ChangeMe',
:service_tenant => 'services'
}
end
@@ -41,13 +42,19 @@ describe 'keystone::roles::admin' do
let :params do
{
:admin => 'admin',
:email => 'foo@baz',
:password => 'foo',
:admin_tenant => 'admin'
:admin => 'admin',
:email => 'foo@baz',
:password => 'foo',
:admin_tenant => 'admin',
:service_tenant => 'foobar'
}
end
it { should contain_keystone_tenant('foobar').with(
:ensure => 'present',
:enabled => 'True',
:description => 'Tenant for the openstack services'
)}
it { should contain_keystone_tenant('admin').with(
:ensure => 'present',
:enabled => 'True',