~openstack-charmers/charms/trusty/openstack-dashboard/trunk

« back to all changes in this revision

Viewing changes to templates/mitaka/local_settings.py

  • Committer: Gerrit Code Review
  • Author(s): Jenkins
  • Date: 2016-04-13 17:50:50 UTC
  • mfrom: (118.1.1 stable/16.07.remote)
  • Revision ID: review@openstack.org-20160413175050-biz2brwav640es5d
Merge "Add local_settings for Mitaka release"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
import os
 
4
 
 
5
from django.utils.translation import ugettext_lazy as _
 
6
 
 
7
from horizon.utils import secret_key
 
8
 
 
9
{% if use_syslog %}
 
10
from logging.handlers import SysLogHandler
 
11
{% endif %}
 
12
 
 
13
from openstack_dashboard import exceptions
 
14
from openstack_dashboard.settings import HORIZON_CONFIG
 
15
 
 
16
DEBUG = {{ debug }}
 
17
TEMPLATE_DEBUG = DEBUG
 
18
 
 
19
 
 
20
# WEBROOT is the location relative to Webserver root
 
21
# should end with a slash.
 
22
WEBROOT = '/'
 
23
#LOGIN_URL = WEBROOT + 'auth/login/'
 
24
#LOGOUT_URL = WEBROOT + 'auth/logout/'
 
25
#
 
26
# LOGIN_REDIRECT_URL can be used as an alternative for
 
27
# HORIZON_CONFIG.user_home, if user_home is not set.
 
28
# Do not set it to '/home/', as this will cause circular redirect loop
 
29
#LOGIN_REDIRECT_URL = WEBROOT
 
30
 
 
31
# If horizon is running in production (DEBUG is False), set this
 
32
# with the list of host/domain names that the application can serve.
 
33
# For more information see:
 
34
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
 
35
#ALLOWED_HOSTS = ['horizon.example.com', ]
 
36
 
 
37
# Set SSL proxy settings:
 
38
# Pass this header from the proxy after terminating the SSL,
 
39
# and don't forget to strip it from the client's request.
 
40
# For more information see:
 
41
# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
 
42
#SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
 
43
 
 
44
# If Horizon is being served through SSL, then uncomment the following two
 
45
# settings to better secure the cookies from security exploits
 
46
#CSRF_COOKIE_SECURE = True
 
47
#SESSION_COOKIE_SECURE = True
 
48
 
 
49
# The absolute path to the directory where message files are collected.
 
50
# The message file must have a .json file extension. When the user logins to
 
51
# horizon, the message files collected are processed and displayed to the user.
 
52
#MESSAGES_PATH=None
 
53
 
 
54
# Overrides for OpenStack API versions. Use this setting to force the
 
55
# OpenStack dashboard to use a specific API version for a given service API.
 
56
# Versions specified here should be integers or floats, not strings.
 
57
# NOTE: The version should be formatted as it appears in the URL for the
 
58
# service API. For example, The identity service APIs have inconsistent
 
59
# use of the decimal point, so valid options would be 2.0 or 3.
 
60
#OPENSTACK_API_VERSIONS = {
 
61
#    "data-processing": 1.1,
 
62
#    "identity": 3,
 
63
#    "volume": 2,
 
64
#    "compute": 2,
 
65
#}
 
66
 
 
67
# Set this to True if running on multi-domain model. When this is enabled, it
 
68
# will require user to enter the Domain name in addition to username for login.
 
69
#OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
 
70
 
 
71
# Overrides the default domain used when running on single-domain model
 
72
# with Keystone V3. All entities will be created in the default domain.
 
73
# NOTE: This value must be the ID of the default domain, NOT the name.
 
74
# Also, you will most likely have a value in the keystone policy file like this
 
75
#    "cloud_admin": "rule:admin_required and domain_id:<your domain id>"
 
76
# This value must match the domain id specified there.
 
77
#OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'default'
 
78
 
 
79
# Set this to True to enable panels that provide the ability for users to
 
80
# manage Identity Providers (IdPs) and establish a set of rules to map
 
81
# federation protocol attributes to Identity API attributes.
 
82
# This extension requires v3.0+ of the Identity API.
 
83
#OPENSTACK_KEYSTONE_FEDERATION_MANAGEMENT = False
 
84
 
 
85
# Set Console type:
 
86
# valid options are "AUTO"(default), "VNC", "SPICE", "RDP", "SERIAL" or None
 
87
# Set to None explicitly if you want to deactivate the console.
 
88
#CONSOLE_TYPE = "AUTO"
 
89
 
 
90
# If provided, a "Report Bug" link will be displayed in the site header
 
91
# which links to the value of this setting (ideally a URL containing
 
92
# information on how to report issues).
 
93
#HORIZON_CONFIG["bug_url"] = "http://bug-report.example.com"
 
94
 
 
95
# Show backdrop element outside the modal, do not close the modal
 
96
# after clicking on backdrop.
 
97
#HORIZON_CONFIG["modal_backdrop"] = "static"
 
98
 
 
99
# Specify a regular expression to validate user passwords.
 
100
#HORIZON_CONFIG["password_validator"] = {
 
101
#    "regex": '.*',
 
102
#    "help_text": _("Your password does not meet the requirements."),
 
103
#}
 
104
 
 
105
# Disable simplified floating IP address management for deployments with
 
106
# multiple floating IP pools or complex network requirements.
 
107
#HORIZON_CONFIG["simple_ip_management"] = False
 
108
 
 
109
# Turn off browser autocompletion for forms including the login form and
 
110
# the database creation workflow if so desired.
 
111
#HORIZON_CONFIG["password_autocomplete"] = "off"
 
112
 
 
113
# Setting this to True will disable the reveal button for password fields,
 
114
# including on the login form.
 
115
#HORIZON_CONFIG["disable_password_reveal"] = False
 
116
 
 
117
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
 
118
 
 
119
# Set custom secret key:
 
120
# You can either set it to a specific value or you can let horizon generate a
 
121
# default secret key that is unique on this machine, e.i. regardless of the
 
122
# amount of Python WSGI workers (if used behind Apache+mod_wsgi): However,
 
123
# there may be situations where you would want to set this explicitly, e.g.
 
124
# when multiple dashboard instances are distributed on different machines
 
125
# (usually behind a load-balancer). Either you have to make sure that a session
 
126
# gets all requests routed to the same dashboard instance or you set the same
 
127
# SECRET_KEY for all of them.
 
128
SECRET_KEY = "{{ secret }}"
 
129
 
 
130
# We recommend you use memcached for development; otherwise after every reload
 
131
# of the django development server, you will have to login again. To use
 
132
# memcached set CACHES to something like
 
133
 
 
134
CACHES = {
 
135
    'default': {
 
136
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
 
137
        'LOCATION': '127.0.0.1:11211',
 
138
    },
 
139
}
 
140
 
 
141
#CACHES = {
 
142
#    'default': {
 
143
#        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
 
144
#    }
 
145
#}
 
146
 
 
147
# Send email to the console by default
 
148
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 
149
# Or send them to /dev/null
 
150
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
 
151
 
 
152
# Configure these for your outgoing email host
 
153
#EMAIL_HOST = 'smtp.my-company.com'
 
154
#EMAIL_PORT = 25
 
155
#EMAIL_HOST_USER = 'djangomail'
 
156
#EMAIL_HOST_PASSWORD = 'top-secret!'
 
157
 
 
158
# For multiple regions uncomment this configuration, and add (endpoint, title).
 
159
#AVAILABLE_REGIONS = [
 
160
#    ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
 
161
#    ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
 
162
#]
 
163
{% if regions|length > 1 -%}
 
164
AVAILABLE_REGIONS = [
 
165
{% for region in regions -%}
 
166
    ('{{ region.endpoint }}', '{{ region.title }}'),
 
167
{% endfor -%}
 
168
]
 
169
{% endif -%}
 
170
 
 
171
OPENSTACK_HOST = "{{ service_host }}"
 
172
OPENSTACK_KEYSTONE_URL = "{{ service_protocol }}://%s:{{ service_port }}/v2.0" % OPENSTACK_HOST
 
173
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "{{ default_role }}"
 
174
 
 
175
# Enables keystone web single-sign-on if set to True.
 
176
#WEBSSO_ENABLED = False
 
177
 
 
178
# Determines which authentication choice to show as default.
 
179
#WEBSSO_INITIAL_CHOICE = "credentials"
 
180
 
 
181
# The list of authentication mechanisms which include keystone
 
182
# federation protocols and identity provider/federation protocol
 
183
# mapping keys (WEBSSO_IDP_MAPPING). Current supported protocol
 
184
# IDs are 'saml2' and 'oidc'  which represent SAML 2.0, OpenID
 
185
# Connect respectively.
 
186
# Do not remove the mandatory credentials mechanism.
 
187
# Note: The last two tuples are sample mapping keys to a identity provider
 
188
# and federation protocol combination (WEBSSO_IDP_MAPPING).
 
189
#WEBSSO_CHOICES = (
 
190
#    ("credentials", _("Keystone Credentials")),
 
191
#    ("oidc", _("OpenID Connect")),
 
192
#    ("saml2", _("Security Assertion Markup Language")),
 
193
#    ("acme_oidc", "ACME - OpenID Connect"),
 
194
#    ("acme_saml2", "ACME - SAML2"),
 
195
#)
 
196
 
 
197
# A dictionary of specific identity provider and federation protocol
 
