Advertisement
lmihaiescu

Untitled

May 31st, 2016
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.87 KB | None | 0 0
  1. import os
  2. from django.utils.translation import ugettext_lazy as _
  3. from openstack_dashboard import exceptions
  4. DEBUG = False
  5. TEMPLATE_DEBUG = DEBUG
  6. WEBROOT = '/'
  7. HORIZON_CONFIG = {
  8. 'user_home': 'openstack_dashboard.views.get_user_home',
  9. 'ajax_queue_limit': 10,
  10. 'auto_fade_alerts': {
  11. 'delay': 3000,
  12. 'fade_duration': 1500,
  13. 'types': ['alert-success', 'alert-info']
  14. },
  15. 'help_url': "http://docs.openstack.org",
  16. 'exceptions': {'recoverable': exceptions.RECOVERABLE,
  17. 'not_found': exceptions.NOT_FOUND,
  18. 'unauthorized': exceptions.UNAUTHORIZED},
  19. 'modal_backdrop': 'static',
  20. 'angular_modules': [],
  21. 'js_files': [],
  22. 'js_spec_files': [],
  23. }
  24. LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
  25. from horizon.utils import secret_key
  26. SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
  27. CACHES = {
  28. 'default': {
  29. 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
  30. 'LOCATION': '127.0.0.1:11211',
  31. }
  32. }
  33. EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  34. OPENSTACK_HOST = "controller.com"
  35. OPENSTACK_KEYSTONE_URL = "http://controller.com:5000/v3"
  36. OPENSTACK_API_VERSIONS = {
  37. "identity": 3,
  38. "volume": 2
  39. }
  40. OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
  41. WEBSSO_ENABLED = True
  42. WEBSSO_INITIAL_CHOICE = "oidc"
  43. WEBSSO_CHOICES = (
  44. ("oidc", _("Google Login")))
  45. OPENSTACK_KEYSTONE_BACKEND = {
  46. 'name': 'native',
  47. 'can_edit_user': True,
  48. 'can_edit_group': True,
  49. 'can_edit_project': True,
  50. 'can_edit_domain': True,
  51. 'can_edit_role': True,
  52. }
  53. OPENSTACK_HYPERVISOR_FEATURES = {
  54. 'can_set_mount_point': False,
  55. 'can_set_password': False,
  56. }
  57. OPENSTACK_CINDER_FEATURES = {
  58. 'enable_backup': False,
  59. }
  60. OPENSTACK_NEUTRON_NETWORK = {
  61. 'enable_router': True,
  62. 'enable_quotas': True,
  63. 'enable_ipv6': True,
  64. 'enable_distributed_router': False,
  65. 'enable_ha_router': False,
  66. 'enable_lb': True,
  67. 'enable_firewall': True,
  68. 'enable_vpn': True,
  69. # The profile_support option is used to detect if an external router can be
  70. # configured via the dashboard. When using specific plugins the
  71. # profile_support can be turned on if needed.
  72. 'profile_support': None,
  73. #'profile_support': 'cisco',
  74. # Set which provider network types are supported. Only the network types
  75. # in this list will be available to choose from when creating a network.
  76. # Network types include local, flat, vlan, gre, and vxlan.
  77. 'supported_provider_types': ['*'],
  78. # Set which VNIC types are supported for port binding. Only the VNIC
  79. # types in this list will be available to choose from when creating a
  80. # port.
  81. # VNIC types include 'normal', 'macvtap' and 'direct'.
  82. 'supported_vnic_types': ['*']
  83. }
  84. IMAGE_CUSTOM_PROPERTY_TITLES = {
  85. "architecture": _("Architecture"),
  86. "kernel_id": _("Kernel ID"),
  87. "ramdisk_id": _("Ramdisk ID"),
  88. "image_state": _("Euca2ools state"),
  89. "project_id": _("Project ID"),
  90. "image_type": _("Image Type"),
  91. }
  92. IMAGE_RESERVED_CUSTOM_PROPERTIES = []
  93. API_RESULT_LIMIT = 1000
  94. API_RESULT_PAGE_SIZE = 20
  95. SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
  96. DROPDOWN_MAX_ITEMS = 30
  97. TIME_ZONE = "UTC"
  98. LOGGING = {
  99. 'version': 1,
  100. # When set to True this will disable all logging except
  101. # for loggers specified in this configuration dictionary. Note that
  102. # if nothing is specified here and disable_existing_loggers is True,
  103. # django.db.backends will still log unless it is disabled explicitly.
  104. 'disable_existing_loggers': False,
  105. 'handlers': {
  106. 'null': {
  107. 'level': 'DEBUG',
  108. 'class': 'django.utils.log.NullHandler',
  109. },
  110. 'console': {
  111. # Set the level to "DEBUG" for verbose output logging.
  112. 'level': 'INFO',
  113. 'class': 'logging.StreamHandler',
  114. },
  115. },
  116. 'loggers': {
  117. # Logging from django.db.backends is VERY verbose, send to null
  118. # by default.
  119. 'django.db.backends': {
  120. 'handlers': ['null'],
  121. 'propagate': False,
  122. },
  123. 'requests': {
  124. 'handlers': ['null'],
  125. 'propagate': False,
  126. },
  127. 'horizon': {
  128. 'handlers': ['console'],
  129. 'level': 'DEBUG',
  130. 'propagate': False,
  131. },
  132. 'openstack_dashboard': {
  133. 'handlers': ['console'],
  134. 'level': 'DEBUG',
  135. 'propagate': False,
  136. },
  137. 'novaclient': {
  138. 'handlers': ['console'],
  139. 'level': 'DEBUG',
  140. 'propagate': False,
  141. },
  142. 'cinderclient': {
  143. 'handlers': ['console'],
  144. 'level': 'DEBUG',
  145. 'propagate': False,
  146. },
  147. 'keystoneclient': {
  148. 'handlers': ['console'],
  149. 'level': 'DEBUG',
  150. 'propagate': False,
  151. },
  152. 'glanceclient': {
  153. 'handlers': ['console'],
  154. 'level': 'DEBUG',
  155. 'propagate': False,
  156. },
  157. 'neutronclient': {
  158. 'handlers': ['console'],
  159. 'level': 'DEBUG',
  160. 'propagate': False,
  161. },
  162. 'heatclient': {
  163. 'handlers': ['console'],
  164. 'level': 'DEBUG',
  165. 'propagate': False,
  166. },
  167. 'ceilometerclient': {
  168. 'handlers': ['console'],
  169. 'level': 'DEBUG',
  170. 'propagate': False,
  171. },
  172. 'troveclient': {
  173. 'handlers': ['console'],
  174. 'level': 'DEBUG',
  175. 'propagate': False,
  176. },
  177. 'swiftclient': {
  178. 'handlers': ['console'],
  179. 'level': 'DEBUG',
  180. 'propagate': False,
  181. },
  182. 'openstack_auth': {
  183. 'handlers': ['console'],
  184. 'level': 'DEBUG',
  185. 'propagate': False,
  186. },
  187. 'nose.plugins.manager': {
  188. 'handlers': ['console'],
  189. 'level': 'DEBUG',
  190. 'propagate': False,
  191. },
  192. 'django': {
  193. 'handlers': ['console'],
  194. 'level': 'DEBUG',
  195. 'propagate': False,
  196. },
  197. 'iso8601': {
  198. 'handlers': ['null'],
  199. 'propagate': False,
  200. },
  201. 'scss': {
  202. 'handlers': ['null'],
  203. 'propagate': False,
  204. },
  205. }
  206. }
  207. SECURITY_GROUP_RULES = {
  208. 'all_tcp': {
  209. 'name': _('All TCP'),
  210. 'ip_protocol': 'tcp',
  211. 'from_port': '1',
  212. 'to_port': '65535',
  213. },
  214. 'all_udp': {
  215. 'name': _('All UDP'),
  216. 'ip_protocol': 'udp',
  217. 'from_port': '1',
  218. 'to_port': '65535',
  219. },
  220. 'all_icmp': {
  221. 'name': _('All ICMP'),
  222. 'ip_protocol': 'icmp',
  223. 'from_port': '-1',
  224. 'to_port': '-1',
  225. },
  226. 'ssh': {
  227. 'name': 'SSH',
  228. 'ip_protocol': 'tcp',
  229. 'from_port': '22',
  230. 'to_port': '22',
  231. },
  232. 'smtp': {
  233. 'name': 'SMTP',
  234. 'ip_protocol': 'tcp',
  235. 'from_port': '25',
  236. 'to_port': '25',
  237. },
  238. 'dns': {
  239. 'name': 'DNS',
  240. 'ip_protocol': 'tcp',
  241. 'from_port': '53',
  242. 'to_port': '53',
  243. },
  244. 'http': {
  245. 'name': 'HTTP',
  246. 'ip_protocol': 'tcp',
  247. 'from_port': '80',
  248. 'to_port': '80',
  249. },
  250. 'pop3': {
  251. 'name': 'POP3',
  252. 'ip_protocol': 'tcp',
  253. 'from_port': '110',
  254. 'to_port': '110',
  255. },
  256. 'imap': {
  257. 'name': 'IMAP',
  258. 'ip_protocol': 'tcp',
  259. 'from_port': '143',
  260. 'to_port': '143',
  261. },
  262. 'ldap': {
  263. 'name': 'LDAP',
  264. 'ip_protocol': 'tcp',
  265. 'from_port': '389',
  266. 'to_port': '389',
  267. },
  268. 'https': {
  269. 'name': 'HTTPS',
  270. 'ip_protocol': 'tcp',
  271. 'from_port': '443',
  272. 'to_port': '443',
  273. },
  274. 'smtps': {
  275. 'name': 'SMTPS',
  276. 'ip_protocol': 'tcp',
  277. 'from_port': '465',
  278. 'to_port': '465',
  279. },
  280. 'imaps': {
  281. 'name': 'IMAPS',
  282. 'ip_protocol': 'tcp',
  283. 'from_port': '993',
  284. 'to_port': '993',
  285. },
  286. 'pop3s': {
  287. 'name': 'POP3S',
  288. 'ip_protocol': 'tcp',
  289. 'from_port': '995',
  290. 'to_port': '995',
  291. },
  292. 'ms_sql': {
  293. 'name': 'MS SQL',
  294. 'ip_protocol': 'tcp',
  295. 'from_port': '1433',
  296. 'to_port': '1433',
  297. },
  298. 'mysql': {
  299. 'name': 'MYSQL',
  300. 'ip_protocol': 'tcp',
  301. 'from_port': '3306',
  302. 'to_port': '3306',
  303. },
  304. 'rdp': {
  305. 'name': 'RDP',
  306. 'ip_protocol': 'tcp',
  307. 'from_port': '3389',
  308. 'to_port': '3389',
  309. },
  310. }
  311. REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES']
  312. try:
  313. from ubuntu_theme import *
  314. except ImportError:
  315. pass
  316. WEBROOT='/horizon/'
  317. ALLOWED_HOSTS = '*'
  318. COMPRESS_OFFLINE = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement