local_settings.py revision 2521
2521N/Aimport os
2521N/A
2521N/Afrom django.utils.translation import ugettext_lazy as _
2521N/A
2521N/Afrom openstack_dashboard import exceptions
2521N/A
2521N/ADEBUG = False
2521N/ATEMPLATE_DEBUG = DEBUG
2521N/A
2521N/A# Set SSL proxy settings:
2521N/A# For Django 1.4+ pass this header from the proxy after terminating the SSL,
2521N/A# and don't forget to strip it from the client's request.
2521N/A# For more information see:
2521N/A# https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
2521N/ASECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
2521N/A
2521N/A# If Horizon is being served through SSL, then uncomment the following two
2521N/A# settings to better secure the cookies from security exploits
2521N/ACSRF_COOKIE_SECURE = True
2521N/ASESSION_COOKIE_SECURE = True
2521N/A
2521N/A# Default configuration uses /horizon as the application root. Configure auth
2521N/A# redirects here accordingly.
2521N/ALOGIN_URL = '/horizon/auth/login/'
2521N/ALOGOUT_URL = '/horizon/auth/logout/'
2521N/ALOGIN_REDIRECT_URL = '/horizon'
2521N/A
2521N/A# Set STATIC_ROOT directly.
2521N/ASTATIC_ROOT = "/var/lib/openstack_dashboard/static"
2521N/A
2521N/A# Enable Solaris theme
2521N/ATEMPLATE_DIRS = ('/var/lib/openstack_dashboard/static/solaris/theme', )
2521N/A
2521N/A# Default OpenStack Dashboard configuration.
2521N/AHORIZON_CONFIG = {
2521N/A 'dashboards': ('project', 'admin', 'settings',),
2521N/A 'default_dashboard': 'project',
2521N/A 'user_home': 'openstack_dashboard.views.get_user_home',
2521N/A 'ajax_queue_limit': 10,
2521N/A 'auto_fade_alerts': {
2521N/A 'delay': 3000,
2521N/A 'fade_duration': 1500,
2521N/A 'types': ['alert-success', 'alert-info']
2521N/A },
2521N/A 'help_url': "http://docs.openstack.org",
2521N/A 'exceptions': {'recoverable': exceptions.RECOVERABLE,
2521N/A 'not_found': exceptions.NOT_FOUND,
2521N/A 'unauthorized': exceptions.UNAUTHORIZED},
2521N/A}
2521N/A
2521N/A# Specify a regular expression to validate user passwords.
2521N/A# HORIZON_CONFIG["password_validator"] = {
2521N/A# "regex": '.*',
2521N/A# "help_text": _("Your password does not meet the requirements.")
2521N/A# }
2521N/A
2521N/A# Disable simplified floating IP address management for deployments with
2521N/A# multiple floating IP pools or complex network requirements.
2521N/A# HORIZON_CONFIG["simple_ip_management"] = False
2521N/A
2521N/A# Turn off browser autocompletion for the login form if so desired.
2521N/A# HORIZON_CONFIG["password_autocomplete"] = "off"
2521N/A
2521N/ALOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
2521N/A
2521N/A# Set custom secret key:
2521N/A# You can either set it to a specific value or you can let horizion generate a
2521N/A# default secret key that is unique on this machine, e.i. regardless of the
2521N/A# amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there
2521N/A# may be situations where you would want to set this explicitly, e.g. when
2521N/A# multiple dashboard instances are distributed on different machines (usually
2521N/A# behind a load-balancer). Either you have to make sure that a session gets all
2521N/A# requests routed to the same dashboard instance or you set the same SECRET_KEY
2521N/A# for all of them.
2521N/Afrom horizon.utils import secret_key
2521N/ASECRET_KEY = secret_key.generate_key()
2521N/A
2521N/A# We recommend you use memcached for development; otherwise after every reload
2521N/A# of the django development server, you will have to login again. To use
2521N/A# memcached set CACHES to something like
2521N/A# CACHES = {
2521N/A# 'default': {
2521N/A# 'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
2521N/A# 'LOCATION' : '127.0.0.1:11211',
2521N/A# }
2521N/A#}
2521N/A
2521N/ACACHES = {
2521N/A 'default': {
2521N/A 'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
2521N/A }
2521N/A}
2521N/A
2521N/A# Send email to the console by default
2521N/AEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
2521N/A# Or send them to /dev/null
2521N/A#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
2521N/A
2521N/A# Configure these for your outgoing email host
2521N/A# EMAIL_HOST = 'smtp.my-company.com'
2521N/A# EMAIL_PORT = 25
2521N/A# EMAIL_HOST_USER = 'djangomail'
2521N/A# EMAIL_HOST_PASSWORD = 'top-secret!'
2521N/A
2521N/A# For multiple regions uncomment this configuration, and add (endpoint, title).
2521N/A# AVAILABLE_REGIONS = [
2521N/A# ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
2521N/A# ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
2521N/A# ]
2521N/A
2521N/AOPENSTACK_HOST = "127.0.0.1"
2521N/AOPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
2521N/AOPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
2521N/A
2521N/A# Disable SSL certificate checks (useful for self-signed certificates):
2521N/A# OPENSTACK_SSL_NO_VERIFY = True
2521N/A
2521N/A# The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the
2521N/A# capabilities of the auth backend for Keystone.
2521N/A# If Keystone has been configured to use LDAP as the auth backend then set
2521N/A# can_edit_user to False and name to 'ldap'.
2521N/A#
2521N/A# TODO(tres): Remove these once Keystone has an API to identify auth backend.
2521N/AOPENSTACK_KEYSTONE_BACKEND = {
2521N/A 'name': 'native',
2521N/A 'can_edit_user': True,
2521N/A 'can_edit_project': True
2521N/A}
2521N/A
2521N/AOPENSTACK_HYPERVISOR_FEATURES = {
2521N/A 'can_set_mount_point': True,
2521N/A
2521N/A # NOTE: as of Grizzly this is not yet supported in Nova so enabling this
2521N/A # setting will not do anything useful
2521N/A 'can_encrypt_volumes': False
2521N/A}
2521N/A
2521N/A# The OPENSTACK_QUANTUM_NETWORK settings can be used to enable optional
2521N/A# services provided by quantum. Currently only the load balancer service
2521N/A# is available.
2521N/AOPENSTACK_QUANTUM_NETWORK = {
2521N/A 'enable_lb': False
2521N/A}
2521N/A
2521N/A# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
2521N/A# in the Keystone service catalog. Use this setting when Horizon is running
2521N/A# external to the OpenStack environment. The default is 'internalURL'.
2521N/A#OPENSTACK_ENDPOINT_TYPE = "publicURL"
2521N/A
2521N/A# The number of objects (Swift containers/objects or images) to display
2521N/A# on a single page before providing a paging element (a "more" link)
2521N/A# to paginate results.
2521N/AAPI_RESULT_LIMIT = 1000
2521N/AAPI_RESULT_PAGE_SIZE = 20
2521N/A
2521N/A# The timezone of the server. This should correspond with the timezone
2521N/A# of your entire OpenStack installation, and hopefully be in UTC.
2521N/ATIME_ZONE = "UTC"
2521N/A
2521N/ALOGGING = {
2521N/A 'version': 1,
2521N/A # When set to True this will disable all logging except
2521N/A # for loggers specified in this configuration dictionary. Note that
2521N/A # if nothing is specified here and disable_existing_loggers is True,
2521N/A # django.db.backends will still log unless it is disabled explicitly.
2521N/A 'disable_existing_loggers': False,
2521N/A 'handlers': {
2521N/A 'null': {
2521N/A 'level': 'DEBUG',
2521N/A 'class': 'django.utils.log.NullHandler',
2521N/A },
2521N/A 'console': {
2521N/A # Set the level to "DEBUG" for verbose output logging.
2521N/A 'level': 'INFO',
2521N/A 'class': 'logging.StreamHandler',
2521N/A },
2521N/A },
2521N/A 'loggers': {
2521N/A # Logging from django.db.backends is VERY verbose, send to null
2521N/A # by default.
2521N/A 'django.db.backends': {
2521N/A 'handlers': ['null'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'requests': {
2521N/A 'handlers': ['null'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'horizon': {
2521N/A 'handlers': ['console'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'openstack_dashboard': {
2521N/A 'handlers': ['console'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'novaclient': {
2521N/A 'handlers': ['console'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'keystoneclient': {
2521N/A 'handlers': ['console'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'glanceclient': {
2521N/A 'handlers': ['console'],
2521N/A 'propagate': False,
2521N/A },
2521N/A 'nose.plugins.manager': {
2521N/A 'handlers': ['console'],
2521N/A 'propagate': False,
2521N/A }
2521N/A }
2521N/A}