3 describe 'neutron::keystone::auth' do
5 describe 'with default class parameters' do
8 :password => 'neutron_password',
13 it { should contain_keystone_user('neutron').with(
15 :password => 'neutron_password',
19 it { should contain_keystone_user_role('neutron@foobar').with(
24 it { should contain_keystone_service('neutron').with(
27 :description => 'Neutron Networking Service'
30 it { should contain_keystone_endpoint('RegionOne/neutron').with(
32 :public_url => "http://127.0.0.1:9696/",
33 :admin_url => "http://127.0.0.1:9696/",
34 :internal_url => "http://127.0.0.1:9696/"
39 describe 'when configuring neutron-server' do
41 "class { 'neutron::server': auth_password => 'test' }"
45 { :osfamily => 'Debian' }
50 :password => 'neutron_password',
55 it { should contain_keystone_endpoint('RegionOne/neutron').with_notify('Service[neutron-server]') }
58 describe 'when overriding public_protocol, public_port and public address' do
62 :password => 'neutron_password',
63 :public_protocol => 'https',
65 :public_address => '10.10.10.10',
67 :internal_address => '10.10.10.11',
68 :admin_address => '10.10.10.12'
72 it { should contain_keystone_endpoint('RegionOne/neutron').with(
74 :public_url => "https://10.10.10.10:80/",
75 :internal_url => "http://10.10.10.11:81/",
76 :admin_url => "http://10.10.10.12:81/"
81 describe 'when overriding admin_protocol and internal_protocol' do
85 :password => 'neutron_password',
86 :admin_protocol => 'https',
87 :internal_protocol => 'https',
91 it { should contain_keystone_endpoint('RegionOne/neutron').with(
93 :public_url => "http://127.0.0.1:9696/",
94 :admin_url => "https://127.0.0.1:9696/",
95 :internal_url => "https://127.0.0.1:9696/"
100 describe 'when overriding auth name' do
105 :auth_name => 'neutrony'
109 it { should contain_keystone_user('neutrony') }
111 it { should contain_keystone_user_role('neutrony@services') }
113 it { should contain_keystone_service('neutrony') }
115 it { should contain_keystone_endpoint('RegionOne/neutrony') }
119 describe 'when overriding service name' do
123 :service_name => 'neutron_service',
124 :password => 'neutron_password'
128 it { should contain_keystone_user('neutron') }
129 it { should contain_keystone_user_role('neutron@services') }
130 it { should contain_keystone_service('neutron_service') }
131 it { should contain_keystone_endpoint('RegionOne/neutron_service') }
135 describe 'when disabling user configuration' do
139 :password => 'neutron_password',
140 :configure_user => false
144 it { should_not contain_keystone_user('neutron') }
146 it { should contain_keystone_user_role('neutron@services') }
148 it { should contain_keystone_service('neutron').with(
149 :ensure => 'present',
151 :description => 'Neutron Networking Service'
156 describe 'when disabling user and user role configuration' do
160 :password => 'neutron_password',
161 :configure_user => false,
162 :configure_user_role => false
166 it { should_not contain_keystone_user('neutron') }
168 it { should_not contain_keystone_user_role('neutron@services') }
170 it { should contain_keystone_service('neutron').with(
171 :ensure => 'present',
173 :description => 'Neutron Networking Service'