198
# combinations. From the selected authentication mechanism, the value
 
199
# will be looked up as keys in the dictionary. If a match is found,
 
200
# it will redirect the user to a identity provider and federation protocol
 
201
# specific WebSSO endpoint in keystone, otherwise it will use the value
 
202
# as the protocol_id when redirecting to the WebSSO by protocol endpoint.
 
203
# NOTE: The value is expected to be a tuple formatted as: (<idp_id>, <protocol_id>).
 
204
#WEBSSO_IDP_MAPPING = {
 
205
#    "acme_oidc": ("acme", "oidc"),
 
206
#    "acme_saml2": ("acme", "saml2"),
 
207
#}
 
208
 
 
209
# Disable SSL certificate checks (useful for self-signed certificates):
 
210
#OPENSTACK_SSL_NO_VERIFY = True
 
211
 
 
212
# The CA certificate to use to verify SSL connections
 
213
#OPENSTACK_SSL_CACERT = '/path/to/cacert.pem'
 
214
 
 
215
# The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the
 
216
# capabilities of the auth backend for Keystone.
 
217
# If Keystone has been configured to use LDAP as the auth backend then set
 
218
# can_edit_user to False and name to 'ldap'.
 
219
#
 
220
# TODO(tres): Remove these once Keystone has an API to identify auth backend.
 
221
OPENSTACK_KEYSTONE_BACKEND = {
 
222
    'name': 'native',
 
223
    'can_edit_user': True,
 
224
    'can_edit_group': True,
 
225
    'can_edit_project': True,
 
226
    'can_edit_domain': True,
 
227
    'can_edit_role': True,
 
228
}
 
229
 
 
230
# Setting this to True, will add a new "Retrieve Password" action on instance,
 
231
# allowing Admin session password retrieval/decryption.
 
232
#OPENSTACK_ENABLE_PASSWORD_RETRIEVE = False
 
233
 
 
234
# The Launch Instance user experience has been significantly enhanced.
 
235
# You can choose whether to enable the new launch instance experience,
 
236
# the legacy experience, or both. The legacy experience will be removed
 
237
# in a future release, but is available as a temporary backup setting to ensure
 
238
# compatibility with existing deployments. Further development will not be
 
239
# done on the legacy experience. Please report any problems with the new
 
240
# experience via the Launchpad tracking system.
 
241
#
 
242
# Toggle LAUNCH_INSTANCE_LEGACY_ENABLED and LAUNCH_INSTANCE_NG_ENABLED to
 
243
# determine the experience to enable.  Set them both to true to enable
 
244
# both.
 
245
#LAUNCH_INSTANCE_LEGACY_ENABLED = True
 
246
#LAUNCH_INSTANCE_NG_ENABLED = False
 
247
 
 
248
# A dictionary of settings which can be used to provide the default values for
 
249
# properties found in the Launch Instance modal.
 
250
#LAUNCH_INSTANCE_DEFAULTS = {
 
251
#    'config_drive': False,
 
252
#}
 
253
 
 
254
# The Xen Hypervisor has the ability to set the mount point for volumes
 
255
# attached to instances (other Hypervisors currently do not). Setting
 
256
# can_set_mount_point to True will add the option to set the mount point
 
257
# from the UI.
 
258
OPENSTACK_HYPERVISOR_FEATURES = {
 
259
    'can_set_mount_point': False,
 
260
    'can_set_password': False,
 
261
    'requires_keypair': False,
 
262
}
 
263
 
 
264
# The OPENSTACK_CINDER_FEATURES settings can be used to enable optional
 
265
# services provided by cinder that is not exposed by its extension API.
 
266
OPENSTACK_CINDER_FEATURES = {
 
267
    'enable_backup': False,
 
268
}
 
269
 
 
270
# The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional
 
271
# services provided by neutron. Options currently available are load
 
272
# balancer service, security groups, quotas, VPN service.
 
273
OPENSTACK_NEUTRON_NETWORK = {
 
274
    'enable_router': True,
 
275
    'enable_quotas': True,
 
276
    'enable_ipv6': True,
 
277
    'enable_distributed_router': False,
 
278
    'enable_ha_router': False,
 
279
    'enable_lb': {{ neutron_network_lb }},
 
280
    'enable_firewall': {{ neutron_network_firewall }},
 
281
    'enable_vpn': {{ neutron_network_vpn }},
 
282
    'enable_fip_topology_check': True,
 
283
 
 
284
    # Neutron can be configured with a default Subnet Pool to be used for IPv4
 
285
    # subnet-allocation. Specify the label you wish to display in the Address
 
286
    # pool selector on the create subnet step if you want to use this feature.
 
287
    'default_ipv4_subnet_pool_label': None,
 
288
 
 
289
    # Neutron can be configured with a default Subnet Pool to be used for IPv6
 
290
    # subnet-allocation. Specify the label you wish to display in the Address
 
291
    # pool selector on the create subnet step if you want to use this feature.
 
292
    # You must set this to enable IPv6 Prefix Delegation in a PD-capable
 
293
    # environment.
 
294
    'default_ipv6_subnet_pool_label': None,
 
295
 
 
296
    # The profile_support option is used to detect if an external router can be
 
297
    # configured via the dashboard. When using specific plugins the
 
298
    # profile_support can be turned on if needed.
 
299
    {% if support_profile -%}
 
300
    'profile_support': '{{ support_profile }}',
 
301
    {% else -%}
 
302
    'profile_support': None,
 
303
    {% endif -%}
 
304
    #'profile_support': 'cisco',
 
305
 
 
306
    # Set which provider network types are supported. Only the network types
 
307
    # in this list will be available to choose from when creating a network.
 
308
    # Network types include local, flat, vlan, gre, and vxlan.
 
309
    'supported_provider_types': ['*'],
 
310
 
 
311
    # Set which VNIC types are supported for port binding. Only the VNIC
 
312
    # types in this list will be available to choose from when creating a
 
313
    # port.
 
314
    # VNIC types include 'normal', 'macvtap' and 'direct'.
 
315
    # Set to empty list or None to disable VNIC type selection.
 
316
    'supported_vnic_types': ['*'],
 
317
}
 
318
 
 
319
# The OPENSTACK_HEAT_STACK settings can be used to disable password
 
320
# field required while launching the stack.
 
321
OPENSTACK_HEAT_STACK = {
 
322
    'enable_user_pass': True,
 
323
}
 
324
 
 
325
# The OPENSTACK_IMAGE_BACKEND settings can be used to customize features
 
326
# in the OpenStack Dashboard related to the Image service, such as the list
 
327
# of supported image formats.
 
328
#OPENSTACK_IMAGE_BACKEND = {
 
329
#    'image_formats': [
 
330
#        ('', _('Select format')),
 
331
#        ('aki', _('AKI - Amazon Kernel Image')),
 
332
#        ('ami', _('AMI - Amazon Machine Image')),
 
333
#        ('ari', _('ARI - Amazon Ramdisk Image')),
 
334
#        ('docker', _('Docker')),
 
335
#        ('iso', _('ISO - Optical Disk Image')),
 
336
#        ('ova', _('OVA - Open Virtual Appliance')),
 
337
#        ('qcow2', _('QCOW2 - QEMU Emulator')),
 
338
#        ('raw', _('Raw')),
 
339
#        ('vdi', _('VDI - Virtual Disk Image')),
 
340
#        ('vhd', _('VHD - Virtual Hard Disk')),
 
341
#        ('vmdk', _('VMDK - Virtual Machine Disk')),
 
342
#    ],
 
343
#}
 
344
 
 
345
# The IMAGE_CUSTOM_PROPERTY_TITLES settings is used to customize the titles for
 
346
# image custom property attributes that appear on image detail pages.
 
347
IMAGE_CUSTOM_PROPERTY_TITLES = {
 
348
    "architecture": _("Architecture"),
 
349
    "kernel_id": _("Kernel ID"),
 
350
    "ramdisk_id": _("Ramdisk ID"),
 
351
    "image_state": _("Euca2ools state"),
 
352
    "project_id": _("Project ID"),
 
353
    "image_type": _("Image Type"),
 
354
}
 
355
 
 
356
# The IMAGE_RESERVED_CUSTOM_PROPERTIES setting is used to specify which image
 
357
# custom properties should not be displayed in the Image Custom Properties
 
358
# table.
 
359
IMAGE_RESERVED_CUSTOM_PROPERTIES = []
 
360
 
 
361
# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
 
362
# in the Keystone service catalog. Use this setting when Horizon is running
 
363
# external to the OpenStack environment. The default is 'publicURL'.
 
364
#OPENSTACK_ENDPOINT_TYPE = "publicURL"
 
365
{% if primary_endpoint -%}
 
366
OPENSTACK_ENDPOINT_TYPE = "{{ primary_endpoint }}"
 
367
{% endif -%}
 
368
 
 
369
# SECONDARY_ENDPOINT_TYPE specifies the fallback endpoint type to use in the
 
370
# case that OPENSTACK_ENDPOINT_TYPE is not present in the endpoints
 
371
# in the Keystone service catalog. Use this setting when Horizon is running
 
372
# external to the OpenStack environment. The default is None.  This
 
373
# value should differ from OPENSTACK_ENDPOINT_TYPE if used.
 
374
#SECONDARY_ENDPOINT_TYPE = "publicURL"
 
