diff --git a/attributes/default.rb b/attributes/default.rb index 0dc961c..8fb12f0 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -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 diff --git a/recipes/cinder-common.rb b/recipes/cinder-common.rb index f988341..8890bcf 100644 --- a/recipes/cinder-common.rb +++ b/recipes/cinder-common.rb @@ -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'] = diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb index 2901afd..35b79ea 100644 --- a/spec/identity_registration_spec.rb +++ b/spec/identity_registration_spec.rb @@ -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'