3 describe 'cinder::keystone::auth' do
9 describe 'with only required params' do
15 it 'should contain auth info' do
17 should contain_keystone_user('cinder').with(
20 :email => 'cinder@localhost',
23 should contain_keystone_user_role('cinder@services').with(
27 should contain_keystone_service('cinder').with(
30 :description => 'Cinder Service'
32 should contain_keystone_service('cinderv2').with(
35 :description => 'Cinder Service v2'
39 it { should contain_keystone_endpoint('RegionOne/cinder').with(
41 :public_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
42 :admin_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
43 :internal_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s'
45 it { should contain_keystone_endpoint('RegionOne/cinderv2').with(
47 :public_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s',
48 :admin_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s',
49 :internal_url => 'http://127.0.0.1:8776/v2/%(tenant_id)s'
54 context 'when overriding endpoint params' do
57 :public_address => '10.0.42.1',
58 :admin_address => '10.0.42.2',
59 :internal_address => '10.0.42.3',
60 :region => 'RegionThree',
62 :admin_protocol => 'https',
63 :internal_protocol => 'https',
64 :public_protocol => 'https',
65 :volume_version => 'v42'
69 it { should contain_keystone_endpoint('RegionThree/cinder').with(
71 :public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s',
72 :admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s',
73 :internal_url => 'https://10.0.42.3:4242/v42/%(tenant_id)s'
76 it { should contain_keystone_endpoint('RegionThree/cinderv2').with(
78 :public_url => 'https://10.0.42.1:4242/v2/%(tenant_id)s',
79 :admin_url => 'https://10.0.42.2:4242/v2/%(tenant_id)s',
80 :internal_url => 'https://10.0.42.3:4242/v2/%(tenant_id)s'
85 describe 'when endpoint should not be configured' do
88 :configure_endpoint => false,
89 :configure_endpoint_v2 => false
92 it { should_not contain_keystone_endpoint('RegionOne/cinder') }
93 it { should_not contain_keystone_endpoint('RegionOne/cinderv2') }
96 describe 'when user should not be configured' do
99 :configure_user => false
103 it { should_not contain_keystone_user('cinder') }
105 it { should contain_keystone_user_role('cinder@services') }
107 it { should contain_keystone_service('cinder').with(
108 :ensure => 'present',
110 :description => 'Cinder Service'
115 describe 'when user and user role should not be configured' do
118 :configure_user => false,
119 :configure_user_role => false
123 it { should_not contain_keystone_user('cinder') }
125 it { should_not contain_keystone_user_role('cinder@services') }
127 it { should contain_keystone_service('cinder').with(
128 :ensure => 'present',
130 :description => 'Cinder Service'