375
{% if secondary_endpoint -%}
 
376
SECONDARY_ENDPOINT_TYPE = "{{ secondary_endpoint }}"
 
377
{% endif -%}
 
378
 
 
379
# The number of objects (Swift containers/objects or images) to display
 
380
# on a single page before providing a paging element (a "more" link)
 
381
# to paginate results.
 
382
API_RESULT_LIMIT = 1000
 
383
API_RESULT_PAGE_SIZE = 20
 
384
 
 
385
# The size of chunk in bytes for downloading objects from Swift
 
386
SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
 
387
 
 
388
# Specify a maximum number of items to display in a dropdown.
 
389
DROPDOWN_MAX_ITEMS = 30
 
390
 
 
391
# The timezone of the server. This should correspond with the timezone
 
392
# of your entire OpenStack installation, and hopefully be in UTC.
 
393
TIME_ZONE = "UTC"
 
394
 
 
395
# When launching an instance, the menu of available flavors is
 
396
# sorted by RAM usage, ascending. If you would like a different sort order,
 
397
# you can provide another flavor attribute as sorting key. Alternatively, you
 
398
# can provide a custom callback method to use for sorting. You can also provide
 
399
# a flag for reverse sort. For more info, see
 
400
# http://docs.python.org/2/library/functions.html#sorted
 
401
#CREATE_INSTANCE_FLAVOR_SORT = {
 
402
#    'key': 'name',
 
403
#     # or
 
404
#    'key': my_awesome_callback_method,
 
405
#    'reverse': False,
 
406
#}
 
407
 
 
408
# Set this to True to display an 'Admin Password' field on the Change Password
 
409
# form to verify that it is indeed the admin logged-in who wants to change
 
410
# the password.
 
411
#ENFORCE_PASSWORD_CHECK = False
 
412
 
 
413
# Modules that provide /auth routes that can be used to handle different types
 
414
# of user authentication. Add auth plugins that require extra route handling to
 
415
# this list.
 
416
#AUTHENTICATION_URLS = [
 
417
#    'openstack_auth.urls',
 
418
#]
 
419
 
 
420
# The Horizon Policy Enforcement engine uses these values to load per service
 
421
# policy rule files. The content of these files should match the files the
 
422
# OpenStack services are using to determine role based access control in the
 
423
# target installation.
 
424
 
 
425
# Path to directory containing policy.json files
 
426
#POLICY_FILES_PATH = os.path.join(ROOT_PATH, "conf")
 
427
 
 
428
# Map of local copy of service policy files.
 
429
# Please insure that your identity policy file matches the one being used on
 
430
# your keystone servers. There is an alternate policy file that may be used
 
431
# in the Keystone v3 multi-domain case, policy.v3cloudsample.json.
 
432
# This file is not included in the Horizon repository by default but can be
 
433
# found at
 
434
# http://git.openstack.org/cgit/openstack/keystone/tree/etc/ \
 
435
# policy.v3cloudsample.json
 
436
# Having matching policy files on the Horizon and Keystone servers is essential
 
437
# for normal operation. This holds true for all services and their policy files.
 
438
#POLICY_FILES = {
 
439
#    'identity': 'keystone_policy.json',
 
440
#    'compute': 'nova_policy.json',
 
441
#    'volume': 'cinder_policy.json',
 
442
#    'image': 'glance_policy.json',
 
443
#    'orchestration': 'heat_policy.json',
 
444
#    'network': 'neutron_policy.json',
 
445
#    'telemetry': 'ceilometer_policy.json',
 
446
#}
 
447
 
 
448
# TODO: (david-lyle) remove when plugins support adding settings.
 
449
# Note: Only used when trove-dashboard plugin is configured to be used by
 
450
# Horizon.
 
451
# Trove user and database extension support. By default support for
 
452
# creating users and databases on database instances is turned on.
 
453
# To disable these extensions set the permission here to something
 
454
# unusable such as ["!"].
 
455
#TROVE_ADD_USER_PERMS = []
 
456
#TROVE_ADD_DATABASE_PERMS = []
 
457
 
 
458
# Change this patch to the appropriate list of tuples containing
 
459
# a key, label and static directory containing two files:
 
460
# _variables.scss and _styles.scss
 
461
#AVAILABLE_THEMES = [
 
462
#    ('default', 'Default', 'themes/default'),
 
463
#    ('material', 'Material', 'themes/material'),
 
464
#]
 
