From 1680ba280e532f57d9ea37313bbdff2dbab6db7f Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Thu, 26 Mar 2015 12:27:05 -0500 Subject: [PATCH] Use identity_uri_transform for identiry_uri support Remove deprecated keys and use identity_uri via the new transform helper method. Also, cleanup specs for endpoint testing to make sure Common is fully tested. Change-Id: I3beac9d8d80d8a1a15e44bf944f1d8ca84d45350 Implements: blueprint identity-uri --- recipes/nova-common.rb | 2 ++ spec/nova-common_spec.rb | 4 +--- templates/default/nova.conf.erb | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/nova-common.rb b/recipes/nova-common.rb index 822956f5..fa43a529 100644 --- a/recipes/nova-common.rb +++ b/recipes/nova-common.rb @@ -130,6 +130,7 @@ end identity_admin_endpoint = admin_endpoint 'identity-admin' auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['compute']['api']['auth']['version'] +identity_uri = identity_uri_transform(identity_admin_endpoint) service_pass = get_password 'service', 'openstack-compute' template '/etc/nova/nova.conf' do @@ -170,6 +171,7 @@ template '/etc/nova/nova.conf' do ec2_api_bind_port: ec2_api_bind.port, vmware_host_pass: vmware_host_pass, auth_uri: auth_uri, + identity_uri: identity_uri, identity_admin_endpoint: identity_admin_endpoint, ironic_endpoint: ironic_endpoint, ironic_admin_password: ironic_admin_password, diff --git a/spec/nova-common_spec.rb b/spec/nova-common_spec.rb index f043ea25..d139f2bd 100644 --- a/spec/nova-common_spec.rb +++ b/spec/nova-common_spec.rb @@ -238,9 +238,7 @@ describe 'openstack-compute::nova-common' do it 'has correct auth_token settings' do [ 'auth_uri = http://127.0.0.1:5000/v2.0', - 'auth_host = 127.0.0.1', - 'auth_port = 35357', - 'auth_protocol = http', + 'identity_uri = http://127.0.0.1:35357/', 'auth_version = v2.0', 'admin_tenant_name = service', 'admin_user = nova', diff --git a/templates/default/nova.conf.erb b/templates/default/nova.conf.erb index 5f3fbac2..2f85dc8d 100644 --- a/templates/default/nova.conf.erb +++ b/templates/default/nova.conf.erb @@ -696,9 +696,7 @@ rbd_secret_uuid=<%= node['openstack']['compute']['libvirt']['rbd']['cinder']['se [keystone_authtoken] auth_uri = <%= @auth_uri %> -auth_host = <%= @identity_admin_endpoint.host %> -auth_port = <%= @identity_admin_endpoint.port %> -auth_protocol = <%= @identity_admin_endpoint.scheme %> +identity_uri = <%= @identity_uri %> auth_version = <%= node["openstack"]["compute"]["api"]["auth"]["version"] %> admin_tenant_name = <%= node["openstack"]["compute"]["service_tenant_name"] %> admin_user = <%= node["openstack"]["compute"]["service_user"] %>