Merge "Set proper public_endpoint in ironic.conf"

This commit is contained in:
Jenkins 2016-05-20 14:07:33 +00:00 committed by Gerrit Code Review
commit bc0dab3528
2 changed files with 8 additions and 1 deletions

View File

@ -57,6 +57,8 @@ class openstack_tasks::ironic::ironic {
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
$admin_identity_address = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [$service_endpoint, $management_vip])
$admin_identity_uri = "${admin_identity_protocol}://${admin_identity_address}:35357"
$public_protocol = get_ssl_property($ssl_hash, {}, 'ironic', 'public', 'protocol', 'http')
$public_address = get_ssl_property($ssl_hash, {}, 'ironic', 'public', 'hostname', $public_vip)
prepare_network_config(hiera_hash('network_scheme', {}))
@ -89,6 +91,7 @@ class openstack_tasks::ironic::ironic {
admin_user => $ironic_user,
admin_password => $ironic_user_password,
neutron_url => "http://${neutron_endpoint}:9696",
public_endpoint => "${public_protocol}://${public_address}:6385",
}
# TODO (iberezovskiy): remove this workaround in N when ironic module

View File

@ -28,6 +28,7 @@ if ironic_enabled
service_endpoint = Noop.hiera 'service_endpoint'
management_vip = Noop.hiera 'management_vip'
public_vip = Noop.hiera 'public_vip'
let(:ssl_hash) { Noop.hiera_hash 'use_ssl', {} }
let(:internal_auth_protocol) { Noop.puppet_function 'get_ssl_property',ssl_hash,{},'keystone','internal','protocol','http' }
let(:internal_auth_address) { Noop.puppet_function 'get_ssl_property',ssl_hash,{},'keystone','internal','hostname',[service_endpoint, management_vip] }
@ -39,6 +40,8 @@ if ironic_enabled
let(:admin_auth_uri) do
"#{admin_auth_protocol}://#{admin_auth_address}:35357"
end
let(:public_protocol) { Noop.puppet_function 'get_ssl_property',ssl_hash,{},'ironic','admin','protocol','http' }
let(:public_address) { Noop.puppet_function 'get_ssl_property',ssl_hash,{},'ironic','admin','hostname', public_vip }
it 'should configure default_log_levels' do
should contain_ironic_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
@ -61,7 +64,8 @@ if ironic_enabled
'identity_uri' => admin_auth_uri,
'admin_tenant_name' => admin_tenant,
'admin_user' => admin_user,
'admin_password' => admin_password
'admin_password' => admin_password,
'public_endpoint' => "#{public_protocol}://#{public_address}:6385"
)
end