includes https://review.openstack.org/14048
Change-Id: I49952dd34408d2e94bcecd9063c21633f4139a99
| ... | ... |
@@ -1,10 +1,28 @@ |
| 1 | 1 |
import os |
| 2 | 2 |
|
| 3 |
+from django.utils.translation import ugettext_lazy as _ |
|
| 4 |
+ |
|
| 3 | 5 |
DEBUG = True |
| 4 | 6 |
TEMPLATE_DEBUG = DEBUG |
| 5 | 7 |
PROD = False |
| 6 | 8 |
USE_SSL = False |
| 7 | 9 |
|
| 10 |
+# 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 |
+ |
|
| 8 | 26 |
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) |
| 9 | 27 |
|
| 10 | 28 |
# FIXME: We need to change this to mysql, instead of sqlite. |
| ... | ... |
@@ -16,14 +34,24 @@ DATABASES = {
|
| 16 | 16 |
}, |
| 17 | 17 |
} |
| 18 | 18 |
|
| 19 |
-# The default values for these two settings seem to cause issues with apache |
|
| 20 |
-CACHE_BACKEND = 'dummy://' |
|
| 21 |
-SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' |
|
| 22 |
- |
|
| 23 |
-# Set a secure and unique SECRET_KEY (the Django default is '') |
|
| 19 |
+# Set custom secret key: |
|
| 20 |
+# You can either set it to a specific value or you can let horizion generate a |
|
| 21 |
+# default secret key that is unique on this machine, e.i. regardless of the |
|
| 22 |
+# amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there |
|
| 23 |
+# may be situations where you would want to set this explicitly, e.g. when |
|
| 24 |
+# multiple dashboard instances are distributed on different machines (usually |
|
| 25 |
+# behind a load-balancer). Either you have to make sure that a session gets all |
|
| 26 |
+# requests routed to the same dashboard instance or you set the same SECRET_KEY |
|
| 27 |
+# for all of them. |
|
| 24 | 28 |
from horizon.utils import secret_key |
| 25 | 29 |
SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store')) |
| 26 | 30 |
|
| 31 |
+# We recommend you use memcached for development; otherwise after every reload |
|
| 32 |
+# of the django development server, you will have to login again. To use |
|
| 33 |
+# memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/' |
|
| 34 |
+CACHE_BACKEND = 'dummy://' |
|
| 35 |
+SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' |
|
| 36 |
+ |
|
| 27 | 37 |
# Send email to the console by default |
| 28 | 38 |
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
| 29 | 39 |
# Or send them to /dev/null |
| ... | ... |
@@ -38,31 +66,55 @@ MAILER_EMAIL_BACKEND = EMAIL_BACKEND |
| 38 | 38 |
# EMAIL_HOST_USER = 'djangomail' |
| 39 | 39 |
# EMAIL_HOST_PASSWORD = 'top-secret!' |
| 40 | 40 |
|
| 41 |
+# For multiple regions uncomment this configuration, and add (endpoint, title). |
|
| 42 |
+# AVAILABLE_REGIONS = [ |
|
| 43 |
+# ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
|
|
| 44 |
+# ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
|
|
| 45 |
+# ] |
|
| 46 |
+ |
|
| 47 |
+OPENSTACK_HOST = "127.0.0.1" |
|
| 48 |
+OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST |
|
| 49 |
+OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" |
|
| 50 |
+ |
|
| 51 |
+# Disable SSL certificate checks (useful for self-signed certificates): |
|
| 52 |
+# OPENSTACK_SSL_NO_VERIFY = True |
|
| 53 |
+ |
|
| 41 | 54 |
HORIZON_CONFIG = {
|
| 42 |
- 'dashboards': ('nova', 'syspanel', 'settings',),
|
|
| 43 |
- 'default_dashboard': 'nova', |
|
| 55 |
+ 'dashboards': ('project', 'admin', 'settings',),
|
|
| 56 |
+ 'default_dashboard': 'project', |
|
| 44 | 57 |
} |
| 45 | 58 |
|
| 59 |
+# The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the |
|
| 60 |
+# capabilities of the auth backend for Keystone. |
|
| 61 |
+# If Keystone has been configured to use LDAP as the auth backend then set |
|
| 62 |
+# can_edit_user to False and name to 'ldap'. |
|
| 63 |
+# |
|
| 46 | 64 |
# TODO(tres): Remove these once Keystone has an API to identify auth backend. |
| 47 | 65 |
OPENSTACK_KEYSTONE_BACKEND = {
|
| 48 | 66 |
'name': 'native', |
| 49 | 67 |
'can_edit_user': True |
| 50 | 68 |
} |
| 51 | 69 |
|
| 52 |
-OPENSTACK_HOST = "127.0.0.1" |
|
| 53 |
-OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST |
|
| 54 |
-# FIXME: this is only needed until keystone fixes its GET /tenants call |
|
| 55 |
-# so that it doesn't return everything for admins |
|
| 56 |
-OPENSTACK_KEYSTONE_ADMIN_URL = "http://%s:35357/v2.0" % OPENSTACK_HOST |
|
| 57 |
-OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member" |
|
| 70 |
+OPENSTACK_HYPERVISOR_FEATURES = {
|
|
| 71 |
+ 'can_set_mount_point': True |
|
| 72 |
+} |
|
| 73 |
+ |
|
| 74 |
+# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints |
|
| 75 |
+# in the Keystone service catalog. Use this setting when Horizon is running |
|
| 76 |
+# external to the OpenStack environment. The default is 'internalURL'. |
|
| 77 |
+#OPENSTACK_ENDPOINT_TYPE = "publicURL" |
|
| 78 |
+ |
|
| 79 |
+# The number of objects (Swift containers/objects or images) to display |
|
| 80 |
+# on a single page before providing a paging element (a "more" link) |
|
| 81 |
+# to paginate results. |
|
| 82 |
+API_RESULT_LIMIT = 1000 |
|
| 83 |
+API_RESULT_PAGE_SIZE = 20 |
|
| 58 | 84 |
|
| 59 | 85 |
SWIFT_PAGINATE_LIMIT = 100 |
| 60 | 86 |
|
| 61 |
-# If you have external monitoring links, eg: |
|
| 62 |
-# EXTERNAL_MONITORING = [ |
|
| 63 |
-# ['Nagios','http://foo.com'], |
|
| 64 |
-# ['Ganglia','http://bar.com'], |
|
| 65 |
-# ] |
|
| 87 |
+# The timezone of the server. This should correspond with the timezone |
|
| 88 |
+# of your entire OpenStack installation, and hopefully be in UTC. |
|
| 89 |
+TIME_ZONE = "UTC" |
|
| 66 | 90 |
|
| 67 | 91 |
#LOGGING = {
|
| 68 | 92 |
# 'version': 1, |
| ... | ... |
@@ -93,6 +145,10 @@ SWIFT_PAGINATE_LIMIT = 100 |
| 93 | 93 |
# 'handlers': ['console'], |
| 94 | 94 |
# 'propagate': False, |
| 95 | 95 |
# }, |
| 96 |
+# 'openstack_dashboard': {
|
|
| 97 |
+# 'handlers': ['console'], |
|
| 98 |
+# 'propagate': False, |
|
| 99 |
+# }, |
|
| 96 | 100 |
# 'novaclient': {
|
| 97 | 101 |
# 'handlers': ['console'], |
| 98 | 102 |
# 'propagate': False, |
| ... | ... |
@@ -101,6 +157,10 @@ SWIFT_PAGINATE_LIMIT = 100 |
| 101 | 101 |
# 'handlers': ['console'], |
| 102 | 102 |
# 'propagate': False, |
| 103 | 103 |
# }, |
| 104 |
+# 'glanceclient': {
|
|
| 105 |
+# 'handlers': ['console'], |
|
| 106 |
+# 'propagate': False, |
|
| 107 |
+# }, |
|
| 104 | 108 |
# 'nose.plugins.manager': {
|
| 105 | 109 |
# 'handlers': ['console'], |
| 106 | 110 |
# 'propagate': False, |