Merge "Prefix memcached_servers IPv6 address with `inet6:`"
This commit is contained in:
commit
68566b6c41
|
@ -551,6 +551,10 @@ class horizon(
|
|||
fail('Only one of cache_server_url or cache_server_ip can be set.')
|
||||
}
|
||||
|
||||
if $cache_server_ip {
|
||||
$cache_server_ip_real = inet6_prefix($cache_server_ip)
|
||||
}
|
||||
|
||||
$hypervisor_defaults = {
|
||||
'can_set_mount_point' => true,
|
||||
'can_set_password' => false,
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
{
|
||||
"name": "saz/memcached",
|
||||
"version_requirement": ">=2.0.2 <3.0.0"
|
||||
},
|
||||
{
|
||||
"name": "openstack/openstacklib",
|
||||
"version_requirement": ">=15.0.0 <16.0.0"
|
||||
}
|
||||
],
|
||||
"description": "Installs and configures OpenStack Horizon (Dashboard).",
|
||||
|
|
|
@ -252,6 +252,23 @@ describe 'horizon' do
|
|||
it { is_expected.to contain_exec('refresh_horizon_django_compress') }
|
||||
end
|
||||
|
||||
context 'with overridden parameters and IPv6 cache_server_ip array' do
|
||||
before do
|
||||
params.merge!({
|
||||
:cache_server_ip => ['fd12:3456:789a:1::1','fd12:3456:789a:1::2'],
|
||||
})
|
||||
end
|
||||
|
||||
it 'generates local_settings.py' do
|
||||
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
||||
" 'LOCATION': [ 'inet6:[fd12:3456:789a:1::1]:11211','inet6:[fd12:3456:789a:1::2]:11211', ],",
|
||||
])
|
||||
end
|
||||
|
||||
it { is_expected.to contain_exec('refresh_horizon_django_cache') }
|
||||
it { is_expected.to contain_exec('refresh_horizon_django_compress') }
|
||||
end
|
||||
|
||||
context 'with overridden parameters and cache_server_url' do
|
||||
before do
|
||||
params.merge!({
|
||||
|
|
|
@ -226,11 +226,11 @@ CACHES = {
|
|||
<% end -%>
|
||||
'BACKEND': '<%= @cache_backend %>',
|
||||
<% if @cache_server_ip %>
|
||||
<% if @cache_server_ip.kind_of?(Array) %>
|
||||
<% if @cache_server_ip_real.kind_of?(Array) %>
|
||||
<% split = ":" + @cache_server_port + "','" %>
|
||||
'LOCATION': [ <% @cache_server_ip.each do |ip| -%>'<%= ip -%>:<%= @cache_server_port -%>',<% end -%> ],
|
||||
'LOCATION': [ <% @cache_server_ip_real.each do |ip| -%>'<%= ip -%>:<%= @cache_server_port -%>',<% end -%> ],
|
||||
<% else %>
|
||||
'LOCATION': '<%= @cache_server_ip %>:<%= @cache_server_port %>',
|
||||
'LOCATION': '<%= @cache_server_ip_real %>:<%= @cache_server_port %>',
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @cache_server_url %>
|
||||
|
|
Loading…
Reference in New Issue