Advertisement
Guest User

Untitled

a guest
May 23rd, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.52 KB | None | 0 0
  1. import os
  2.  
  3. from django.utils.translation import ugettext_lazy as _
  4.  
  5. from openstack_dashboard import exceptions
  6.  
  7. DEBUG = True
  8. TEMPLATE_DEBUG = DEBUG
  9.  
  10. # Required for Django 1.5.
  11. # If horizon is running in production (DEBUG is False), set this
  12. # with the list of host/domain names that the application can serve.
  13. # For more information see:
  14. # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
  15. #ALLOWED_HOSTS = ['horizon.example.com', ]
  16.  
  17. # Set SSL proxy settings:
  18. # For Django 1.4+ pass this header from the proxy after terminating the SSL,
  19. # and don't forget to strip it from the client's request.
  20. # For more information see:
  21. # https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
  22. # SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
  23.  
  24. # If Horizon is being served through SSL, then uncomment the following two
  25. # settings to better secure the cookies from security exploits
  26. #CSRF_COOKIE_SECURE = True
  27. #SESSION_COOKIE_SECURE = True
  28.  
  29. # Overrides for OpenStack API versions. Use this setting to force the
  30. # OpenStack dashboard to use a specfic API version for a given service API.
  31. # NOTE: The version should be formatted as it appears in the URL for the
  32. # service API. For example, The identity service APIs have inconsistent
  33. # use of the decimal point, so valid options would be "2.0" or "3".
  34. #OPENSTACK_API_VERSIONS = {
  35. # "identity": 2.0
  36. #}
  37.  
  38. #LOGIN_URL='/horizon/auth/login/'
  39. #LOGIN_REDIRECT_URL='/horizon'
  40.  
  41. # Set this to True if running on multi-domain model. When this is enabled, it
  42. # will require user to enter the Domain name in addition to username for login.
  43. OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
  44.  
  45. # Overrides the default domain used when running on single-domain model
  46. # with Keystone V3. All entities will be created in the default domain.
  47. OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
  48.  
  49. # Default OpenStack Dashboard configuration.
  50. HORIZON_CONFIG = {
  51. 'dashboards': ('project', 'admin', 'settings',),
  52. 'default_dashboard': 'project',
  53. 'user_home': 'openstack_dashboard.views.get_user_home',
  54. 'ajax_queue_limit': 10,
  55. 'auto_fade_alerts': {
  56. 'delay': 3000,
  57. 'fade_duration': 1500,
  58. 'types': ['alert-success', 'alert-info']
  59. },
  60. 'help_url': "http://docs.openstack.org",
  61. 'exceptions': {'recoverable': exceptions.RECOVERABLE,
  62. 'not_found': exceptions.NOT_FOUND,
  63. 'unauthorized': exceptions.UNAUTHORIZED},
  64. }
  65.  
  66. # Specify a regular expression to validate user passwords.
  67. # HORIZON_CONFIG["password_validator"] = {
  68. # "regex": '.*',
  69. # "help_text": _("Your password does not meet the requirements.")
  70. # }
  71.  
  72. # Disable simplified floating IP address management for deployments with
  73. # multiple floating IP pools or complex network requirements.
  74. # HORIZON_CONFIG["simple_ip_management"] = False
  75.  
  76. # Turn off browser autocompletion for the login form if so desired.
  77. # HORIZON_CONFIG["password_autocomplete"] = "off"
  78.  
  79. LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
  80.  
  81. # Set custom secret key:
  82. # You can either set it to a specific value or you can let horizion generate a
  83. # default secret key that is unique on this machine, e.i. regardless of the
  84. # amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there
  85. # may be situations where you would want to set this explicitly, e.g. when
  86. # multiple dashboard instances are distributed on different machines (usually
  87. # behind a load-balancer). Either you have to make sure that a session gets all
  88. # requests routed to the same dashboard instance or you set the same SECRET_KEY
  89. # for all of them.
  90. from horizon.utils import secret_key
  91. SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store'))
  92.  
  93. # We recommend you use memcached for development; otherwise after every reload
  94. # of the django development server, you will have to login again. To use
  95. # memcached set CACHES to something like
  96. CACHES = {
  97. 'default': {
  98. 'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
  99. 'LOCATION' : '127.0.0.1:11211',
  100. }
  101. }
  102.  
  103.  
  104. #COMPRESS_OFFLINE = True
  105.  
  106. #CACHES = {
  107. # 'default': {
  108. # 'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
  109. # }
  110. #}
  111.  
  112. # Send email to the console by default
  113. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  114. # Or send them to /dev/null
  115. #EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
  116.  
  117. # Configure these for your outgoing email host
  118. # EMAIL_HOST = 'smtp.my-company.com'
  119. # EMAIL_PORT = 25
  120. # EMAIL_HOST_USER = 'djangomail'
  121. # EMAIL_HOST_PASSWORD = 'top-secret!'
  122.  
  123. # For multiple regions uncomment this configuration, and add (endpoint, title).
  124. # AVAILABLE_REGIONS = [
  125. # ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
  126. # ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
  127. # ]
  128.  
  129. OPENSTACK_HOST = "auth.x.org"
  130. OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
  131. OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"
  132.  
  133. # Disable SSL certificate checks (useful for self-signed certificates):
  134. # OPENSTACK_SSL_NO_VERIFY = True
  135.  
  136. # The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the
  137. # capabilities of the auth backend for Keystone.
  138. # If Keystone has been configured to use LDAP as the auth backend then set
  139. # can_edit_user to False and name to 'ldap'.
  140. #
  141. # TODO(tres): Remove these once Keystone has an API to identify auth backend.
  142. OPENSTACK_KEYSTONE_BACKEND = {
  143. 'name': 'native',
  144. 'can_edit_user': True,
  145. 'can_edit_project': True
  146. }
  147.  
  148. OPENSTACK_HYPERVISOR_FEATURES = {
  149. 'can_set_mount_point': True,
  150.  
  151. # NOTE: as of Grizzly this is not yet supported in Nova so enabling this
  152. # setting will not do anything useful
  153. 'can_encrypt_volumes': False
  154. }
  155.  
  156. # The OPENSTACK_QUANTUM_NETWORK settings can be used to enable optional
  157. # services provided by quantum. Currently only the load balancer service
  158. # is available.
  159. OPENSTACK_QUANTUM_NETWORK = {
  160. 'enable_lb': True
  161. }
  162.  
  163. # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
  164. # in the Keystone service catalog. Use this setting when Horizon is running
  165. # external to the OpenStack environment. The default is 'internalURL'.
  166. #OPENSTACK_ENDPOINT_TYPE = "publicURL"
  167.  
  168. # The number of objects (Swift containers/objects or images) to display
  169. # on a single page before providing a paging element (a "more" link)
  170. # to paginate results.
  171. API_RESULT_LIMIT = 1000
  172. API_RESULT_PAGE_SIZE = 20
  173.  
  174. # The timezone of the server. This should correspond with the timezone
  175. # of your entire OpenStack installation, and hopefully be in UTC.
  176. TIME_ZONE = "UTC"
  177.  
  178. LOGGING = {
  179. 'version': 1,
  180. # When set to True this will disable all logging except
  181. # for loggers specified in this configuration dictionary. Note that
  182. # if nothing is specified here and disable_existing_loggers is True,
  183. # django.db.backends will still log unless it is disabled explicitly.
  184. 'disable_existing_loggers': False,
  185. 'handlers': {
  186. 'null': {
  187. 'level': 'DEBUG',
  188. 'class': 'django.utils.log.NullHandler',
  189. },
  190. 'console': {
  191. # Set the level to "DEBUG" for verbose output logging.
  192. 'level': 'INFO',
  193. 'class': 'logging.StreamHandler',
  194. },
  195. },
  196. 'loggers': {
  197. # Logging from django.db.backends is VERY verbose, send to null
  198. # by default.
  199. 'django.db.backends': {
  200. 'handlers': ['null'],
  201. 'propagate': False,
  202. },
  203. 'requests': {
  204. 'handlers': ['null'],
  205. 'propagate': False,
  206. },
  207. 'horizon': {
  208. 'handlers': ['console'],
  209. 'propagate': False,
  210. },
  211. 'openstack_dashboard': {
  212. 'handlers': ['console'],
  213. 'propagate': False,
  214. },
  215. 'novaclient': {
  216. 'handlers': ['console'],
  217. 'propagate': False,
  218. },
  219. 'keystoneclient': {
  220. 'handlers': ['console'],
  221. 'propagate': False,
  222. },
  223. 'glanceclient': {
  224. 'handlers': ['console'],
  225. 'propagate': False,
  226. },
  227. 'nose.plugins.manager': {
  228. 'handlers': ['console'],
  229. 'propagate': False,
  230. }
  231. }
  232. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement