blob: ce92e2c9e27bf366909eb4db2da297554fcc1e27 [file] [log] [blame]
Jake Dahn9337b332011-09-15 21:46:20 -07001import os
2
Dean Troyer1b23d7c2012-10-04 13:52:22 -05003from django.utils.translation import ugettext_lazy as _
4
Jake Dahn9337b332011-09-15 21:46:20 -07005DEBUG = True
6TEMPLATE_DEBUG = DEBUG
7PROD = False
8USE_SSL = False
9
Dean Troyer1b23d7c2012-10-04 13:52:22 -050010# Set SSL proxy settings:
11# For Django 1.4+ pass this header from the proxy after terminating the SSL,
12# and don't forget to strip it from the client's request.
13# For more information see:
14# https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
15# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
16
17# Specify a regular expression to validate user passwords.
18# HORIZON_CONFIG = {
19# "password_validator": {
20# "regex": '.*',
21# "help_text": _("Your password does not meet the requirements.")
22# },
23# 'help_url': "http://docs.openstack.org"
24# }
25
Jake Dahn9337b332011-09-15 21:46:20 -070026LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
Jake Dahna3492ed2011-09-15 22:42:43 -070027
28# FIXME: We need to change this to mysql, instead of sqlite.
Jake Dahn9337b332011-09-15 21:46:20 -070029DATABASES = {
30 'default': {
31 'ENGINE': 'django.db.backends.sqlite3',
32 'NAME': os.path.join(LOCAL_PATH, 'dashboard_openstack.sqlite3'),
Jesse Andrews9c7c9082011-11-23 10:10:53 -080033 'TEST_NAME': os.path.join(LOCAL_PATH, 'test.sqlite3'),
Jake Dahn9337b332011-09-15 21:46:20 -070034 },
35}
36
Dean Troyer1b23d7c2012-10-04 13:52:22 -050037# Set custom secret key:
38# You can either set it to a specific value or you can let horizion generate a
39# default secret key that is unique on this machine, e.i. regardless of the
40# amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there
41# may be situations where you would want to set this explicitly, e.g. when
42# multiple dashboard instances are distributed on different machines (usually
43# behind a load-balancer). Either you have to make sure that a session gets all
44# requests routed to the same dashboard instance or you set the same SECRET_KEY
45# for all of them.
Sascha Peilicke34536302012-06-21 16:09:27 +020046from horizon.utils import secret_key
47SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store'))
48
Dean Troyer1b23d7c2012-10-04 13:52:22 -050049# We recommend you use memcached for development; otherwise after every reload
50# of the django development server, you will have to login again. To use
51# memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/'
52CACHE_BACKEND = 'dummy://'
53SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
54
Jake Dahn9337b332011-09-15 21:46:20 -070055# Send email to the console by default
56EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
57# Or send them to /dev/null
58#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
59
60# django-mailer uses a different settings attribute
61MAILER_EMAIL_BACKEND = EMAIL_BACKEND
62
63# Configure these for your outgoing email host
64# EMAIL_HOST = 'smtp.my-company.com'
65# EMAIL_PORT = 25
66# EMAIL_HOST_USER = 'djangomail'
67# EMAIL_HOST_PASSWORD = 'top-secret!'
68
Dean Troyer1b23d7c2012-10-04 13:52:22 -050069# For multiple regions uncomment this configuration, and add (endpoint, title).
70# AVAILABLE_REGIONS = [
71# ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
72# ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
73# ]
74
75OPENSTACK_HOST = "127.0.0.1"
76OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
77OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
78
79# Disable SSL certificate checks (useful for self-signed certificates):
80# OPENSTACK_SSL_NO_VERIFY = True
81
Jesse Andrews9c7c9082011-11-23 10:10:53 -080082HORIZON_CONFIG = {
Dean Troyer1b23d7c2012-10-04 13:52:22 -050083 'dashboards': ('project', 'admin', 'settings',),
84 'default_dashboard': 'project',
Jesse Andrews9c7c9082011-11-23 10:10:53 -080085}
86
Dean Troyer1b23d7c2012-10-04 13:52:22 -050087# The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the
88# capabilities of the auth backend for Keystone.
89# If Keystone has been configured to use LDAP as the auth backend then set
90# can_edit_user to False and name to 'ldap'.
91#
jakedahn770cec72012-03-12 14:07:51 -070092# TODO(tres): Remove these once Keystone has an API to identify auth backend.
93OPENSTACK_KEYSTONE_BACKEND = {
94 'name': 'native',
95 'can_edit_user': True
96}
97
Dean Troyer1b23d7c2012-10-04 13:52:22 -050098OPENSTACK_HYPERVISOR_FEATURES = {
99 'can_set_mount_point': True
100}
101
102# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
103# in the Keystone service catalog. Use this setting when Horizon is running
104# external to the OpenStack environment. The default is 'internalURL'.
105#OPENSTACK_ENDPOINT_TYPE = "publicURL"
106
107# The number of objects (Swift containers/objects or images) to display
108# on a single page before providing a paging element (a "more" link)
109# to paginate results.
110API_RESULT_LIMIT = 1000
111API_RESULT_PAGE_SIZE = 20
Jake Dahn9337b332011-09-15 21:46:20 -0700112
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800113SWIFT_PAGINATE_LIMIT = 100
Jake Dahn9337b332011-09-15 21:46:20 -0700114
Dean Troyer1b23d7c2012-10-04 13:52:22 -0500115# The timezone of the server. This should correspond with the timezone
116# of your entire OpenStack installation, and hopefully be in UTC.
117TIME_ZONE = "UTC"
Jake Dahn9337b332011-09-15 21:46:20 -0700118
Jake Dahn9337b332011-09-15 21:46:20 -0700119#LOGGING = {
120# 'version': 1,
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800121# # When set to True this will disable all logging except
122# # for loggers specified in this configuration dictionary. Note that
123# # if nothing is specified here and disable_existing_loggers is True,
124# # django.db.backends will still log unless it is disabled explicitly.
Jake Dahn9337b332011-09-15 21:46:20 -0700125# 'disable_existing_loggers': False,
126# 'handlers': {
127# 'null': {
128# 'level': 'DEBUG',
129# 'class': 'django.utils.log.NullHandler',
130# },
131# 'console': {
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800132# # Set the level to "DEBUG" for verbose output logging.
133# 'level': 'INFO',
Jake Dahn9337b332011-09-15 21:46:20 -0700134# 'class': 'logging.StreamHandler',
135# },
136# },
137# 'loggers': {
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800138# # Logging from django.db.backends is VERY verbose, send to null
139# # by default.
Jake Dahn9337b332011-09-15 21:46:20 -0700140# 'django.db.backends': {
141# 'handlers': ['null'],
142# 'propagate': False,
143# },
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800144# 'horizon': {
145# 'handlers': ['console'],
Jake Dahn9337b332011-09-15 21:46:20 -0700146# 'propagate': False,
147# },
Dean Troyer1b23d7c2012-10-04 13:52:22 -0500148# 'openstack_dashboard': {
149# 'handlers': ['console'],
150# 'propagate': False,
151# },
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800152# 'novaclient': {
153# 'handlers': ['console'],
154# 'propagate': False,
155# },
156# 'keystoneclient': {
157# 'handlers': ['console'],
158# 'propagate': False,
159# },
Dean Troyer1b23d7c2012-10-04 13:52:22 -0500160# 'glanceclient': {
161# 'handlers': ['console'],
162# 'propagate': False,
163# },
Jesse Andrews9c7c9082011-11-23 10:10:53 -0800164# 'nose.plugins.manager': {
165# 'handlers': ['console'],
166# 'propagate': False,
167# }
Jake Dahn9337b332011-09-15 21:46:20 -0700168# }
169#}