Support custom TIME_ZONE option in localsettings
This patch aims to add support for customization of TIME_ZONE option which may be needed by global users. Closes-Bug: #1553835 Change-Id: Id7b2c6776c0021b7c887ad6c4a4de8d15801984b
This commit is contained in:
@@ -265,6 +265,10 @@
|
|||||||
# the user is logged out.
|
# the user is logged out.
|
||||||
# Defaults to 1800.
|
# Defaults to 1800.
|
||||||
#
|
#
|
||||||
|
# [*timezone*]
|
||||||
|
# (optional) The timezone of the server.
|
||||||
|
# Defaults to 'UTC'.
|
||||||
|
#
|
||||||
# === Examples
|
# === Examples
|
||||||
#
|
#
|
||||||
# class { 'horizon':
|
# class { 'horizon':
|
||||||
@@ -327,6 +331,7 @@ class horizon(
|
|||||||
$overview_days_range = undef,
|
$overview_days_range = undef,
|
||||||
$root_url = $::horizon::params::root_url,
|
$root_url = $::horizon::params::root_url,
|
||||||
$session_timeout = 1800,
|
$session_timeout = 1800,
|
||||||
|
$timezone = 'UTC',
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$can_set_mount_point = undef,
|
$can_set_mount_point = undef,
|
||||||
$vhost_extra_params = undef,
|
$vhost_extra_params = undef,
|
||||||
|
@@ -72,6 +72,7 @@ describe 'horizon' do
|
|||||||
" 'enable_security_group': True,",
|
" 'enable_security_group': True,",
|
||||||
" 'enable_vpn': False,",
|
" 'enable_vpn': False,",
|
||||||
'API_RESULT_LIMIT = 1000',
|
'API_RESULT_LIMIT = 1000',
|
||||||
|
'TIME_ZONE = "UTC"',
|
||||||
'COMPRESS_OFFLINE = True',
|
'COMPRESS_OFFLINE = True',
|
||||||
"FILE_UPLOAD_TEMP_DIR = '/tmp'"
|
"FILE_UPLOAD_TEMP_DIR = '/tmp'"
|
||||||
])
|
])
|
||||||
@@ -115,7 +116,8 @@ describe 'horizon' do
|
|||||||
:keystone_multidomain_support => true,
|
:keystone_multidomain_support => true,
|
||||||
:keystone_default_domain => 'domain.tld',
|
:keystone_default_domain => 'domain.tld',
|
||||||
:overview_days_range => 1,
|
:overview_days_range => 1,
|
||||||
:session_timeout => 1800
|
:session_timeout => 1800,
|
||||||
|
:timezone => 'Asia/Shanghai',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -153,6 +155,7 @@ describe 'horizon' do
|
|||||||
'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',
|
||||||
|
'TIME_ZONE = "Asia/Shanghai"',
|
||||||
"CUSTOM_THEME_PATH = 'static/themes/green'",
|
"CUSTOM_THEME_PATH = 'static/themes/green'",
|
||||||
" 'level': 'DEBUG',",
|
" 'level': 'DEBUG',",
|
||||||
" 'handlers': ['syslog'],",
|
" 'handlers': ['syslog'],",
|
||||||
|
@@ -477,7 +477,7 @@ API_RESULT_PAGE_SIZE = 20
|
|||||||
|
|
||||||
# The timezone of the server. This should correspond with the timezone
|
# The timezone of the server. This should correspond with the timezone
|
||||||
# of your entire OpenStack installation, and hopefully be in UTC.
|
# of your entire OpenStack installation, and hopefully be in UTC.
|
||||||
TIME_ZONE = "UTC"
|
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 %>
|
||||||
|
Reference in New Issue
Block a user