Adds interface for enable_user_pass
Uncomments the `OPENSTACK_HEAT_STACK` dict and allows to set `enable_user_pass` in the `local_settings.py.erb` template Change-Id: I97874af257a7cbb3eea862645952f6000e3fc3ce Closes-Bug: #1676366
This commit is contained in:
parent
8e00bbbd1d
commit
47aeba3f5b
manifests
releasenotes/notes
spec/classes
templates
@ -352,6 +352,10 @@
|
||||
# [*password_validator_help*]
|
||||
# (optional) Help text to display when password validation fails in horizon.
|
||||
#
|
||||
# [*enable_user_pass*]
|
||||
# (optional) Enable the password field while launching a Heat stack.
|
||||
# Defaults to true
|
||||
#
|
||||
# === DEPRECATED group/name
|
||||
#
|
||||
# [*fqdn*]
|
||||
@ -458,6 +462,7 @@ class horizon(
|
||||
$websso_idp_mapping = undef,
|
||||
$password_validator = undef,
|
||||
$password_validator_help = undef,
|
||||
$enable_user_pass = true,
|
||||
# DEPRECATED PARAMETERS
|
||||
$custom_theme_path = undef,
|
||||
$fqdn = undef,
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- Added ability to enable/disable the password field while launching
|
||||
a Heat stack by setting the enable_user_pass parameter of the
|
||||
OPENSTACK_HEAT_STACK dictionary in local_settings.py.
|
@ -76,7 +76,10 @@ describe 'horizon' do
|
||||
'API_RESULT_LIMIT = 1000',
|
||||
'TIME_ZONE = "UTC"',
|
||||
'COMPRESS_OFFLINE = True',
|
||||
"FILE_UPLOAD_TEMP_DIR = '/tmp'"
|
||||
"FILE_UPLOAD_TEMP_DIR = '/tmp'",
|
||||
"OPENSTACK_HEAT_STACK = {",
|
||||
" 'enable_user_pass': True",
|
||||
"}",
|
||||
])
|
||||
|
||||
# From internals of verify_contents, get the contents to check for absence of a line
|
||||
@ -199,6 +202,19 @@ describe 'horizon' do
|
||||
it { is_expected.to contain_file(params[:file_upload_temp_dir]) }
|
||||
end
|
||||
|
||||
context 'with enable_user_pass disabled' do
|
||||
before do
|
||||
params.merge!({ :enable_user_pass => false })
|
||||
end
|
||||
it {
|
||||
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
|
||||
"OPENSTACK_HEAT_STACK = {",
|
||||
" 'enable_user_pass': False",
|
||||
"}",
|
||||
])
|
||||
}
|
||||
end
|
||||
|
||||
context 'with overridden parameters and cache_server_ip array' do
|
||||
before do
|
||||
params.merge!({
|
||||
|
@ -453,6 +453,13 @@ OPENSTACK_NEUTRON_NETWORK = {
|
||||
#OPENSTACK_HEAT_STACK = {
|
||||
# 'enable_user_pass': True,
|
||||
#}
|
||||
OPENSTACK_HEAT_STACK = {
|
||||
<%- if @enable_user_pass -%>
|
||||
'enable_user_pass': True
|
||||
<%- else -%>
|
||||
'enable_user_pass': False
|
||||
<%- end -%>
|
||||
}
|
||||
|
||||
# The OPENSTACK_IMAGE_BACKEND settings can be used to customize features
|
||||
# in the OpenStack Dashboard related to the Image service, such as the list
|
||||
|
Loading…
x
Reference in New Issue
Block a user