Add images_panel parameter default to HORIZON_CONFIG

Review https://review.openstack.org/#/c/339122/ adds parameter
images_panel to HORIZON_CONFIG dict. It requires a default value
to work properly.

This patch add parameter images_panel to set the enabled panel
to legacy (default value) or angular.

Change-Id: I50ca03492464f9fb2f84963352b2e65c14d44953
This commit is contained in:
Alfredo Moralejo 2016-08-09 10:07:14 -04:00
parent 00017080a0
commit 4da543b4b5
4 changed files with 20 additions and 0 deletions

View File

@ -271,6 +271,11 @@
# Valid values are 'on' and 'off'
# Defaults to 'off'
#
# [*images_panel*]
# (optional) Enabled panel for images.
# Valid values are 'legacy' and 'angular'
# Defaults to 'legacy'
#
# === DEPRECATED group/name
#
# [*fqdn*]
@ -365,6 +370,7 @@ class horizon(
$available_themes = false,
$default_theme = false,
$password_autocomplete = 'off',
$images_panel = 'legacy',
# DEPRECATED PARAMETERS
$custom_theme_path = undef,
$fqdn = undef,
@ -437,6 +443,7 @@ class horizon(
$neutron_options_real = merge($neutron_defaults,$neutron_options)
validate_hash($api_versions)
validate_re($password_autocomplete, ['^on$', '^off$'])
validate_re($images_panel, ['^legacy$', '^angular$'])
if $cache_backend =~ /MemcachedCache/ {
ensure_packages('python-memcache',

View File

@ -0,0 +1,6 @@
---
features:
- A new panel for glance images based on angularjs
has been created in horizon. New parameter images_panel
has been added to puppet-horizon to configure
the enabled panel for images, legacy or angular.

View File

@ -60,6 +60,7 @@ describe 'horizon' do
"ALLOWED_HOSTS = ['*', ]",
" 'identity': 3,",
'HORIZON_CONFIG["password_autocomplete"] = "off"',
'HORIZON_CONFIG["images_panel"] = "legacy"',
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
'OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000"',
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"',
@ -125,6 +126,7 @@ describe 'horizon' do
],
:default_theme => 'default',
:password_autocomplete => 'on',
:images_panel => 'angular',
})
end
@ -138,6 +140,7 @@ describe 'horizon' do
"OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True",
"OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'domain.tld'",
'HORIZON_CONFIG["password_autocomplete"] = "on"',
'HORIZON_CONFIG["images_panel"] = "angular"',
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
" 'DEAD_RETRY': 1,",
" 'SERVER_RETRIES': 1,",

View File

@ -137,6 +137,10 @@ HORIZON_CONFIG["password_autocomplete"] = "<%= @password_autocomplete %>"
# including on the login form.
#HORIZON_CONFIG["disable_password_reveal"] = False
# Configure enabled image panel. It can be legacy or angular.
#HORIZON_CONFIG["images_panel"] = "legacy"
HORIZON_CONFIG["images_panel"] = "<%= @images_panel %>"
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
# Set custom secret key: