2 describe 'keystone::roles::admin' do
4 describe 'with only the required params set' do
9 :password => 'ChangeMe',
10 :service_tenant => 'services'
14 it { should contain_keystone_tenant('services').with(
17 :description => 'Tenant for the openstack services'
19 it { should contain_keystone_tenant('openstack').with(
22 :description => 'admin tenant'
24 it { should contain_keystone_user('admin').with(
27 :tenant => 'openstack',
29 :password => 'ChangeMe',
30 :ignore_default_tenant => 'false'
32 it { should contain_keystone_role('admin').with_ensure('present') }
33 it { should contain_keystone_user_role('admin@openstack').with(
40 describe 'when overriding optional params' do
47 :admin_tenant => 'admin',
48 :admin_roles => ['admin', 'heat_stack_owner'],
49 :service_tenant => 'foobar',
50 :ignore_default_tenant => 'true',
51 :admin_tenant_desc => 'admin something else',
52 :service_tenant_desc => 'foobar description',
56 it { should contain_keystone_tenant('foobar').with(
59 :description => 'foobar description'
61 it { should contain_keystone_tenant('admin').with(
64 :description => 'admin something else'
66 it { should contain_keystone_user('admin').with(
72 :ignore_default_tenant => 'true'
74 it { should contain_keystone_user_role('admin@admin').with(
75 :roles => ['admin', 'heat_stack_owner'],
81 describe 'when disabling user configuration' do
85 :configure_user => false
89 it { should_not contain_keystone_user('keystone') }
90 it { should contain_keystone_user_role('keystone@openstack') }
94 describe 'when disabling user and role configuration' do
98 :configure_user => false,
99 :configure_user_role => false
103 it { should_not contain_keystone_user('keystone') }
104 it { should_not contain_keystone_user_role('keystone@openstack') }