Cleans up the keystone manifest

This patch makes the following changes to the keystone auth manifest:

  * Fixes the tenant variable in the Keystone_user_role notification
  * Modifies the tests to account for the above point

Change-Id: I94716b165750f0a89112028608b78ff6712c54de
This commit is contained in:
Joe Topjian 2013-05-06 14:57:22 -06:00
parent 2bcd52f426
commit e8b669553d
2 changed files with 12 additions and 10 deletions
manifests/keystone
spec/classes

@ -14,7 +14,7 @@ class quantum::keystone::auth (
$region = 'RegionOne' $region = 'RegionOne'
) { ) {
Keystone_user_role["${auth_name}@services"] ~> Service <| name == 'quantum-server' |> Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'quantum-server' |>
if ! $public_port { if ! $public_port {
$real_public_port = $port $real_public_port = $port

@ -5,16 +5,18 @@ describe 'quantum::keystone::auth' do
describe 'with default class parameters' do describe 'with default class parameters' do
let :params do let :params do
{ {
:password => 'quantum_password' :password => 'quantum_password',
:tenant => 'foobar'
} }
end end
it { should contain_keystone_user('quantum').with( it { should contain_keystone_user('quantum').with(
:ensure => 'present', :ensure => 'present',
:password => 'quantum_password' :password => 'quantum_password',
:tenant => 'foobar'
) } ) }
it { should contain_keystone_user_role('quantum@services').with( it { should contain_keystone_user_role('quantum@foobar').with(
:ensure => 'present', :ensure => 'present',
:roles => 'admin' :roles => 'admin'
)} )}
@ -38,13 +40,13 @@ describe 'quantum::keystone::auth' do
let :params do let :params do
{ {
:password => 'quantum_password', :password => 'quantum_password',
:public_protocol => 'https', :public_protocol => 'https',
:public_port => '80', :public_port => '80',
:public_address => '10.10.10.10', :public_address => '10.10.10.10',
:port => '81', :port => '81',
:internal_address => '10.10.10.11', :internal_address => '10.10.10.11',
:admin_address => '10.10.10.12' :admin_address => '10.10.10.12'
} }
end end