Change os_auth_url to use identity_endpoint in conf template

Current template ceilometer.conf.erb is using auth_uri for os_auth_url
which is not a correct approach. This auth_uri is dedicated to be used
by auth_uri under section [keystone_authtoken]. On the other hand, the
passed in identity_endpoint param is not used. Actually, by comparison
with other cookbooks, identity_endpoint should be used for keystone
identity service connection.

Change-Id: I50c631000efe9c82cd83723c1bf9a7c6ef54556c
Closes-bug: #1479399
This commit is contained in:
Yi Ming Yin 2015-07-29 23:04:47 +08:00
parent 7b4eed9eb5
commit 76ba93e362
2 changed files with 18 additions and 1 deletions

View File

@ -345,6 +345,23 @@ describe 'openstack-telemetry::common' do
end
end
context 'set correct os_auth_url' do
it 'set default value for os_auth_url' do
node.set['openstack']['telemetry']['api']['auth']['version'] = 'v3.0'
expect(chef_run).to render_config_file(file.name)\
.with_section_content('DEFAULT', %r{^os_auth_url = http://127.0.0.1:5000/v2.0$})
end
it 'set customized os_auth_url' do
node.set['openstack']['endpoints']['identity-internal']['scheme'] = 'https'
node.set['openstack']['endpoints']['identity-internal']['host'] = 'fakehost'
node.set['openstack']['endpoints']['identity-internal']['port'] = '8888'
node.set['openstack']['endpoints']['identity-internal']['path'] = '/v3'
expect(chef_run).to render_config_file(file.name)\
.with_section_content('DEFAULT', %r{^os_auth_url = https://fakehost:8888/v3$})
end
end
it 'has metering secret' do
r = /^metering_secret = metering_secret$/
expect(chef_run).to render_file(file.name).with_content(r)

View File

@ -1,5 +1,5 @@
[DEFAULT]
os_auth_url = <%= @auth_uri %>
os_auth_url = <%= @identity_endpoint %>
os_tenant_name = <%= @service_tenant_name %>
os_password = <%= @service_pass %>
os_username = <%= @service_user %>