From a26d528b5e34c79d8a7bdf60c5f58199f5b86bba Mon Sep 17 00:00:00 2001 From: Jan Klare Date: Fri, 12 Feb 2016 18:38:19 +0100 Subject: [PATCH] invert the order of endpoint and bind_service attributes * endpoint type (admin, internal, public) and service (identitiy, network etc.) was switched during refactoring, this patch reverts this unintended switching Change-Id: Ia5bddfc5e2fd77cd6e9e855c680b079f78fc1c3f Depends-On: Iec485deaf415e4187a323435cce2b6bbadfc5d42 --- attributes/default.rb | 14 +++++++------- recipes/server-apache.rb | 6 +++--- spec/registration_spec.rb | 24 ++++++++++++------------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index b4e27c8..15456d6 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -31,17 +31,17 @@ default['openstack']['identity']['custom_template_banner'] = " # access and use them %w(public internal admin).each do |ep_type| # openstack identity service endpoints (used by users and services) - default['openstack']['endpoints']['identity'][ep_type]['host'] = '127.0.0.1' - default['openstack']['endpoints']['identity'][ep_type]['scheme'] = 'http' - default['openstack']['endpoints']['identity'][ep_type]['path'] = '/v2.0' + default['openstack']['endpoints'][ep_type]['identity']['host'] = '127.0.0.1' + default['openstack']['endpoints'][ep_type]['identity']['scheme'] = 'http' + default['openstack']['endpoints'][ep_type]['identity']['path'] = '/v2.0' # web-service (e.g. apache) listen address (can be different from openstack # identity endpoints) - default['openstack']['bind_service']['identity'][ep_type]['host'] = '127.0.0.1' + default['openstack']['bind_service'][ep_type]['identity']['host'] = '127.0.0.1' end %w(endpoints bind_service).each do |type| - default['openstack'][type]['identity']['public']['port'] = 5000 - default['openstack'][type]['identity']['internal']['port'] = 5001 - default['openstack'][type]['identity']['admin']['port'] = 35357 + default['openstack'][type]['public']['identity']['port'] = 5000 + default['openstack'][type]['internal']['identity']['port'] = 5001 + default['openstack'][type]['admin']['identity']['port'] = 35357 end default['openstack']['identity']['catalog']['backend'] = 'sql' diff --git a/recipes/server-apache.rb b/recipes/server-apache.rb index f8792a7..03765fa 100644 --- a/recipes/server-apache.rb +++ b/recipes/server-apache.rb @@ -135,9 +135,9 @@ if node['openstack']['auth']['strategy'] == 'pki' end end -public_bind_service = node['openstack']['bind_service']['identity']['public'] -internal_bind_service = node['openstack']['bind_service']['identity']['internal'] -admin_bind_service = node['openstack']['bind_service']['identity']['admin'] +public_bind_service = node['openstack']['bind_service']['public']['identity'] +internal_bind_service = node['openstack']['bind_service']['internal']['identity'] +admin_bind_service = node['openstack']['bind_service']['admin']['identity'] identity_admin_endpoint = admin_endpoint 'identity' diff --git a/spec/registration_spec.rb b/spec/registration_spec.rb index cb6c259..d8eaeee 100644 --- a/spec/registration_spec.rb +++ b/spec/registration_spec.rb @@ -252,15 +252,15 @@ describe 'openstack-identity::registration' do end it 'overrides identity endpoints' do - node.set['openstack']['endpoints']['identity']['admin']['host'] = '127.0.0.2' - node.set['openstack']['endpoints']['identity']['admin']['port'] = '5002' - node.set['openstack']['endpoints']['identity']['admin']['path'] = '/v2.2' - node.set['openstack']['endpoints']['identity']['internal']['host'] = '127.0.0.3' - node.set['openstack']['endpoints']['identity']['internal']['port'] = '5003' - node.set['openstack']['endpoints']['identity']['internal']['path'] = '/v2.3' - node.set['openstack']['endpoints']['identity']['public']['host'] = '127.0.0.4' - node.set['openstack']['endpoints']['identity']['public']['port'] = '5004' - node.set['openstack']['endpoints']['identity']['public']['path'] = '/v2.4' + node.set['openstack']['endpoints']['admin']['identity']['host'] = '127.0.0.2' + node.set['openstack']['endpoints']['admin']['identity']['port'] = '5002' + node.set['openstack']['endpoints']['admin']['identity']['path'] = '/v2.2' + node.set['openstack']['endpoints']['internal']['identity']['host'] = '127.0.0.3' + node.set['openstack']['endpoints']['internal']['identity']['port'] = '5003' + node.set['openstack']['endpoints']['internal']['identity']['path'] = '/v2.3' + node.set['openstack']['endpoints']['public']['identity']['host'] = '127.0.0.4' + node.set['openstack']['endpoints']['public']['identity']['port'] = '5004' + node.set['openstack']['endpoints']['public']['identity']['path'] = '/v2.4' expect(chef_run).to create_endpoint_openstack_identity_register( 'Register Identity Endpoint' ).with( @@ -274,9 +274,9 @@ describe 'openstack-identity::registration' do public_url = 'https://public.host:789/public_path' internal_url = 'http://internal.host:456/internal_path' admin_url = 'https://admin.host:123/admin_path' - node.set['openstack']['endpoints']['identity']['public']['uri'] = public_url - node.set['openstack']['endpoints']['identity']['internal']['uri'] = internal_url - node.set['openstack']['endpoints']['identity']['admin']['uri'] = admin_url + node.set['openstack']['endpoints']['public']['identity']['uri'] = public_url + node.set['openstack']['endpoints']['internal']['identity']['uri'] = internal_url + node.set['openstack']['endpoints']['admin']['identity']['uri'] = admin_url expect(chef_run).to create_endpoint_openstack_identity_register( 'Register Identity Endpoint'