465
 
 
466
LOGGING = {
 
467
    'version': 1,
 
468
    # When set to True this will disable all logging except
 
469
    # for loggers specified in this configuration dictionary. Note that
 
470
    # if nothing is specified here and disable_existing_loggers is True,
 
471
    # django.db.backends will still log unless it is disabled explicitly.
 
472
    'disable_existing_loggers': False,
 
473
    'handlers': {
 
474
        'null': {
 
475
            'level': 'DEBUG',
 
476
            'class': 'logging.NullHandler',
 
477
        },
 
478
        'console': {
 
479
            # Set the level to "DEBUG" for verbose output logging.
 
480
            'level': 'INFO',
 
481
            'class': 'logging.StreamHandler',
 
482
        },
 
483
        {% if use_syslog %}
 
484
        'syslog': {
 
485
            'level': 'INFO',
 
486
            'class': 'logging.handlers.SysLogHandler',
 
487
        },
 
488
        {% endif %}
 
489
    },
 
490
    'loggers': {
 
491
        # Logging from django.db.backends is VERY verbose, send to null
 
492
        # by default.
 
493
        'django.db.backends': {
 
494
            'handlers': ['null'],
 
495
            'propagate': False,
 
496
        },
 
497
        'requests': {
 
498
            'handlers': ['null'],
 
499
            'propagate': False,
 
500
        },
 
501
        'horizon': {
 
502
            {% if use_syslog %}
 
503
            'handlers': ['syslog'],
 
504
            {% else %}
 
505
            'handlers': ['console'],
 
506
            {% endif %}
 
507
            'level': 'DEBUG',
 
508
            'propagate': False,
 
509
        },
 
510
        'openstack_dashboard': {
 
511
            {% if use_syslog %}
 
512
            'handlers': ['syslog'],
 
513
            {% else %}
 
514
            'handlers': ['console'],
 
515
            {% endif %}
 
516
            'level': 'DEBUG',
 
517
            'propagate': False,
 
518
        },
 
519
        'novaclient': {
 
520
            {% if use_syslog %}
 
521
            'handlers': ['syslog'],
 
522
            {% else %}
 
523
            'handlers': ['console'],
 
524
            {% endif %}
 
525
            'level': 'DEBUG',
 
526
            'propagate': False,
 
527
        },
 
528
        'cinderclient': {
 
529
            {% if use_syslog %}
 
530
            'handlers': ['syslog'],
 
531
            {% else %}
 
532
            'handlers': ['console'],
 
533
            {% endif %}
 
534
            'level': 'DEBUG',
 
535
            'propagate': False,
 
536
        },
 
537
        'keystoneclient': {
 
538
            {% if use_syslog %}
 
539
            'handlers': ['syslog'],
 
540
            {% else %}
 
541
            'handlers': ['console'],
 
542
            {% endif %}
 
543
            'level': 'DEBUG',
 
544
            'propagate': False,
 
545
        },
 
546
        'glanceclient': {
 
547
            {% if use_syslog %}
 
548
            'handlers': ['syslog'],
 
549
            {% else %}
 
550
            'handlers': ['console'],
 
551
            {% endif %}
 
552
            'level': 'DEBUG',
 
553
            'propagate': False,
 
554
        },
 
555
        'neutronclient': {
 
556
            {% if use_syslog %}
 
557
            'handlers': ['syslog'],
 
558
            {% else %}
 
559
            'handlers': ['console'],
 
560
            {% endif %}
 
561
            'level': 'DEBUG',
 
562
            'propagate': False,
 
563
        },
 
564
        'heatclient': {
 
565
            {% if use_syslog %}
 
566
            'handlers': ['syslog'],
 
567
            {% else %}
 
568
            'handlers': ['console'],
 
569
            {% endif %}
 
570
            'level': 'DEBUG',
 
571
            'propagate': False,
 
572
        },
 
573
        'ceilometerclient': {
 
574
            {% if use_syslog %}
 
575
            'handlers': ['syslog'],
 
576
            {% else %}
 
577
            'handlers': ['console'],
 
578
            {% endif %}
 
579
            'level': 'DEBUG',
 
580
            'propagate': False,
 
581
        },
 
582
        'swiftclient': {
 
583
            {% if use_syslog %}
 
584
            'handlers': ['syslog'],
 
585
            {% else %}
 
586
            'handlers': ['console'],
 
587
            {% endif %}
 
588
            'level': 'DEBUG',
 
589
            'propagate': False,
 
590
        },
 
591
        'openstack_auth': {
 
592
            {% if use_syslog %}
 
593
            'handlers': ['syslog'],
 
594
            {% else %}
 
595
            'handlers': ['console'],
 
596
            {% endif %}
 
597
            'level': 'DEBUG',
 
598
            'propagate': False,
 
599
        },
 
600
        'nose.plugins.manager': {
 
601
            {% if use_syslog %}
 
602
            'handlers': ['syslog'],
 
603
            {% else %}
 
604
            'handlers': ['console'],
 
605
            {% endif %}
 
606
            'level': 'DEBUG',
 
607
            'propagate': False,
 
608
        },
 
609
        'django': {
 
610
            {% if use_syslog %}
 
611
            'handlers': ['syslog'],
 
612
            {% else %}
 
613
            'handlers': ['console'],
 
614
            {% endif %}
 
615
            'level': 'DEBUG',
 
616
            'propagate': False,
 
617
        },
 
618
        'iso8601': {
 
619
            'handlers': ['null'],
 
620
            'propagate': False,
 
621
        },
 
622
        'scss': {
 
623
            'handlers': ['null'],
 
624
            'propagate': False,
 
625
        },
 
626
    },
 
627
}
 
