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
* edited bind_service service type from public,internal,admin to 'all'
  for default binding to just one service

Change-Id: I4d28b1b2489419c1f033dfcda0effa5a53c537c3
Depends-On: Iec485deaf415e4187a323435cce2b6bbadfc5d42
Depends-On: Ia5bddfc5e2fd77cd6e9e855c680b079f78fc1c3f
Depends-On: I4f97b659361dabd7fac216305d2aad2f1bb98f51
This commit is contained in:
Christoph Albers 2016-02-12 18:55:33 +01:00
parent 4a7dc692b9
commit 0d6cffad4e
3 changed files with 10 additions and 11 deletions

View File

@ -124,14 +124,13 @@ end
# The OpenStack Volume (Cinder) API endpoint
%w(public internal admin).each do |ep_type|
default['openstack']['endpoints']['block-storage'][ep_type]['scheme'] = 'http'
default['openstack']['endpoints']['block-storage'][ep_type]['path'] = '/v2/%(tenant_id)s'
%w(endpoints bind_service).each do |type|
default['openstack'][type]['block-storage'][ep_type]['host'] = '127.0.0.1'
default['openstack'][type]['block-storage'][ep_type]['port'] = '8776'
end
default['openstack']['endpoints'][ep_type]['block-storage']['scheme'] = 'http'
default['openstack']['endpoints'][ep_type]['block-storage']['path'] = '/v2/%(tenant_id)s'
default['openstack']['endpoints'][ep_type]['block-storage']['host'] = '127.0.0.1'
default['openstack']['endpoints'][ep_type]['block-storage']['port'] = '8776'
end
default['openstack']['bind_service']['all']['block-storage']['host'] = '127.0.0.1'
default['openstack']['bind_service']['all']['block-storage']['port'] = '8776'
# ============================= rootwrap Configuration ===================
# use cinder root wrap
default['openstack']['block-storage']['use_rootwrap'] = true

View File

@ -51,7 +51,7 @@ if node['openstack']['block-storage']['conf']['DEFAULT']['rpc_backend'] == 'rabb
end
glance_api_endpoint = internal_endpoint 'image_api'
cinder_api_bind = node['openstack']['bind_service']['block-storage']['public']
cinder_api_bind = node['openstack']['bind_service']['all']['block-storage']
identity_endpoint = public_endpoint 'identity'
node.default['openstack']['block-storage']['conf_secrets']
.[]('keystone_authtoken')['password'] =

View File

@ -61,9 +61,9 @@ describe 'openstack-block-storage::identity_registration' do
internal_url = 'http://internal.host:456/internal_path'
public_url = 'https://public.host:789/public_path'
node.set['openstack']['endpoints']['block-storage']['internal']['uri'] = internal_url
node.set['openstack']['endpoints']['block-storage']['admin']['uri'] = admin_url
node.set['openstack']['endpoints']['block-storage']['public']['uri'] = public_url
node.set['openstack']['endpoints']['internal']['block-storage']['uri'] = internal_url
node.set['openstack']['endpoints']['admin']['block-storage']['uri'] = admin_url
node.set['openstack']['endpoints']['public']['block-storage']['uri'] = public_url
expect(chef_run).to create_endpoint_openstack_identity_register(
'Register Cinder V2 Volume Endpoint'