Skip to content

Commit

Permalink
Merge pull request #43 from Mirantis/customizable-auth-url
Browse files Browse the repository at this point in the history
Customizable auth_url, not hardwired to 127.0.0.1
  • Loading branch information
bodepd committed Aug 22, 2012
2 parents 947b8c3 + 0f98eb0 commit 84831ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions spec/classes/glance_api_spec.rb
Expand Up @@ -19,6 +19,7 @@
:registry_port => '9191',
:log_file => '/var/log/glance/api.log',
:auth_type => 'keystone',
:auth_uri => 'http://127.0.0.1:5000/',
:enabled => true
}
end
Expand All @@ -33,6 +34,7 @@
:registry_port => '9111',
:log_file => '/var/log/glance-api.log',
:auth_type => 'not_keystone',
:auth_uri => 'http://192.168.56.210:5000/',
:enabled => false
}
].each do |param_set|
Expand Down Expand Up @@ -81,6 +83,15 @@
)

end
it 'should use the proper auth_uri for glance-cache' do
verify_contents(
subject,
'/etc/glance/glance-cache.conf',
[
"auth_url = #{param_hash[:auth_uri]}"
]
)
end
end
end
end
2 changes: 1 addition & 1 deletion templates/glance-cache.conf.erb
Expand Up @@ -38,7 +38,7 @@ registry_port = <%= registry_port %>
<% if auth_type == 'keystone' -%>
# Auth settings if using Keystone
auth_url = http://127.0.0.1:5000/v2.0/
auth_url = <%= auth_uri %>
admin_tenant_name = <%= keystone_tenant %>
admin_user = <%= keystone_user %>
admin_password = <%= keystone_password %>
Expand Down

0 comments on commit 84831ca

Please sign in to comment.