628
 
 
629
# 'direction' should not be specified for all_tcp/udp/icmp.
 
630
# It is specified in the form.
 
631
SECURITY_GROUP_RULES = {
 
632
    'all_tcp': {
 
633
        'name': _('All TCP'),
 
634
        'ip_protocol': 'tcp',
 
635
        'from_port': '1',
 
636
        'to_port': '65535',
 
637
    },
 
638
    'all_udp': {
 
639
        'name': _('All UDP'),
 
640
        'ip_protocol': 'udp',
 
641
        'from_port': '1',
 
642
        'to_port': '65535',
 
643
    },
 
644
    'all_icmp': {
 
645
        'name': _('All ICMP'),
 
646
        'ip_protocol': 'icmp',
 
647
        'from_port': '-1',
 
648
        'to_port': '-1',
 
649
    },
 
650
    'ssh': {
 
651
        'name': 'SSH',
 
652
        'ip_protocol': 'tcp',
 
653
        'from_port': '22',
 
654
        'to_port': '22',
 
655
    },
 
656
    'smtp': {
 
657
        'name': 'SMTP',
 
658
        'ip_protocol': 'tcp',
 
659
        'from_port': '25',
 
660
        'to_port': '25',
 
661
    },
 
662
    'dns': {
 
663
        'name': 'DNS',
 
664
        'ip_protocol': 'tcp',
 
665
        'from_port': '53',
 
666
        'to_port': '53',
 
667
    },
 
668
    'http': {
 
669
        'name': 'HTTP',
 
670
        'ip_protocol': 'tcp',
 
671
        'from_port': '80',
 
672
        'to_port': '80',
 
673
    },
 
674
    'pop3': {
 
675
        'name': 'POP3',
 
676
        'ip_protocol': 'tcp',
 
677
        'from_port': '110',
 
678
        'to_port': '110',
 
679
    },
 
680
    'imap': {
 
681
        'name': 'IMAP',
 
682
        'ip_protocol': 'tcp',
 
683
        'from_port': '143',
 
684
        'to_port': '143',
 
685
    },
 
686
    'ldap': {
 
687
        'name': 'LDAP',
 
688
        'ip_protocol': 'tcp',
 
689
        'from_port': '389',
 
690
        'to_port': '389',
 
691
    },
 
692
    'https': {
 
693
        'name': 'HTTPS',
 
694
        'ip_protocol': 'tcp',
 
695
        'from_port': '443',
 
696
        'to_port': '443',
 
697
    },
 
698
    'smtps': {
 
699
        'name': 'SMTPS',
 
700
        'ip_protocol': 'tcp',
 
701
        'from_port': '465',
 
702
        'to_port': '465',
 
703
    },
 
704
    'imaps': {
 
705
        'name': 'IMAPS',
 
706
        'ip_protocol': 'tcp',
 
707
        'from_port': '993',
 
708
        'to_port': '993',
 
709
    },
 
710
    'pop3s': {
 
711
        'name': 'POP3S',
 
712
        'ip_protocol': 'tcp',
 
713
        'from_port': '995',
 
714
        'to_port': '995',
 
715
    },
 
716
    'ms_sql': {
 
717
        'name': 'MS SQL',
 
718
        'ip_protocol': 'tcp',
 
719
        'from_port': '1433',
 
720
        'to_port': '1433',
 
721
    },
 
722
    'mysql': {
 
723
        'name': 'MYSQL',
 
724
        'ip_protocol': 'tcp',
 
725
        'from_port': '3306',
 
726
        'to_port': '3306',
 
727
    },
 
728
    'rdp': {
 
729
        'name': 'RDP',
 
730
        'ip_protocol': 'tcp',
 
731
        'from_port': '3389',
 
732
        'to_port': '3389',
 
733
    },
 
734
}
 
735
 
 
736
# Deprecation Notice:
 
737
#
 
738
# The setting FLAVOR_EXTRA_KEYS has been deprecated.
 
739
# Please load extra spec metadata into the Glance Metadata Definition Catalog.
 
740
#
 
741
# The sample quota definitions can be found in:
 
742
# <glance_source>/etc/metadefs/compute-quota.json
 
743
#
 
744
# The metadata definition catalog supports CLI and API:
 
