Allow configuring 'CREATE_IMAGE_DEFAULTS' setting
Horizon now has the option of selecting various defaults for the create image panel. This patch allows configuring those options. Change-Id: I01d9fc44d957394acc4243f3ee34e6e50eec0bdf
This commit is contained in:
parent
5dd2e6b84b
commit
c60cb1a392
@ -285,6 +285,10 @@
|
|||||||
# Valid values are 'legacy' and 'angular'
|
# Valid values are 'legacy' and 'angular'
|
||||||
# Defaults to 'legacy'
|
# Defaults to 'legacy'
|
||||||
#
|
#
|
||||||
|
# [*create_image_defaults*]
|
||||||
|
# (optional) A dictionary of default settings for create image modal.
|
||||||
|
# Defaults to undef - will not add entry to local settings.
|
||||||
|
#
|
||||||
# [*password_retrieve*]
|
# [*password_retrieve*]
|
||||||
# (optional) Enables the use of 'Retrieve Password' in the Horizon Web UI.
|
# (optional) Enables the use of 'Retrieve Password' in the Horizon Web UI.
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
@ -456,6 +460,7 @@ class horizon(
|
|||||||
$default_theme = false,
|
$default_theme = false,
|
||||||
$password_autocomplete = 'off',
|
$password_autocomplete = 'off',
|
||||||
$images_panel = 'legacy',
|
$images_panel = 'legacy',
|
||||||
|
$create_image_defaults = undef,
|
||||||
$password_retrieve = false,
|
$password_retrieve = false,
|
||||||
$disable_password_reveal = false,
|
$disable_password_reveal = false,
|
||||||
$enforce_password_check = false,
|
$enforce_password_check = false,
|
||||||
|
@ -130,6 +130,7 @@ describe 'horizon' do
|
|||||||
:default_theme => 'default',
|
:default_theme => 'default',
|
||||||
:password_autocomplete => 'on',
|
:password_autocomplete => 'on',
|
||||||
:images_panel => 'angular',
|
:images_panel => 'angular',
|
||||||
|
:create_image_defaults => {'image_visibility' => 'private'},
|
||||||
:password_retrieve => true,
|
:password_retrieve => true,
|
||||||
:enable_secure_proxy_ssl_header => true,
|
:enable_secure_proxy_ssl_header => true,
|
||||||
})
|
})
|
||||||
@ -178,6 +179,8 @@ describe 'horizon' do
|
|||||||
" 'supported_provider_types': ['flat', 'vxlan'],",
|
" 'supported_provider_types': ['flat', 'vxlan'],",
|
||||||
" 'supported_vnic_types': ['*'],",
|
" 'supported_vnic_types': ['*'],",
|
||||||
'OPENSTACK_ENABLE_PASSWORD_RETRIEVE = True',
|
'OPENSTACK_ENABLE_PASSWORD_RETRIEVE = True',
|
||||||
|
'CREATE_IMAGE_DEFAULTS = {',
|
||||||
|
" 'image_visibility': 'private',",
|
||||||
'OPENSTACK_ENDPOINT_TYPE = "internalURL"',
|
'OPENSTACK_ENDPOINT_TYPE = "internalURL"',
|
||||||
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
|
'SECONDARY_ENDPOINT_TYPE = "ANY-VALUE"',
|
||||||
'API_RESULT_LIMIT = 4682',
|
'API_RESULT_LIMIT = 4682',
|
||||||
|
@ -508,6 +508,18 @@ OPENSTACK_IMAGE_BACKEND = {
|
|||||||
# table.
|
# table.
|
||||||
#IMAGE_RESERVED_CUSTOM_PROPERTIES = []
|
#IMAGE_RESERVED_CUSTOM_PROPERTIES = []
|
||||||
|
|
||||||
|
# A dictionary of default settings for create image modal.
|
||||||
|
#CREATE_IMAGE_DEFAULTS = {
|
||||||
|
# 'image_visibility': "public",
|
||||||
|
#}
|
||||||
|
<% if @create_image_defaults %>
|
||||||
|
CREATE_IMAGE_DEFAULTS = {
|
||||||
|
<%- @create_image_defaults.sort.each do |opt_name,opt_val| -%>
|
||||||
|
'<%= opt_name %>': '<%= opt_val %>',
|
||||||
|
<%- end -%>
|
||||||
|
}
|
||||||
|
<% end %>
|
||||||
|
|
||||||
# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
|
# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
|
||||||
# in the Keystone service catalog. Use this setting when Horizon is running
|
# in the Keystone service catalog. Use this setting when Horizon is running
|
||||||
# external to the OpenStack environment. The default is 'publicURL'.
|
# external to the OpenStack environment. The default is 'publicURL'.
|
||||||
@ -985,7 +997,8 @@ OVERVIEW_DAYS_RANGE = <%= @overview_days_range %>
|
|||||||
# See: https://wiki.openstack.org/wiki/Horizon/RESTAPI
|
# See: https://wiki.openstack.org/wiki/Horizon/RESTAPI
|
||||||
REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES',
|
REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES',
|
||||||
'LAUNCH_INSTANCE_DEFAULTS',
|
'LAUNCH_INSTANCE_DEFAULTS',
|
||||||
'OPENSTACK_IMAGE_FORMATS']
|
'OPENSTACK_IMAGE_FORMATS',
|
||||||
|
'CREATE_IMAGE_DEFAULTS']
|
||||||
|
|
||||||
# Additional settings can be made available to the client side for
|
# Additional settings can be made available to the client side for
|
||||||
# extensibility by specifying them in REST_API_ADDITIONAL_SETTINGS
|
# extensibility by specifying them in REST_API_ADDITIONAL_SETTINGS
|
||||||
|
Loading…
Reference in New Issue
Block a user