Use the library method auth_uri_transform.
Use the library method auth_uri_transform to transform the auth_uri by the configured identity_api_version. Change-Id: Ibea34f1104dd369acf1c4527588e3e8dacc83834 Imlements: blueprint move-keystone-authtoken-move-auth-uri-logic
This commit is contained in:
parent
b5866dc969
commit
f586ab102a
|
@ -2,6 +2,10 @@ openstack-dashboard Cookbook CHANGELOG
|
||||||
==============================
|
==============================
|
||||||
This file is used to list changes made in each version of the openstack-dashboard cookbook.
|
This file is used to list changes made in each version of the openstack-dashboard cookbook.
|
||||||
|
|
||||||
|
## 8.1.0
|
||||||
|
### Blue print
|
||||||
|
* Use the library method auth_uri_transform
|
||||||
|
|
||||||
## 8.0.0
|
## 8.0.0
|
||||||
### New version
|
### New version
|
||||||
* Upgrade to upstream Havana release
|
* Upgrade to upstream Havana release
|
||||||
|
|
|
@ -86,11 +86,12 @@ License and Author
|
||||||
| **Author** | Chen Zhiwei (<zhiwchen@cn.ibm.com>) |
|
| **Author** | Chen Zhiwei (<zhiwchen@cn.ibm.com>) |
|
||||||
| **Author** | Jian Hua Geng (<gengjh@cn.ibm.com>) |
|
| **Author** | Jian Hua Geng (<gengjh@cn.ibm.com>) |
|
||||||
| **Author** | Ionut Artarisi (<iartarisi@suse.cz>) |
|
| **Author** | Ionut Artarisi (<iartarisi@suse.cz>) |
|
||||||
|
| **Author** | Eric Zhou (<iartarisi@suse.cz>) |
|
||||||
| | |
|
| | |
|
||||||
| **Copyright** | Copyright (c) 2012, Rackspace US, Inc. |
|
| **Copyright** | Copyright (c) 2012, Rackspace US, Inc. |
|
||||||
| **Copyright** | Copyright (c) 2012-2013, AT&T Services, Inc. |
|
| **Copyright** | Copyright (c) 2012-2013, AT&T Services, Inc. |
|
||||||
| **Copyright** | Copyright (c) 2013, Opscode, Inc. |
|
| **Copyright** | Copyright (c) 2013, Opscode, Inc. |
|
||||||
| **Copyright** | Copyright (c) 2013, IBM, Corp. |
|
| **Copyright** | Copyright (c) 2013-2014, IBM, Corp. |
|
||||||
| **Copyright** | Copyright (c) 2013-2014, SUSE Linux GmbH. |
|
| **Copyright** | Copyright (c) 2013-2014, SUSE Linux GmbH. |
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|
|
@ -4,7 +4,7 @@ maintainer_email 'cookbooks@lists.tfoundry.com'
|
||||||
license 'Apache 2.0'
|
license 'Apache 2.0'
|
||||||
description 'Installs/Configures the OpenStack Dasboard (Horizon)'
|
description 'Installs/Configures the OpenStack Dasboard (Horizon)'
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version '8.0.0'
|
version '8.1.0'
|
||||||
|
|
||||||
recipe 'openstack-dashboard::server', 'Sets up the Horizon dashboard within an Apache `mod_wsgi` container.'
|
recipe 'openstack-dashboard::server', 'Sets up the Horizon dashboard within an Apache `mod_wsgi` container.'
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,16 @@ auth_admin_uri = ::URI.decode identity_admin_endpoint.to_s
|
||||||
identity_endpoint = endpoint 'identity-api'
|
identity_endpoint = endpoint 'identity-api'
|
||||||
auth_uri = ::URI.decode identity_endpoint.to_s
|
auth_uri = ::URI.decode identity_endpoint.to_s
|
||||||
|
|
||||||
|
case node['openstack']['dashboard']['identity_api_version']
|
||||||
|
when 2.0
|
||||||
|
auth_version = 'v2.0'
|
||||||
|
when 3
|
||||||
|
auth_version = 'v3.0'
|
||||||
|
end
|
||||||
|
|
||||||
|
auth_admin_uri = auth_uri_transform auth_admin_uri, auth_version
|
||||||
|
auth_uri = auth_uri_transform auth_uri, auth_version
|
||||||
|
|
||||||
db_pass = get_password 'db', 'horizon'
|
db_pass = get_password 'db', 'horizon'
|
||||||
db_info = db 'dashboard'
|
db_info = db 'dashboard'
|
||||||
|
|
||||||
|
|
|
@ -159,6 +159,11 @@ describe 'openstack-dashboard::server' do
|
||||||
it 'disables simple ip management' do
|
it 'disables simple ip management' do
|
||||||
expect(chef_run).to render_file(file.name).with_content('HORIZON_CONFIG["simple_ip_management"] = False')
|
expect(chef_run).to render_file(file.name).with_content('HORIZON_CONFIG["simple_ip_management"] = False')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'has the identity auth uri settings' do
|
||||||
|
expect(chef_run).to render_file(file.name).with_content('OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000/v2.0"')
|
||||||
|
expect(chef_run).to render_file(file.name).with_content('OPENSTACK_KEYSTONE_ADMIN_URL = "http://127.0.0.1:35357/v2.0"')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'openstack-dashboard syncdb' do
|
describe 'openstack-dashboard syncdb' do
|
||||||
|
|
Loading…
Reference in New Issue