Merge "Remove redundant blank lines"
This commit is contained in:
commit
4b17eac545
@ -60,7 +60,7 @@ describe 'horizon' do
|
|||||||
"LOGOUT_URL = '#{platforms_params[:root_url]}/auth/logout/'",
|
"LOGOUT_URL = '#{platforms_params[:root_url]}/auth/logout/'",
|
||||||
"LOGIN_REDIRECT_URL = '#{platforms_params[:root_url]}/'",
|
"LOGIN_REDIRECT_URL = '#{platforms_params[:root_url]}/'",
|
||||||
"ALLOWED_HOSTS = ['some.host.tld', ]",
|
"ALLOWED_HOSTS = ['some.host.tld', ]",
|
||||||
" 'identity': 3,",
|
" 'identity': 3,",
|
||||||
'HORIZON_CONFIG["password_autocomplete"] = "off"',
|
'HORIZON_CONFIG["password_autocomplete"] = "off"',
|
||||||
'HORIZON_CONFIG["images_panel"] = "legacy"',
|
'HORIZON_CONFIG["images_panel"] = "legacy"',
|
||||||
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
|
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
|
||||||
@ -151,15 +151,16 @@ describe 'horizon' do
|
|||||||
'CSRF_COOKIE_SECURE = True',
|
'CSRF_COOKIE_SECURE = True',
|
||||||
'SESSION_COOKIE_SECURE = True',
|
'SESSION_COOKIE_SECURE = True',
|
||||||
'SESSION_COOKIE_HTTPONLY = True',
|
'SESSION_COOKIE_HTTPONLY = True',
|
||||||
" 'identity': 2.0,",
|
" 'identity': 2.0,",
|
||||||
"OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True",
|
"OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True",
|
||||||
"OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'domain.tld'",
|
"OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'domain.tld'",
|
||||||
'HORIZON_CONFIG["password_autocomplete"] = "on"',
|
'HORIZON_CONFIG["password_autocomplete"] = "on"',
|
||||||
'HORIZON_CONFIG["images_panel"] = "angular"',
|
'HORIZON_CONFIG["images_panel"] = "angular"',
|
||||||
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
|
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
|
||||||
" 'DEAD_RETRY': 1,",
|
" 'OPTIONS': {",
|
||||||
" 'SERVER_RETRIES': 1,",
|
" 'DEAD_RETRY': 1,",
|
||||||
" 'SOCKET_TIMEOUT': 1,",
|
" 'SERVER_RETRIES': 1,",
|
||||||
|
" 'SOCKET_TIMEOUT': 1,",
|
||||||
" 'BACKEND': 'horizon.backends.memcached.HorizonMemcached',",
|
" 'BACKEND': 'horizon.backends.memcached.HorizonMemcached',",
|
||||||
" 'LOCATION': '10.0.0.1:11211',",
|
" 'LOCATION': '10.0.0.1:11211',",
|
||||||
'SESSION_ENGINE = "django.contrib.sessions.backends.cache"',
|
'SESSION_ENGINE = "django.contrib.sessions.backends.cache"',
|
||||||
@ -199,8 +200,8 @@ describe 'horizon' do
|
|||||||
'DROPDOWN_MAX_ITEMS = 123',
|
'DROPDOWN_MAX_ITEMS = 123',
|
||||||
'TIME_ZONE = "Asia/Shanghai"',
|
'TIME_ZONE = "Asia/Shanghai"',
|
||||||
"AVAILABLE_THEMES = [",
|
"AVAILABLE_THEMES = [",
|
||||||
" ('default', 'Default', 'themes/default'),",
|
" ('default', 'Default', 'themes/default'),",
|
||||||
" ('material', 'Material', 'themes/material'),",
|
" ('material', 'Material', 'themes/material'),",
|
||||||
"]",
|
"]",
|
||||||
"DEFAULT_THEME = 'default'",
|
"DEFAULT_THEME = 'default'",
|
||||||
" 'level': 'DEBUG',",
|
" 'level': 'DEBUG',",
|
||||||
|
@ -9,33 +9,33 @@ from openstack_dashboard.settings import HORIZON_CONFIG
|
|||||||
|
|
||||||
DEBUG = <%= @django_debug.to_s.capitalize %>
|
DEBUG = <%= @django_debug.to_s.capitalize %>
|
||||||
|
|
||||||
<% if @site_branding %>
|
<% if @site_branding -%>
|
||||||
SITE_BRANDING = '<%= @site_branding %>'
|
SITE_BRANDING = '<%= @site_branding %>'
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
# WEBROOT is the location relative to Webserver root
|
# WEBROOT is the location relative to Webserver root
|
||||||
# should end with a slash.
|
# should end with a slash.
|
||||||
#LOGIN_URL = WEBROOT + 'auth/login/'
|
#LOGIN_URL = WEBROOT + 'auth/login/'
|
||||||
#LOGOUT_URL = WEBROOT + 'auth/logout/'
|
#LOGOUT_URL = WEBROOT + 'auth/logout/'
|
||||||
<% if @root_url == '/' %>
|
<% if @root_url == '/' -%>
|
||||||
WEBROOT = '/'
|
WEBROOT = '/'
|
||||||
LOGIN_URL = '/auth/login/'
|
LOGIN_URL = '/auth/login/'
|
||||||
LOGOUT_URL = '/auth/logout/'
|
LOGOUT_URL = '/auth/logout/'
|
||||||
<% else %>
|
<% else -%>
|
||||||
WEBROOT = '<%= @root_url %>/'
|
WEBROOT = '<%= @root_url %>/'
|
||||||
LOGIN_URL = '<%= @root_url %>/auth/login/'
|
LOGIN_URL = '<%= @root_url %>/auth/login/'
|
||||||
LOGOUT_URL = '<%= @root_url %>/auth/logout/'
|
LOGOUT_URL = '<%= @root_url %>/auth/logout/'
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# LOGIN_REDIRECT_URL can be used as an alternative for
|
# LOGIN_REDIRECT_URL can be used as an alternative for
|
||||||
# HORIZON_CONFIG.user_home, if user_home is not set.
|
# HORIZON_CONFIG.user_home, if user_home is not set.
|
||||||
# Do not set it to '/home/', as this will cause circular redirect loop
|
# Do not set it to '/home/', as this will cause circular redirect loop
|
||||||
#LOGIN_REDIRECT_URL = WEBROOT
|
#LOGIN_REDIRECT_URL = WEBROOT
|
||||||
<% if @root_url == '/' %>
|
<% if @root_url == '/' -%>
|
||||||
LOGIN_REDIRECT_URL = '/'
|
LOGIN_REDIRECT_URL = '/'
|
||||||
<% else %>
|
<% else -%>
|
||||||
LOGIN_REDIRECT_URL = '<%= @root_url %>/'
|
LOGIN_REDIRECT_URL = '<%= @root_url %>/'
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Required for Django 1.5.
|
# Required for Django 1.5.
|
||||||
# If horizon is running in production (DEBUG is False), set this
|
# If horizon is running in production (DEBUG is False), set this
|
||||||
@ -43,39 +43,40 @@ LOGIN_REDIRECT_URL = '<%= @root_url %>/'
|
|||||||
# For more information see:
|
# For more information see:
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||||
#ALLOWED_HOSTS = ['horizon.example.com', ]
|
#ALLOWED_HOSTS = ['horizon.example.com', ]
|
||||||
<% if @allowed_hosts.kind_of?(Array) %>
|
<% if @allowed_hosts.kind_of?(Array) -%>
|
||||||
ALLOWED_HOSTS = ['<%= @allowed_hosts.join("', '") %>', ]
|
ALLOWED_HOSTS = ['<%= @allowed_hosts.join("', '") %>', ]
|
||||||
<% else %>
|
<% else -%>
|
||||||
ALLOWED_HOSTS = ['<%= @allowed_hosts %>', ]
|
ALLOWED_HOSTS = ['<%= @allowed_hosts %>', ]
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Set SSL proxy settings:
|
# Set SSL proxy settings:
|
||||||
# Pass this header from the proxy after terminating the SSL,
|
# Pass this header from the proxy after terminating the SSL,
|
||||||
# and don't forget to strip it from the client's request.
|
# and don't forget to strip it from the client's request.
|
||||||
# For more information see:
|
# For more information see:
|
||||||
# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
|
# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
|
||||||
<% if @enable_secure_proxy_ssl_header %>
|
<% if @enable_secure_proxy_ssl_header -%>
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
<% else %>
|
<% else -%>
|
||||||
#SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
#SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# This setting specifies the name of the header with remote IP address
|
# This setting specifies the name of the header with remote IP address
|
||||||
#SECURE_PROXY_ADDR_HEADER = False
|
#SECURE_PROXY_ADDR_HEADER = False
|
||||||
<% if @secure_proxy_addr_header %>
|
<% if @secure_proxy_addr_header -%>
|
||||||
SECURE_PROXY_ADDR_HEADER = '<%= @secure_proxy_addr_header %>'
|
SECURE_PROXY_ADDR_HEADER = '<%= @secure_proxy_addr_header %>'
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# If Horizon is being served through SSL, then uncomment the following two
|
# If Horizon is being served through SSL, then uncomment the following two
|
||||||
# settings to better secure the cookies from security exploits
|
# settings to better secure the cookies from security exploits
|
||||||
<% if @secure_cookies %>
|
<% if @secure_cookies -%>
|
||||||
CSRF_COOKIE_SECURE = True
|
CSRF_COOKIE_SECURE = True
|
||||||
SESSION_COOKIE_SECURE = True
|
SESSION_COOKIE_SECURE = True
|
||||||
SESSION_COOKIE_HTTPONLY = True
|
SESSION_COOKIE_HTTPONLY = True
|
||||||
<% else %>
|
<% else -%>
|
||||||
#CSRF_COOKIE_SECURE = True
|
#CSRF_COOKIE_SECURE = True
|
||||||
#SESSION_COOKIE_SECURE = True
|
#SESSION_COOKIE_SECURE = True
|
||||||
#SESSION_COOKIE_HTTPONLY = True
|
#SESSION_COOKIE_HTTPONLY = True
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Overrides for OpenStack API versions. Use this setting to force the
|
# Overrides for OpenStack API versions. Use this setting to force the
|
||||||
# OpenStack dashboard to use a specific API version for a given service API.
|
# OpenStack dashboard to use a specific API version for a given service API.
|
||||||
@ -90,22 +91,22 @@ SESSION_COOKIE_HTTPONLY = True
|
|||||||
# "volume": 3,
|
# "volume": 3,
|
||||||
# "compute": 2,
|
# "compute": 2,
|
||||||
#}
|
#}
|
||||||
<% if ! (@api_versions.empty?) and @api_versions.kind_of?(Hash) %>
|
<% if ! (@api_versions.empty?) and @api_versions.kind_of?(Hash) -%>
|
||||||
OPENSTACK_API_VERSIONS = {
|
OPENSTACK_API_VERSIONS = {
|
||||||
<% @api_versions.sort.each do |opt_name,opt_val| -%>
|
<% @api_versions.sort.each do |opt_name,opt_val| -%>
|
||||||
'<%= opt_name -%>': <%= opt_val -%>,
|
'<%= opt_name -%>': <%= opt_val -%>,
|
||||||
<%end %>
|
<% end -%>
|
||||||
}
|
}
|
||||||
<%end %>
|
<% end -%>
|
||||||
|
|
||||||
# Set this to True if running on multi-domain model. When this is enabled, it
|
# Set this to True if running on multi-domain model. When this is enabled, it
|
||||||
# will require user to enter the Domain name in addition to username for login.
|
# will require user to enter the Domain name in addition to username for login.
|
||||||
#OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
|
#OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
|
||||||
<% if @keystone_multidomain_support %>
|
<% if @keystone_multidomain_support -%>
|
||||||
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
|
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
<% if @keystone_domain_choices.kind_of?(Array) %>
|
<% if @keystone_domain_choices.kind_of?(Array) -%>
|
||||||
OPENSTACK_KEYSTONE_DOMAIN_DROPDOWN = True
|
OPENSTACK_KEYSTONE_DOMAIN_DROPDOWN = True
|
||||||
OPENSTACK_KEYSTONE_DOMAIN_CHOICES = (
|
OPENSTACK_KEYSTONE_DOMAIN_CHOICES = (
|
||||||
<% @keystone_domain_choices.each do |d| -%>
|
<% @keystone_domain_choices.each do |d| -%>
|
||||||
@ -117,9 +118,9 @@ OPENSTACK_KEYSTONE_DOMAIN_CHOICES = (
|
|||||||
# Overrides the default domain used when running on single-domain model
|
# Overrides the default domain used when running on single-domain model
|
||||||
# with Keystone V3. All entities will be created in the default domain.
|
# with Keystone V3. All entities will be created in the default domain.
|
||||||
#OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
|
#OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
|
||||||
<% if @keystone_default_domain %>
|
<% if @keystone_default_domain -%>
|
||||||
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = '<%= @keystone_default_domain %>'
|
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = '<%= @keystone_default_domain %>'
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Set Console type:
|
# Set Console type:
|
||||||
# valid options are "AUTO"(default), "VNC", "SPICE", "RDP", "SERIAL" or None
|
# valid options are "AUTO"(default), "VNC", "SPICE", "RDP", "SERIAL" or None
|
||||||
@ -159,7 +160,7 @@ HORIZON_CONFIG = {
|
|||||||
# "regex": '.*',
|
# "regex": '.*',
|
||||||
# "help_text": _("Your password does not meet the requirements."),
|
# "help_text": _("Your password does not meet the requirements."),
|
||||||
#}
|
#}
|
||||||
<%if @password_validator %>
|
<%if @password_validator -%>
|
||||||
HORIZON_CONFIG["password_validator"] = {
|
HORIZON_CONFIG["password_validator"] = {
|
||||||
"regex": '<%= @password_validator %>',
|
"regex": '<%= @password_validator %>',
|
||||||
<%- if @password_validator_help -%>
|
<%- if @password_validator_help -%>
|
||||||
@ -168,7 +169,7 @@ HORIZON_CONFIG["password_validator"] = {
|
|||||||
"help_text": _("Your password does not meet the requirements."),
|
"help_text": _("Your password does not meet the requirements."),
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Turn off browser autocompletion for forms including the login form and
|
# Turn off browser autocompletion for forms including the login form and
|
||||||
# the database creation workflow if so desired.
|
# the database creation workflow if so desired.
|
||||||
@ -178,17 +179,17 @@ HORIZON_CONFIG["password_autocomplete"] = "<%= @password_autocomplete %>"
|
|||||||
# Setting this to True will disable the reveal button for password fields,
|
# Setting this to True will disable the reveal button for password fields,
|
||||||
# including on the login form.
|
# including on the login form.
|
||||||
#HORIZON_CONFIG["disable_password_reveal"] = False
|
#HORIZON_CONFIG["disable_password_reveal"] = False
|
||||||
<% if @disable_password_reveal == true %>
|
<% if @disable_password_reveal == true -%>
|
||||||
HORIZON_CONFIG["disable_password_reveal"] = True
|
HORIZON_CONFIG["disable_password_reveal"] = True
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Set this to True to display an 'Admin Password' field on the Change Password
|
# Set this to True to display an 'Admin Password' field on the Change Password
|
||||||
# form to verify that it is indeed the admin logged-in who wants to change the
|
# form to verify that it is indeed the admin logged-in who wants to change the
|
||||||
# password
|
# password
|
||||||
#HORIZON_CONFIG["enforce_password_check"] = False
|
#HORIZON_CONFIG["enforce_password_check"] = False
|
||||||
<% if @enforce_password_check == true %>
|
<% if @enforce_password_check == true -%>
|
||||||
HORIZON_CONFIG["enforce_password_check"] = True
|
HORIZON_CONFIG["enforce_password_check"] = True
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# Configure enabled image panel. It can be legacy or angular.
|
# Configure enabled image panel. It can be legacy or angular.
|
||||||
#HORIZON_CONFIG["images_panel"] = "legacy"
|
#HORIZON_CONFIG["images_panel"] = "legacy"
|
||||||
@ -226,52 +227,52 @@ SECRET_KEY = '<%= @secret_key %>'
|
|||||||
#}
|
#}
|
||||||
CACHES = {
|
CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
<% if @cache_options.kind_of?(Hash) %>
|
<%- if @cache_options.kind_of?(Hash) -%>
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
<% @cache_options.sort.each do |opt_name,opt_val| -%>
|
<%- @cache_options.sort.each do |opt_name,opt_val| -%>
|
||||||
'<%= opt_name -%>': <%= opt_val -%>,
|
'<%= opt_name -%>': <%= opt_val -%>,
|
||||||
<% end -%>},
|
<%- end -%>
|
||||||
<% end -%>
|
},
|
||||||
'BACKEND': '<%= @cache_backend %>',
|
<%- end -%>
|
||||||
<% if @cache_server_ip and !(@cache_server_ip.empty?) %>
|
'BACKEND': '<%= @cache_backend %>',
|
||||||
<% if @cache_server_ip_real.kind_of?(Array) %>
|
<%- if @cache_server_ip and !(@cache_server_ip.empty?) -%>
|
||||||
<% split = ":" + @cache_server_port + "','" %>
|
<%- if @cache_server_ip_real.kind_of?(Array) -%>
|
||||||
|
<%- split = ":" + @cache_server_port + "','" -%>
|
||||||
'LOCATION': [ <% @cache_server_ip_real.each do |ip| -%>'<%= ip -%>:<%= @cache_server_port -%>',<% end -%> ],
|
'LOCATION': [ <% @cache_server_ip_real.each do |ip| -%>'<%= ip -%>:<%= @cache_server_port -%>',<% end -%> ],
|
||||||
<% else %>
|
<%- else -%>
|
||||||
'LOCATION': '<%= @cache_server_ip_real %>:<%= @cache_server_port %>',
|
'LOCATION': '<%= @cache_server_ip_real %>:<%= @cache_server_port %>',
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% end %>
|
<%- end -%>
|
||||||
<% if @cache_server_url %>
|
<%- if @cache_server_url -%>
|
||||||
'LOCATION': '<%= @cache_server_url %>',
|
'LOCATION': '<%= @cache_server_url %>',
|
||||||
<% end %>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<% if @cache_tls_enabled %>
|
<% if @cache_tls_enabled -%>
|
||||||
|
|
||||||
## START TLS context configuration
|
## START TLS context configuration
|
||||||
import ssl
|
import ssl
|
||||||
|
|
||||||
tls_context = ssl.create_default_context(<% if @cache_tls_cafile %>cafile='<%= @cache_tls_cafile %>'<% end %>)
|
tls_context = ssl.create_default_context(<% if @cache_tls_cafile %>cafile='<%= @cache_tls_cafile %>'<% end %>)
|
||||||
<% if @cache_tls_certfile and @cache_tls_keyfile %>
|
<% if @cache_tls_certfile and @cache_tls_keyfile -%>
|
||||||
tls_context.load_cert_chain('<%= @cache_tls_certfile %>', '<%= @cache_tls_keyfile %>')
|
tls_context.load_cert_chain('<%= @cache_tls_certfile %>', '<%= @cache_tls_keyfile %>')
|
||||||
<% end %>
|
<% end -%>
|
||||||
<% if @cache_tls_certfile and not @cache_tls_keyfile %>
|
<% if @cache_tls_certfile and not @cache_tls_keyfile -%>
|
||||||
tls_context.load_cert_chain('<%= @cache_tls_certfile %>')
|
tls_context.load_cert_chain('<%= @cache_tls_certfile %>')
|
||||||
<% end %>
|
<% end -%>
|
||||||
<% if @cache_allowed_ciphers %>
|
<% if @cache_allowed_ciphers -%>
|
||||||
tls_context.set_ciphers('<%= @cache_tls_allowed_ciphers %>')
|
tls_context.set_ciphers('<%= @cache_tls_allowed_ciphers %>')
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
CACHES['default'].setdefault('OPTIONS', {})['tls_context'] = tls_context
|
CACHES['default'].setdefault('OPTIONS', {})['tls_context'] = tls_context
|
||||||
|
|
||||||
## END TLS context configuration
|
## END TLS context configuration
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if @django_session_engine %>
|
<% end -%>
|
||||||
|
<% if @django_session_engine -%>
|
||||||
SESSION_ENGINE = "<%= @django_session_engine %>"
|
SESSION_ENGINE = "<%= @django_session_engine %>"
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
# Send email to the console by default
|
# Send email to the console by default
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
# Or send them to /dev/null
|
# Or send them to /dev/null
|
||||||
@ -288,7 +289,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
|||||||
# ('http://cluster1.example.com:5000/v3', 'cluster1'),
|
# ('http://cluster1.example.com:5000/v3', 'cluster1'),
|
||||||
# ('http://cluster2.example.com:5000/v3', 'cluster2'),
|
# ('http://cluster2.example.com:5000/v3', 'cluster2'),
|
||||||
#]
|
#]
|
||||||
<% if @available_regions.kind_of?(Array) %>
|
<% if @available_regions.kind_of?(Array) -%>
|
||||||
AVAILABLE_REGIONS = [
|
AVAILABLE_REGIONS = [
|
||||||
<% @available_regions.each do |r| -%>
|
<% @available_regions.each do |r| -%>
|
||||||
('<%= r[0] -%>', '<%= r[1] -%>'),
|
('<%= r[0] -%>', '<%= r[1] -%>'),
|
||||||
@ -341,7 +342,7 @@ WEBSSO_ENABLED = True
|
|||||||
<% if @websso_initial_choice -%>
|
<% if @websso_initial_choice -%>
|
||||||
WEBSSO_INITIAL_CHOICE = "<%= @websso_initial_choice %>"
|
WEBSSO_INITIAL_CHOICE = "<%= @websso_initial_choice %>"
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @websso_choices.kind_of?(Array) %>
|
<% if @websso_choices.kind_of?(Array) -%>
|
||||||
WEBSSO_CHOICES = (
|
WEBSSO_CHOICES = (
|
||||||
("credentials", _("Keystone Credentials")),
|
("credentials", _("Keystone Credentials")),
|
||||||
<% @websso_choices.each do |r| -%>
|
<% @websso_choices.each do |r| -%>
|
||||||
@ -349,7 +350,7 @@ WEBSSO_CHOICES = (
|
|||||||
<% end -%>
|
<% end -%>
|
||||||
)
|
)
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @websso_idp_mapping.kind_of?(Hash) %>
|
<% if @websso_idp_mapping.kind_of?(Hash) -%>
|
||||||
WEBSSO_IDP_MAPPING = {
|
WEBSSO_IDP_MAPPING = {
|
||||||
<% @websso_idp_mapping.each do |key,r| -%>
|
<% @websso_idp_mapping.each do |key,r| -%>
|
||||||
"<%= key -%>": ("<%= r[0] -%>", "<%= r[1] -%>"),
|
"<%= key -%>": ("<%= r[0] -%>", "<%= r[1] -%>"),
|
||||||
@ -386,7 +387,7 @@ WEBSSO_DEFAULT_REDIRECT_LOGOUT = "<%= @websso_default_redirect_logout %>"
|
|||||||
|
|
||||||
# Disable SSL certificate checks (useful for self-signed certificates):
|
# Disable SSL certificate checks (useful for self-signed certificates):
|
||||||
#OPENSTACK_SSL_NO_VERIFY = True
|
#OPENSTACK_SSL_NO_VERIFY = True
|
||||||
<% if @ssl_no_verify %>
|
<% if @ssl_no_verify -%>
|
||||||
OPENSTACK_SSL_NO_VERIFY = True
|
OPENSTACK_SSL_NO_VERIFY = True
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
@ -403,7 +404,7 @@ OPENSTACK_SSL_CACERT = '<%= @openstack_ssl_cacert %>'
|
|||||||
# can_edit_user to False and name to 'ldap'.
|
# can_edit_user to False and name to 'ldap'.
|
||||||
#
|
#
|
||||||
# TODO(tres): Remove these once Keystone has an API to identify auth backend.
|
# TODO(tres): Remove these once Keystone has an API to identify auth backend.
|
||||||
<% if @keystone_options_real.kind_of?(Hash) %>
|
<% if @keystone_options_real.kind_of?(Hash) -%>
|
||||||
OPENSTACK_KEYSTONE_BACKEND = {
|
OPENSTACK_KEYSTONE_BACKEND = {
|
||||||
<% @keystone_options_real.sort.each do |opt_name,opt_val| -%>
|
<% @keystone_options_real.sort.each do |opt_name,opt_val| -%>
|
||||||
<%- if opt_val == true or opt_val == false -%>
|
<%- if opt_val == true or opt_val == false -%>
|
||||||
@ -597,21 +598,21 @@ OPENSTACK_IMAGE_BACKEND = {
|
|||||||
#CREATE_IMAGE_DEFAULTS = {
|
#CREATE_IMAGE_DEFAULTS = {
|
||||||
# 'image_visibility': "public",
|
# 'image_visibility': "public",
|
||||||
#}
|
#}
|
||||||
<% if @create_image_defaults %>
|
<% if @create_image_defaults -%>
|
||||||
CREATE_IMAGE_DEFAULTS = {
|
CREATE_IMAGE_DEFAULTS = {
|
||||||
<%- @create_image_defaults.sort.each do |opt_name,opt_val| -%>
|
<%- @create_image_defaults.sort.each do |opt_name,opt_val| -%>
|
||||||
'<%= opt_name %>': '<%= opt_val %>',
|
'<%= opt_name %>': '<%= opt_val %>',
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
<% 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'.
|
||||||
#OPENSTACK_ENDPOINT_TYPE = "publicURL"
|
#OPENSTACK_ENDPOINT_TYPE = "publicURL"
|
||||||
<% if @openstack_endpoint_type %>
|
<% if @openstack_endpoint_type -%>
|
||||||
OPENSTACK_ENDPOINT_TYPE = "<%= @openstack_endpoint_type %>"
|
OPENSTACK_ENDPOINT_TYPE = "<%= @openstack_endpoint_type %>"
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# SECONDARY_ENDPOINT_TYPE specifies the fallback endpoint type to use in the
|
# SECONDARY_ENDPOINT_TYPE specifies the fallback endpoint type to use in the
|
||||||
# case that OPENSTACK_ENDPOINT_TYPE is not present in the endpoints
|
# case that OPENSTACK_ENDPOINT_TYPE is not present in the endpoints
|
||||||
@ -619,9 +620,9 @@ OPENSTACK_ENDPOINT_TYPE = "<%= @openstack_endpoint_type %>"
|
|||||||
# external to the OpenStack environment. The default is None. This
|
# external to the OpenStack environment. The default is None. This
|
||||||
# value should differ from OPENSTACK_ENDPOINT_TYPE if used.
|
# value should differ from OPENSTACK_ENDPOINT_TYPE if used.
|
||||||
#SECONDARY_ENDPOINT_TYPE = "publicURL"
|
#SECONDARY_ENDPOINT_TYPE = "publicURL"
|
||||||
<% if @secondary_endpoint_type %>
|
<% if @secondary_endpoint_type -%>
|
||||||
SECONDARY_ENDPOINT_TYPE = "<%= @secondary_endpoint_type %>"
|
SECONDARY_ENDPOINT_TYPE = "<%= @secondary_endpoint_type %>"
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# The number of objects (Swift containers/objects or images) to display
|
# The number of objects (Swift containers/objects or images) to display
|
||||||
# on a single page before providing a paging element (a "more" link)
|
# on a single page before providing a paging element (a "more" link)
|
||||||
@ -642,9 +643,9 @@ DROPDOWN_MAX_ITEMS = <%= @dropdown_max_items %>
|
|||||||
TIME_ZONE = "<%= @timezone %>"
|
TIME_ZONE = "<%= @timezone %>"
|
||||||
|
|
||||||
# If you have external monitoring links, eg:
|
# If you have external monitoring links, eg:
|
||||||
<% if @horizon_app_links %>
|
<% if @horizon_app_links -%>
|
||||||
EXTERNAL_MONITORING = <%= @horizon_app_links %>
|
EXTERNAL_MONITORING = <%= @horizon_app_links %>
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# When launching an instance, the menu of available flavors is
|
# When launching an instance, the menu of available flavors is
|
||||||
# sorted by RAM usage, ascending. If you would like a different sort order,
|
# sorted by RAM usage, ascending. If you would like a different sort order,
|
||||||
@ -659,18 +660,18 @@ EXTERNAL_MONITORING = <%= @horizon_app_links %>
|
|||||||
# 'reverse': False,
|
# 'reverse': False,
|
||||||
#}
|
#}
|
||||||
|
|
||||||
<% if @available_themes.kind_of?(Array) %>
|
<% if @available_themes.kind_of?(Array) -%>
|
||||||
AVAILABLE_THEMES = [
|
AVAILABLE_THEMES = [
|
||||||
<% @available_themes.each do |theme| %>
|
<% @available_themes.each do |theme| -%>
|
||||||
('<%= theme['name'] %>', '<%= theme['label'] %>', '<%= theme['path'] %>'),
|
('<%= theme['name'] %>', '<%= theme['label'] %>', '<%= theme['path'] %>'),
|
||||||
<% end %>
|
<% end -%>
|
||||||
]
|
]
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if @default_theme %>
|
<% end -%>
|
||||||
|
<% if @default_theme -%>
|
||||||
DEFAULT_THEME = '<%= @default_theme %>'
|
DEFAULT_THEME = '<%= @default_theme %>'
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
# Modules that provide /auth routes that can be used to handle different types
|
# Modules that provide /auth routes that can be used to handle different types
|
||||||
# of user authentication. Add auth plugins that require extra route handling to
|
# of user authentication. Add auth plugins that require extra route handling to
|
||||||
# this list.
|
# this list.
|
||||||
@ -706,7 +707,7 @@ POLICY_FILES_PATH = '<%= @policy_files_path_real %>'
|
|||||||
# 'image': 'glance_policy.yaml',
|
# 'image': 'glance_policy.yaml',
|
||||||
# 'network': 'neutron_policy.yaml',
|
# 'network': 'neutron_policy.yaml',
|
||||||
#}
|
#}
|
||||||
<% if @policy_files.kind_of?(Hash) %>
|
<% if @policy_files.kind_of?(Hash) -%>
|
||||||
POLICY_FILES = {
|
POLICY_FILES = {
|
||||||
<% @policy_files.sort.each do |service_name,filename| -%>
|
<% @policy_files.sort.each do |service_name,filename| -%>
|
||||||
'<%= service_name -%>': '<%= filename -%>',
|
'<%= service_name -%>': '<%= filename -%>',
|
||||||
@ -1013,9 +1014,9 @@ FILE_UPLOAD_TEMP_DIR = '<%= @file_upload_temp_dir %>'
|
|||||||
# until today (if set to None). This setting should be used to limit the amount
|
# until today (if set to None). This setting should be used to limit the amount
|
||||||
# of data fetched by default when rendering the Overview panel.
|
# of data fetched by default when rendering the Overview panel.
|
||||||
# OVERVIEW_DAYS_RANGE = None
|
# OVERVIEW_DAYS_RANGE = None
|
||||||
<% if @overview_days_range %>
|
<% if @overview_days_range -%>
|
||||||
OVERVIEW_DAYS_RANGE = <%= @overview_days_range %>
|
OVERVIEW_DAYS_RANGE = <%= @overview_days_range %>
|
||||||
<% end %>
|
<% end -%>
|
||||||
|
|
||||||
# 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