Make email parameter optional in roles::admin
The email parameter was mandatory even if it is not used when setting configure_user to false. This commit make the email parameter optional and set a default value to admin@localhost. Change-Id: I2cb092b27b8b3ea2fa082d7bd1b5a20e712c54e4 Signed-off-by: Arnaud Morin <arnaud.morin@gmail.com>
This commit is contained in:

committed by
daniel.pawlik

parent
797921d8f8
commit
9b5e8e2bc2
@@ -11,13 +11,14 @@
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*email*]
|
||||
# The email address for the admin. Required.
|
||||
#
|
||||
# [*password*]
|
||||
# The admin password. Required. In a later release
|
||||
# this will default to $keystone::admin_password.
|
||||
#
|
||||
# [*email*]
|
||||
# The email address for the admin. Optional.
|
||||
# Defaults to 'admin@localhost'.
|
||||
#
|
||||
# [*admin_roles*]
|
||||
# The list of the roles with admin privileges. Optional.
|
||||
# Defaults to ['admin'].
|
||||
@@ -78,8 +79,8 @@
|
||||
# Copyright 2012 Puppetlabs Inc, unless otherwise noted.
|
||||
#
|
||||
class keystone::roles::admin(
|
||||
$email,
|
||||
$password,
|
||||
$email = 'admin@localhost',
|
||||
$admin = 'admin',
|
||||
$admin_tenant = 'openstack',
|
||||
$admin_roles = ['admin'],
|
||||
|
@@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Email parameter is now optional for roles::admin and
|
||||
the default value will be admin@localhost.
|
@@ -18,9 +18,7 @@ describe 'keystone::roles::admin' do
|
||||
describe 'with only the required params set' do
|
||||
let :params do
|
||||
{
|
||||
:email => 'foo@bar',
|
||||
:password => 'ChangeMe',
|
||||
:service_tenant => 'services'
|
||||
:password => 'ChangeMe'
|
||||
}
|
||||
end
|
||||
|
||||
@@ -37,7 +35,7 @@ describe 'keystone::roles::admin' do
|
||||
it { is_expected.to contain_keystone_user('admin').with(
|
||||
:ensure => 'present',
|
||||
:enabled => true,
|
||||
:email => 'foo@bar',
|
||||
:email => 'admin@localhost',
|
||||
:password => 'ChangeMe',
|
||||
)}
|
||||
it { is_expected.to contain_keystone_role('admin').with_ensure('present') }
|
||||
|
Reference in New Issue
Block a user