3 describe 'keystone::endpoint' do
5 it { should contain_keystone_service('keystone').with(
8 :description => 'OpenStack Identity Service'
11 describe 'with default parameters' do
12 it { should contain_keystone_endpoint('RegionOne/keystone').with(
14 :public_url => 'http://127.0.0.1:5000/v2.0',
15 :admin_url => 'http://127.0.0.1:35357/v2.0',
16 :internal_url => 'http://127.0.0.1:5000/v2.0'
20 describe 'with overridden parameters' do
23 { :version => 'v42.6',
24 :public_url => 'https://identity.some.tld/the/main/endpoint',
25 :admin_url => 'https://identity-int.some.tld/some/admin/endpoint',
26 :internal_url => 'https://identity-int.some.tld/some/internal/endpoint' }
29 it { should contain_keystone_endpoint('RegionOne/keystone').with(
31 :public_url => 'https://identity.some.tld/the/main/endpoint/v42.6',
32 :admin_url => 'https://identity-int.some.tld/some/admin/endpoint/v42.6',
33 :internal_url => 'https://identity-int.some.tld/some/internal/endpoint/v42.6'
37 describe 'without internal_url parameter' do
40 { :public_url => 'https://identity.some.tld/the/main/endpoint' }
43 it 'internal_url should default to public_url' do
44 should contain_keystone_endpoint('RegionOne/keystone').with(
46 :public_url => 'https://identity.some.tld/the/main/endpoint/v2.0',
47 :internal_url => 'https://identity.some.tld/the/main/endpoint/v2.0'
52 describe 'with deprecated parameters' do
55 { :public_address => '10.0.0.1',
56 :admin_address => '10.0.0.2',
57 :internal_address => '10.0.0.3',
58 :public_port => '23456',
59 :admin_port => '12345',
60 :region => 'RegionTwo',
64 it { should contain_keystone_endpoint('RegionTwo/keystone').with(
66 :public_url => 'http://10.0.0.1:23456/v3.0',
67 :admin_url => 'http://10.0.0.2:12345/v3.0',
68 :internal_url => 'http://10.0.0.3:23456/v3.0'
71 describe 'public_address overrides public_url' do
73 { :public_address => '10.0.0.1',
74 :public_port => '12345',
75 :public_url => 'http://10.10.10.10:23456/v3.0' }
78 it { should contain_keystone_endpoint('RegionOne/keystone').with(
80 :public_url => 'http://10.0.0.1:12345/v2.0'
85 describe 'with overridden deprecated internal_port' do
88 { :internal_port => '12345' }
91 it { should contain_keystone_endpoint('RegionOne/keystone').with(
93 :public_url => 'http://127.0.0.1:5000/v2.0',
94 :admin_url => 'http://127.0.0.1:35357/v2.0',
95 :internal_url => 'http://127.0.0.1:12345/v2.0'