local_settings.py revision 2925
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTrippfrom django.utils.translation import ugettext_lazy as _
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Required for Django 1.5.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# If horizon is running in production (DEBUG is False), set this
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# with the list of host/domain names that the application can serve.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# For more information see:
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp#ALLOWED_HOSTS = ['horizon.example.com', ]
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Set SSL proxy settings:
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# For Django 1.4+ pass this header from the proxy after terminating the SSL,
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# and don't forget to strip it from the client's request.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# For more information see:
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTrippSECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# If Horizon is being served through SSL, then uncomment the following two
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# settings to better secure the cookies from security exploits
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Default configuration uses /horizon as the application root. Configure auth
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# redirects here accordingly.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Enable Solaris theme
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTrippTEMPLATE_DIRS = ('/var/lib/openstack_dashboard/static/solaris/theme', )
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Overrides for OpenStack API versions. Use this setting to force the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OpenStack dashboard to use a specfic API version for a given service API.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# NOTE: The version should be formatted as it appears in the URL for the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# service API. For example, The identity service APIs have inconsistent
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# use of the decimal point, so valid options would be "2.0" or "3".
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_API_VERSIONS = {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# "identity": 3
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Set this to True if running on multi-domain model. When this is enabled, it
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# will require user to enter the Domain name in addition to username for login.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Overrides the default domain used when running on single-domain model
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# with Keystone V3. All entities will be created in the default domain.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Set Console type:
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# valid options would be "AUTO", "VNC" or "SPICE"
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# CONSOLE_TYPE = "AUTO"
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Default OpenStack Dashboard configuration.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'user_home': 'openstack_dashboard.views.get_user_home',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'auto_fade_alerts': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'customization_module': 'openstack_dashboard.overrides',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Specify a regular expression to validate user passwords.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# HORIZON_CONFIG["password_validator"] = {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# "regex": '.*',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# "help_text": _("Your password does not meet the requirements.")
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Disable simplified floating IP address management for deployments with
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# multiple floating IP pools or complex network requirements.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# HORIZON_CONFIG["simple_ip_management"] = False
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Turn off browser autocompletion for the login form if so desired.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# HORIZON_CONFIG["password_autocomplete"] = "off"
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Set custom secret key:
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# You can either set it to a specific value or you can let horizion generate a
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# default secret key that is unique on this machine, e.i. regardless of the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# may be situations where you would want to set this explicitly, e.g. when
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# multiple dashboard instances are distributed on different machines (usually
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# behind a load-balancer). Either you have to make sure that a session gets all
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# requests routed to the same dashboard instance or you set the same SECRET_KEY
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# for all of them.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTrippSECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store'))
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# We recommend you use memcached for development; otherwise after every reload
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# of the django development server, you will have to login again. To use
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# memcached set CACHES to something like
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# CACHES = {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'default': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'LOCATION' : '127.0.0.1:11211',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'default': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Send email to the console by default
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTrippEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Or send them to /dev/null
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Configure these for your outgoing email host
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# EMAIL_HOST = 'smtp.my-company.com'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# EMAIL_PORT = 25
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# EMAIL_HOST_USER = 'djangomail'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# EMAIL_HOST_PASSWORD = 'top-secret!'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# For multiple regions uncomment this configuration, and add (endpoint, title).
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# AVAILABLE_REGIONS = [
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTrippOPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Disable SSL certificate checks (useful for self-signed certificates):
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_SSL_NO_VERIFY = True
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The CA certificate to use to verify SSL connections
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_SSL_CACERT = '/path/to/cacert.pem'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# capabilities of the auth backend for Keystone.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# If Keystone has been configured to use LDAP as the auth backend then set
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# can_edit_user to False and name to 'ldap'.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# TODO(tres): Remove these once Keystone has an API to identify auth backend.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The Xen Hypervisor has the ability to set the mount point for volumes
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# attached to instances (other Hypervisors currently do not). Setting
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# can_set_mount_point to True will add the option to set the mount point
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# from the UI.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# services provided by neutron. Options currenly available are load
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# balancer service, security groups, quotas, VPN service.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # The profile_support option is used to detect if an external router can be
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # configured via the dashboard. When using specific plugins the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # profile_support can be turned on if needed.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'profile_support': None,
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp #'profile_support': 'cisco',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The OPENSTACK_IMAGE_BACKEND settings can be used to customize features
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# in the OpenStack Dashboard related to the Image service, such as the list
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# of supported image formats.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_IMAGE_BACKEND = {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'image_formats': [
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('aki', _('AKI - Amazon Kernel Image')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('ami', _('AMI - Amazon Machine Image')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('ari', _('ARI - Amazon Ramdisk Image')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('iso', _('ISO - Optical Disk Image')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('qcow2', _('QCOW2 - QEMU Emulator')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('raw', _('Raw')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('vdi', _('VDI')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('vhd', _('VHD')),
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# ('vmdk', _('VMDK'))
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# in the Keystone service catalog. Use this setting when Horizon is running
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# external to the OpenStack environment. The default is 'publicURL'.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp#OPENSTACK_ENDPOINT_TYPE = "publicURL"
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# SECONDARY_ENDPOINT_TYPE specifies the fallback endpoint type to use in the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# case that OPENSTACK_ENDPOINT_TYPE is not present in the endpoints
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# in the Keystone service catalog. Use this setting when Horizon is running
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# external to the OpenStack environment. The default is None. This
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# value should differ from OPENSTACK_ENDPOINT_TYPE if used.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp#SECONDARY_ENDPOINT_TYPE = "publicURL"
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The number of objects (Swift containers/objects or images) to display
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# on a single page before providing a paging element (a "more" link)
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# to paginate results.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The timezone of the server. This should correspond with the timezone
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# of your entire OpenStack installation, and hopefully be in UTC.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# When launching an instance, the menu of available flavors is
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# sorted by RAM usage, ascending. Provide a callback method here
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# (and/or a flag for reverse sort) for the sorted() method if you'd
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# like a different behaviour. For more info, see
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# http://docs.python.org/2/library/functions.html#sorted
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# CREATE_INSTANCE_FLAVOR_SORT = {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'key': my_awesome_callback_method,
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'reverse': False,
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# The Horizon Policy Enforcement engine uses these values to load per service
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# policy rule files. The content of these files should match the files the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# OpenStack services are using to determine role based access control in the
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# target installation.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Path to directory containing policy.json files
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp#POLICY_FILES_PATH = os.path.join(ROOT_PATH, "conf")
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Map of local copy of service policy files
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp#POLICY_FILES = {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'identity': 'keystone_policy.json',
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# 'compute': 'nova_policy.json'
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# Trove user and database extension support. By default support for
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# creating users and databases on database instances is turned on.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# To disable these extensions set the permission here to something
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# unusable such as ["!"].
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# TROVE_ADD_USER_PERMS = []
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp# TROVE_ADD_DATABASE_PERMS = []
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # When set to True this will disable all logging except
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # for loggers specified in this configuration dictionary. Note that
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # if nothing is specified here and disable_existing_loggers is True,
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # django.db.backends will still log unless it is disabled explicitly.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'handlers': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'console': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # Set the level to "DEBUG" for verbose output logging.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'loggers': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # Logging from django.db.backends is VERY verbose, send to null
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp # by default.
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'django.db.backends': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'requests': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'horizon': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'openstack_dashboard': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'novaclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'cinderclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'keystoneclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'glanceclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'neutronclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'heatclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'ceilometerclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'troveclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'swiftclient': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'openstack_auth': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'nose.plugins.manager': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'django': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'iso8601': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'all_tcp': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'all_udp': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'all_icmp': {
09688ec5ffb8b9cf9883a770e2f9ebd60b28888dTripp 'ms_sql': {