Fix hardcoded urls for selective SSL implementation
Remove hardcoded urls from Ironic upload_images task. Closes-Bug: 1528222 Related to blueprint selective-ssl Change-Id: I492a90d4e2415ad35e1abae43c3b7ebf69879268
This commit is contained in:
parent
04382c1db8
commit
180ddb9211
@ -14,11 +14,19 @@ user_name = glanced['user'].nil? ? "glance" : glanced['user']
|
||||
endpoint_type = glanced['endpoint_type'].nil? ? "internalURL" : glanced['endpoint_type']
|
||||
region_name = hiera.lookup 'region', 'RegionOne', {}
|
||||
master_ip = hiera.lookup 'master_ip', nil, {}
|
||||
ssl_hash = hiera.lookup 'use_ssl', {}, {}
|
||||
|
||||
if ssl_hash['keystone_internal']
|
||||
auth_proto = 'https'
|
||||
auth_addr = ssl_hash['keystone_internal_hostname'] || auth_addr
|
||||
else
|
||||
auth_proto = 'http'
|
||||
end
|
||||
|
||||
ENV['OS_TENANT_NAME']="#{tenant_name}"
|
||||
ENV['OS_USERNAME']="#{user_name}"
|
||||
ENV['OS_PASSWORD']="#{glanced['user_password']}"
|
||||
ENV['OS_AUTH_URL']="http://#{auth_addr}:5000/v2.0"
|
||||
ENV['OS_AUTH_URL']="#{auth_proto}://#{auth_addr}:5000/v2.0"
|
||||
ENV['OS_ENDPOINT_TYPE'] = "#{endpoint_type}"
|
||||
ENV['OS_REGION_NAME']="#{region_name}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user