Remove hardcoded hypervisor_options values

The default value of can_set_mount_point
that we merge into the hypervisor_options
parameter is not the Horizon default.

This removes the defaults that sets the
can_set_mount_point to true by default when
Horizon has this as false by default, it's
also only really functional on a very specific
hypervisor.

This also removes the can_set_password config
that we set to False that already is the Horizon
default.

Change-Id: Iba05bce817da1c1bc51acb06b6bdc69beba2ea26
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
This commit is contained in:
Tobias Urdin 2023-08-23 08:52:34 +02:00
parent e399c8862a
commit bec3f3a214
4 changed files with 11 additions and 17 deletions

View File

@ -173,12 +173,8 @@
#
# [*hypervisor_options*]
# (optional) A hash of parameters to enable features specific to
# Hypervisors. These include:
# 'can_set_mount_point': Boolean to enable or disable mount point setting
# Defaults to 'True'.
# 'can_set_password': Boolean to enable or disable VM password setting.
# Works only with Xen Hypervisor.
# Defaults to 'False'.
# Hypervisors.
# Defaults to {}
#
# [*cinder_options*]
# (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')
}
$hypervisor_defaults = {
'can_set_mount_point' => true,
'can_set_password' => false,
}
# Default options for the OPENSTACK_CINDER_FEATURES section. These will
# be merged with user-provided options when the local_settings.py.erb
# template is interpolated.
$cinder_defaults = {
'enable_backup' => false,
'enable_backup' => false,
}
# Default options for the OPENSTACK_KEYSTONE_BACKEND section. These will
@ -734,7 +725,6 @@ class horizon(
Service <| title == 'memcached' |> -> Class['horizon']
$hypervisor_options_real = merge($hypervisor_defaults,$hypervisor_options)
$cinder_options_real = merge($cinder_defaults,$cinder_options)
$keystone_options_real = merge($keystone_defaults, $keystone_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]}')",
'OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000"',
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "member"',
" 'can_set_mount_point': True,",
" 'can_set_password': False,",
" 'enable_distributed_router': False,",
" 'enable_ha_router': False,",
" 'enable_quotas': True,",

View File

@ -446,9 +446,9 @@ OPENSTACK_USE_SIMPLE_TENANT_USAGE = <%= @use_simple_tenant_usage.to_s.capitalize
# The OPENSTACK_HYPERVISOR_FEATURES settings can be used to enable optional
# services provided by hypervisors.
<%- if ! (@hypervisor_options_real.empty?) -%>
<%- if ! (@hypervisor_options.empty?) -%>
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 -%>,
<%-end-%>
}