Merge "Simplify identity endpoint"

This commit is contained in:
Zuul 2018-06-28 14:43:27 +00:00 committed by Gerrit Code Review
commit ca1e49141d
4 changed files with 10 additions and 15 deletions

View File

@ -30,10 +30,8 @@ end
include_recipe 'openstack-identity'
platform_options = node['openstack']['dashboard']['platform']
identity_admin_endpoint = admin_endpoint 'identity'
auth_admin_uri = auth_uri_transform identity_admin_endpoint.to_s, node['openstack']['dashboard']['api']['auth']['version']
identity_endpoint = public_endpoint 'identity'
auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['dashboard']['api']['auth']['version']
auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
http_bind = node['openstack']['bind_service']['dashboard_http']
http_bind_address = bind_address http_bind
@ -78,8 +76,7 @@ template node['openstack']['dashboard']['local_settings_path'] do
variables(
db_pass: db_pass,
db_info: db_info,
auth_uri: auth_uri,
auth_admin_uri: auth_admin_uri,
auth_url: auth_url,
memcached_servers: memcached,
host: horizon_host
)

View File

@ -367,10 +367,6 @@ describe 'openstack-dashboard::horizon' do
expect(chef_run).to render_file(file.name).with_content(%r{OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000/v3"})
end
it 'has a keystone admin url' do
expect(chef_run).to render_file(file.name).with_content(%r{OPENSTACK_KEYSTONE_ADMIN_URL = "http://127.0.0.1:35357/v3"})
end
it 'has a keystone default role' do
node.set['openstack']['dashboard']['keystone_default_role'] = 'keystone_default_role_value'
expect(chef_run).to render_file(file.name).with_content(/^OPENSTACK_KEYSTONE_DEFAULT_ROLE = "keystone_default_role_value"$/)

View File

@ -4,16 +4,19 @@ require 'chefspec/berkshelf'
ChefSpec::Coverage.start! { add_filter 'openstack-dashboard' }
LOG_LEVEL = :fatal
RSpec.configure do |config|
config.color = true
config.formatter = :documentation
config.log_level = :fatal
end
REDHAT_OPTS = {
platform: 'redhat',
version: '7.3',
log_level: LOG_LEVEL,
version: '7.4',
}.freeze
UBUNTU_OPTS = {
platform: 'ubuntu',
version: '16.04',
log_level: LOG_LEVEL,
}.freeze
# Build a regex for a section of lines

View File

@ -170,8 +170,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# ]
OPENSTACK_HOST = "<%= @host %>"
OPENSTACK_KEYSTONE_URL = "<%= @auth_uri %>"
OPENSTACK_KEYSTONE_ADMIN_URL = "<%= @auth_admin_uri %>"
OPENSTACK_KEYSTONE_URL = "<%= @auth_url %>"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "<%= node["openstack"]["dashboard"]["keystone_default_role"] %>"
OPENSTACK_KEYSTONE_ADMIN_ROLES = ["admin"]