Merge "Remove hardcoded hypervisor_options values"

This commit is contained in:
Zuul 2023-08-30 04:11:59 +00:00 committed by Gerrit Code Review
commit 3e4422f427
4 changed files with 11 additions and 17 deletions

View File

@ -173,12 +173,8 @@
# #
# [*hypervisor_options*] # [*hypervisor_options*]
# (optional) A hash of parameters to enable features specific to # (optional) A hash of parameters to enable features specific to
# Hypervisors. These include: # Hypervisors.
# 'can_set_mount_point': Boolean to enable or disable mount point setting # Defaults to {}
# Defaults to 'True'.
# 'can_set_password': Boolean to enable or disable VM password setting.
# Works only with Xen Hypervisor.
# Defaults to 'False'.
# #
# [*cinder_options*] # [*cinder_options*]
# (optional) A hash of parameters to enable features specific to # (optional) A hash of parameters to enable features specific to
@ -683,16 +679,11 @@ class horizon(
fail('websso_initial_choice is required when websso_choices_hide_keystone is true') fail('websso_initial_choice is required when websso_choices_hide_keystone is true')
} }
$hypervisor_defaults = {
'can_set_mount_point' => true,
'can_set_password' => false,
}
# Default options for the OPENSTACK_CINDER_FEATURES section. These will # Default options for the OPENSTACK_CINDER_FEATURES section. These will
# be merged with user-provided options when the local_settings.py.erb # be merged with user-provided options when the local_settings.py.erb
# template is interpolated. # template is interpolated.
$cinder_defaults = { $cinder_defaults = {
'enable_backup' => false, 'enable_backup' => false,
} }
# Default options for the OPENSTACK_KEYSTONE_BACKEND section. These will # Default options for the OPENSTACK_KEYSTONE_BACKEND section. These will
@ -734,7 +725,6 @@ class horizon(
Service <| title == 'memcached' |> -> Class['horizon'] Service <| title == 'memcached' |> -> Class['horizon']
$hypervisor_options_real = merge($hypervisor_defaults,$hypervisor_options)
$cinder_options_real = merge($cinder_defaults,$cinder_options) $cinder_options_real = merge($cinder_defaults,$cinder_options)
$keystone_options_real = merge($keystone_defaults, $keystone_options) $keystone_options_real = merge($keystone_defaults, $keystone_options)
$neutron_options_real = merge($neutron_defaults,$neutron_options) $neutron_options_real = merge($neutron_defaults,$neutron_options)

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The default value of the hypervisor_options parameter has been changed
to an empty hash and does no longer set can_set_mount_point to true by
default since this does not reflect the Horizon default value.

View File

@ -70,8 +70,6 @@ describe 'horizon' do
"SECRET_KEY = secret_key.generate_or_read_from_file('#{platforms_params[:secret_key_file]}')", "SECRET_KEY = secret_key.generate_or_read_from_file('#{platforms_params[:secret_key_file]}')",
'OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000"', 'OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000"',
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "member"', 'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "member"',
" 'can_set_mount_point': True,",
" 'can_set_password': False,",
" 'enable_distributed_router': False,", " 'enable_distributed_router': False,",
" 'enable_ha_router': False,", " 'enable_ha_router': False,",
" 'enable_quotas': True,", " 'enable_quotas': True,",

View File

@ -446,9 +446,9 @@ OPENSTACK_USE_SIMPLE_TENANT_USAGE = False
# The OPENSTACK_HYPERVISOR_FEATURES settings can be used to enable optional # The OPENSTACK_HYPERVISOR_FEATURES settings can be used to enable optional
# services provided by hypervisors. # services provided by hypervisors.
<%- if ! (@hypervisor_options_real.empty?) -%> <%- if ! (@hypervisor_options.empty?) -%>
OPENSTACK_HYPERVISOR_FEATURES = { OPENSTACK_HYPERVISOR_FEATURES = {
<%- @hypervisor_options_real.sort.each do |opt_name,opt_val| -%> <%- @hypervisor_options.sort.each do |opt_name,opt_val| -%>
'<%= opt_name -%>': <%= opt_val.to_s.capitalize -%>, '<%= opt_name -%>': <%= opt_val.to_s.capitalize -%>,
<%-end-%> <%-end-%>
} }