Guest User

Untitled

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