Merge "Use identity_uri_transform for identiry_uri support"
This commit is contained in:
commit
2409c9b9d7
|
@ -67,6 +67,7 @@ image_endpoint = internal_endpoint 'image-api'
|
|||
telemetry_api_bind = endpoint 'telemetry-api-bind'
|
||||
|
||||
auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['telemetry']['api']['auth']['version']
|
||||
identity_uri = identity_uri_transform(identity_admin_endpoint)
|
||||
|
||||
Chef::Log.debug("openstack-telemetry::common:service_user|#{service_user}")
|
||||
Chef::Log.debug("openstack-telemetry::common:service_tenant|#{service_tenant}")
|
||||
|
@ -94,10 +95,10 @@ template node['openstack']['telemetry']['conf'] do
|
|||
|
||||
variables(
|
||||
auth_uri: auth_uri,
|
||||
identity_uri: identity_uri,
|
||||
database_connection: db_uri,
|
||||
image_endpoint: image_endpoint,
|
||||
identity_endpoint: identity_endpoint,
|
||||
identity_admin_endpoint: identity_admin_endpoint,
|
||||
mq_service_type: mq_service_type,
|
||||
mq_password: mq_password,
|
||||
rabbit_hosts: rabbit_hosts,
|
||||
|
|
|
@ -96,11 +96,7 @@ describe 'openstack-telemetry::common' do
|
|||
/^rabbit_port = 5672$/,
|
||||
/^rabbit_host = 127.0.0.1$/,
|
||||
/^rabbit_virtual_host = \/$/,
|
||||
/^rabbit_use_ssl = false$/,
|
||||
%r{^auth_uri = http://127.0.0.1:5000/v2.0$},
|
||||
/^auth_host = 127.0.0.1$/,
|
||||
/^auth_port = 35357$/,
|
||||
/^auth_protocol = http$/
|
||||
/^rabbit_use_ssl = false$/
|
||||
].each do |line|
|
||||
expect(chef_run).to render_file(file.name).with_content(line)
|
||||
end
|
||||
|
@ -126,11 +122,7 @@ describe 'openstack-telemetry::common' do
|
|||
/^rabbit_hosts = 1.1.1.1:5672,2.2.2.2:5672$/,
|
||||
/^rabbit_ha_queues = True$/,
|
||||
/^rabbit_virtual_host = \/$/,
|
||||
/^rabbit_use_ssl = false$/,
|
||||
%r{^auth_uri = http://127.0.0.1:5000/v2.0$},
|
||||
/^auth_host = 127.0.0.1$/,
|
||||
/^auth_port = 35357$/,
|
||||
/^auth_protocol = http$/
|
||||
/^rabbit_use_ssl = false$/
|
||||
].each do |line|
|
||||
expect(chef_run).to render_file(file.name).with_content(line)
|
||||
end
|
||||
|
@ -243,19 +235,9 @@ describe 'openstack-telemetry::common' do
|
|||
/^#{Regexp.quote('auth_uri = http://127.0.0.1:5000/v2.0')}$/)
|
||||
end
|
||||
|
||||
it 'has auth_host' do
|
||||
it 'has identity_uri' do
|
||||
expect(chef_run).to render_file(file.name).with_content(
|
||||
/^#{Regexp.quote('auth_host = 127.0.0.1')}$/)
|
||||
end
|
||||
|
||||
it 'has auth_port' do
|
||||
expect(chef_run).to render_file(file.name).with_content(
|
||||
/^auth_port = 35357$/)
|
||||
end
|
||||
|
||||
it 'has auth_protocol' do
|
||||
expect(chef_run).to render_file(file.name).with_content(
|
||||
/^auth_protocol = http$/)
|
||||
/^#{Regexp.quote('identity_uri = http://127.0.0.1:35357/')}$/)
|
||||
end
|
||||
|
||||
it 'has no auth_version' do
|
||||
|
|
|
@ -72,9 +72,7 @@ port = <%= @api_bind_port %>
|
|||
|
||||
[keystone_authtoken]
|
||||
auth_uri = <%= @auth_uri %>
|
||||
auth_host = <%= @identity_admin_endpoint.host %>
|
||||
auth_port = <%= @identity_admin_endpoint.port %>
|
||||
auth_protocol = <%= @identity_admin_endpoint.scheme %>
|
||||
identity_uri = <%= @identity_uri %>
|
||||
<% if node['openstack']['telemetry']['api']['auth']['version'] != 'v2.0' %>
|
||||
auth_version = <%= node['openstack']['telemetry']['api']['auth']['version'] %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue