Supports IPv6 in registry_host
This patch add support for IPv6 address in registry_host. It adds brackets if an IPv6 is detected. Change-Id: Ic1d75984fac7bce3d0239df54a877ae2b713c442
This commit is contained in:
parent
b3160011aa
commit
624f522e71
@ -354,9 +354,10 @@ class glance::api(
|
|||||||
'glance_store/os_region_name': value => $os_region_name;
|
'glance_store/os_region_name': value => $os_region_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$registry_host_real = normalize_ip_for_uri($registry_host)
|
||||||
# configure api service to connect registry service
|
# configure api service to connect registry service
|
||||||
glance_api_config {
|
glance_api_config {
|
||||||
'DEFAULT/registry_host': value => $registry_host;
|
'DEFAULT/registry_host': value => $registry_host_real;
|
||||||
'DEFAULT/registry_port': value => $registry_port;
|
'DEFAULT/registry_port': value => $registry_port;
|
||||||
'DEFAULT/registry_client_protocol': value => $registry_client_protocol;
|
'DEFAULT/registry_client_protocol': value => $registry_client_protocol;
|
||||||
}
|
}
|
||||||
|
@ -307,6 +307,17 @@ describe 'glance::api' do
|
|||||||
)}
|
)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'Support IPv6' do
|
||||||
|
let :params do
|
||||||
|
default_params.merge({
|
||||||
|
:registry_host => '2001::1',
|
||||||
|
})
|
||||||
|
end
|
||||||
|
it { is_expected.to contain_glance_api_config('DEFAULT/registry_host').with(
|
||||||
|
:value => '[2001::1]'
|
||||||
|
)}
|
||||||
|
end
|
||||||
|
|
||||||
describe 'on Debian platforms' do
|
describe 'on Debian platforms' do
|
||||||
let :facts do
|
let :facts do
|
||||||
@default_facts.merge({
|
@default_facts.merge({
|
||||||
|
Loading…
Reference in New Issue
Block a user