745
#  $glance --os-image-api-version 2 help md-namespace-import
 
746
#  $glance-manage db_load_metadefs <directory_with_definition_files>
 
747
#
 
748
# See Metadata Definitions on: http://docs.openstack.org/developer/glance/
 
749
 
 
750
# TODO: (david-lyle) remove when plugins support settings natively
 
751
# Note: This is only used when the Sahara plugin is configured and enabled
 
752
# for use in Horizon.
 
753
# Indicate to the Sahara data processing service whether or not
 
754
# automatic floating IP allocation is in effect.  If it is not
 
755
# in effect, the user will be prompted to choose a floating IP
 
756
# pool for use in their cluster.  False by default.  You would want
 
757
# to set this to True if you were running Nova Networking with
 
758
# auto_assign_floating_ip = True.
 
759
#SAHARA_AUTO_IP_ALLOCATION_ENABLED = False
 
760
 
 
761
# The hash algorithm to use for authentication tokens. This must
 
762
# match the hash algorithm that the identity server and the
 
763
# auth_token middleware are using. Allowed values are the
 
764
# algorithms supported by Python's hashlib library.
 
765
#OPENSTACK_TOKEN_HASH_ALGORITHM = 'md5'
 
766
 
 
767
# Hashing tokens from Keystone keeps the Horizon session data smaller, but it
 
768
# doesn't work in some cases when using PKI tokens.  Uncomment this value and
 
769
# set it to False if using PKI tokens and there are 401 errors due to token
 
770
# hashing.
 
771
#OPENSTACK_TOKEN_HASH_ENABLED = True
 
772
 
 
773
# AngularJS requires some settings to be made available to
 
774
# the client side. Some settings are required by in-tree / built-in horizon
 
775
# features. These settings must be added to REST_API_REQUIRED_SETTINGS in the
 
776
# form of ['SETTING_1','SETTING_2'], etc.
 
777
#
 
778
# You may remove settings from this list for security purposes, but do so at
 
779
# the risk of breaking a built-in horizon feature. These settings are required
 
780
# for horizon to function properly. Only remove them if you know what you
 
781
# are doing. These settings may in the future be moved to be defined within
 
782
# the enabled panel configuration.
 
783
# You should not add settings to this list for out of tree extensions.
 
784
# See: https://wiki.openstack.org/wiki/Horizon/RESTAPI
 
785
REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES',
 
786
                              'LAUNCH_INSTANCE_DEFAULTS']
 
787
 
 
788
# Additional settings can be made available to the client side for
 
789
# extensibility by specifying them in REST_API_ADDITIONAL_SETTINGS
 
790
# !! Please use extreme caution as the settings are transferred via HTTP/S
 
791
# and are not encrypted on the browser. This is an experimental API and
 
792
# may be deprecated in the future without notice.
 
793
#REST_API_ADDITIONAL_SETTINGS = []
 
794
 
 
795
###############################################################################
 
796
# Ubuntu Settings
 
797
###############################################################################
 
798
 
 
799
{% if ubuntu_theme %}
 
800
# Enable the Ubuntu theme if it is present.
 
801
try:
 
802
  from ubuntu_theme import *
 
803
except ImportError:
 
804
  pass
 
805
{% endif %}
 
806
 
 
807
WEBROOT = '{{ webroot }}'
 
808
STATIC_URL = '/static/'
 
809
 
 
810
{% if webroot == "/" %}
 
811
LOGIN_URL='/auth/login/'
 
812
LOGOUT_URL='/auth/logout/'
 
813
{% else %}
 
814
LOGIN_URL='{{ webroot }}/auth/login/'
 
815
LOGOUT_URL='{{ webroot }}/auth/logout/'
 
816
{% endif %}
 
817
LOGIN_REDIRECT_URL='{{ webroot }}'
 
818
 
 
819
# By default, validation of the HTTP Host header is disabled.  Production
 
820
# installations should have this set accordingly.  For more information
 
821
# see https://docs.djangoproject.com/en/dev/ref/settings/.
 
822
ALLOWED_HOSTS = '*'
 
823
 
 
824
# Compress all assets offline as part of packaging installation
 
825
#COMPRESS_OFFLINE = True
 
826
 
 
827
# DISALLOW_IFRAME_EMBED can be used to prevent Horizon from being embedded
 
828
# within an iframe. Legacy browsers are still vulnerable to a Cross-Frame
 
829
# Scripting (XFS) vulnerability, so this option allows extra security hardening
 
830
# where iframes are not used in deployment. Default setting is True.
 
831
# For more information see:
 
832
# http://tinyurl.com/anticlickjack
 
833
#DISALLOW_IFRAME_EMBED = True
 
834
 
 
835
{{ settings|join('\n\n') }}