components/openstack/horizon/files/local_settings.py
changeset 3998 5bd484384122
parent 1963 fe904db9c438
child 4049 150852e281c4
equal deleted inserted replaced
3997:0ca3f3d6c919 3998:5bd484384122
    30 # redirects here accordingly.
    30 # redirects here accordingly.
    31 LOGIN_URL = '/horizon/auth/login/'
    31 LOGIN_URL = '/horizon/auth/login/'
    32 LOGOUT_URL = '/horizon/auth/logout/'
    32 LOGOUT_URL = '/horizon/auth/logout/'
    33 LOGIN_REDIRECT_URL = '/horizon'
    33 LOGIN_REDIRECT_URL = '/horizon'
    34 
    34 
    35 STATIC_ROOT = '/var/lib/openstack_dashboard/static'
    35 STATIC_ROOT = '/usr/lib/python2.6/vendor-packages/openstack_dashboard/static'
    36 
    36 
    37 # Enable Solaris theme
    37 # Enable Solaris theme
    38 TEMPLATE_DIRS = ('/var/lib/openstack_dashboard/static/solaris/theme', )
    38 TEMPLATE_DIRS = (
       
    39     '/usr/lib/python2.6/vendor-packages/openstack_dashboard/templates/solaris',
       
    40 )
       
    41 
       
    42 # Application files are compressed during packaging
       
    43 COMPRESS_OFFLINE = True
    39 
    44 
    40 # Overrides for OpenStack API versions. Use this setting to force the
    45 # Overrides for OpenStack API versions. Use this setting to force the
    41 # OpenStack dashboard to use a specfic API version for a given service API.
    46 # OpenStack dashboard to use a specific API version for a given service API.
    42 # NOTE: The version should be formatted as it appears in the URL for the
    47 # NOTE: The version should be formatted as it appears in the URL for the
    43 # service API. For example, The identity service APIs have inconsistent
    48 # service API. For example, The identity service APIs have inconsistent
    44 # use of the decimal point, so valid options would be "2.0" or "3".
    49 # use of the decimal point, so valid options would be "2.0" or "3".
    45 # OPENSTACK_API_VERSIONS = {
    50 # OPENSTACK_API_VERSIONS = {
    46 #     "identity": 3
    51 #     "data_processing": 1.1,
       
    52 #     "identity": 3,
       
    53 #     "volume": 2
    47 # }
    54 # }
    48 
    55 
    49 # Set this to True if running on multi-domain model. When this is enabled, it
    56 # Set this to True if running on multi-domain model. When this is enabled, it
    50 # will require user to enter the Domain name in addition to username for login.
    57 # will require user to enter the Domain name in addition to username for login.
    51 # OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
    58 # OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = False
    53 # Overrides the default domain used when running on single-domain model
    60 # Overrides the default domain used when running on single-domain model
    54 # with Keystone V3. All entities will be created in the default domain.
    61 # with Keystone V3. All entities will be created in the default domain.
    55 # OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
    62 # OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
    56 
    63 
    57 # Set Console type:
    64 # Set Console type:
    58 # valid options would be "AUTO", "VNC" or "SPICE"
    65 # valid options would be "AUTO"(default), "VNC", "SPICE", "RDP" or None
       
    66 # Set to None explicitly if you want to deactivate the console.
    59 # CONSOLE_TYPE = "AUTO"
    67 # CONSOLE_TYPE = "AUTO"
    60 
    68 
    61 # Default OpenStack Dashboard configuration.
    69 # Default OpenStack Dashboard configuration.
    62 HORIZON_CONFIG = {
    70 HORIZON_CONFIG = {
    63     'dashboards': ('project', 'admin', 'settings',),
    71     'dashboards': ('project', 'admin', 'settings',),
    71     },
    79     },
    72     'help_url': "http://docs.openstack.org",
    80     'help_url': "http://docs.openstack.org",
    73     'exceptions': {'recoverable': exceptions.RECOVERABLE,
    81     'exceptions': {'recoverable': exceptions.RECOVERABLE,
    74                    'not_found': exceptions.NOT_FOUND,
    82                    'not_found': exceptions.NOT_FOUND,
    75                    'unauthorized': exceptions.UNAUTHORIZED},
    83                    'unauthorized': exceptions.UNAUTHORIZED},
       
    84     'angular_modules': [],
       
    85     'js_files': [],
    76     'customization_module': 'openstack_dashboard.overrides',
    86     'customization_module': 'openstack_dashboard.overrides',
    77 }
    87 }
    78 
    88 
    79 # Specify a regular expression to validate user passwords.
    89 # Specify a regular expression to validate user passwords.
    80 # HORIZON_CONFIG["password_validator"] = {
    90 # HORIZON_CONFIG["password_validator"] = {
    84 
    94 
    85 # Disable simplified floating IP address management for deployments with
    95 # Disable simplified floating IP address management for deployments with
    86 # multiple floating IP pools or complex network requirements.
    96 # multiple floating IP pools or complex network requirements.
    87 # HORIZON_CONFIG["simple_ip_management"] = False
    97 # HORIZON_CONFIG["simple_ip_management"] = False
    88 
    98 
    89 # Turn off browser autocompletion for the login form if so desired.
    99 # Turn off browser autocompletion for forms including the login form and
       
   100 # the database creation workflow if so desired.
    90 # HORIZON_CONFIG["password_autocomplete"] = "off"
   101 # HORIZON_CONFIG["password_autocomplete"] = "off"
    91 
   102 
    92 LOCAL_PATH = '/var/lib/openstack_dashboard'
   103 LOCAL_PATH = '/var/lib/openstack_dashboard'
    93 
   104 
    94 # Set custom secret key:
   105 # Set custom secret key:
    95 # You can either set it to a specific value or you can let horizion generate a
   106 # You can either set it to a specific value or you can let horizon generate a
    96 # default secret key that is unique on this machine, e.i. regardless of the
   107 # default secret key that is unique on this machine, e.i. regardless of the
    97 # amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there
   108 # amount of Python WSGI workers (if used behind Apache+mod_wsgi): However, there
    98 # may be situations where you would want to set this explicitly, e.g. when
   109 # may be situations where you would want to set this explicitly, e.g. when
    99 # multiple dashboard instances are distributed on different machines (usually
   110 # multiple dashboard instances are distributed on different machines (usually
   100 # behind a load-balancer). Either you have to make sure that a session gets all
   111 # behind a load-balancer). Either you have to make sure that a session gets all
   101 # requests routed to the same dashboard instance or you set the same SECRET_KEY
   112 # requests routed to the same dashboard instance or you set the same SECRET_KEY
   102 # for all of them.
   113 # for all of them.
   103 from horizon.utils import secret_key
   114 from horizon.utils import secret_key
   104 SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store'))
   115 SECRET_KEY = secret_key.generate_or_read_from_file(
       
   116     os.path.join(LOCAL_PATH, '.secret_key_store'))
   105 
   117 
   106 # We recommend you use memcached for development; otherwise after every reload
   118 # We recommend you use memcached for development; otherwise after every reload
   107 # of the django development server, you will have to login again. To use
   119 # of the django development server, you will have to login again. To use
   108 # memcached set CACHES to something like
   120 # memcached set CACHES to something like
   109 # CACHES = {
   121 # CACHES = {
   110 #    'default': {
   122 #    'default': {
   111 #        'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
   123 #        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
   112 #        'LOCATION' : '127.0.0.1:11211',
   124 #        'LOCATION': '127.0.0.1:11211',
   113 #    }
   125 #    }
   114 #}
   126 #}
   115 
   127 
   116 CACHES = {
   128 CACHES = {
   117     'default': {
   129     'default': {
   118         'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
   130         'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'
   119     }
   131     }
   120 }
   132 }
   121 
   133 
   122 # Send email to the console by default
   134 # Send email to the console by default
   123 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
   135 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
   159     'can_edit_project': True,
   171     'can_edit_project': True,
   160     'can_edit_domain': True,
   172     'can_edit_domain': True,
   161     'can_edit_role': True
   173     'can_edit_role': True
   162 }
   174 }
   163 
   175 
       
   176 #Setting this to True, will add a new "Retrieve Password" action on instance,
       
   177 #allowing Admin session password retrieval/decryption.
       
   178 #OPENSTACK_ENABLE_PASSWORD_RETRIEVE = False
       
   179 
   164 # The Xen Hypervisor has the ability to set the mount point for volumes
   180 # The Xen Hypervisor has the ability to set the mount point for volumes
   165 # attached to instances (other Hypervisors currently do not). Setting
   181 # attached to instances (other Hypervisors currently do not). Setting
   166 # can_set_mount_point to True will add the option to set the mount point
   182 # can_set_mount_point to True will add the option to set the mount point
   167 # from the UI.
   183 # from the UI.
   168 OPENSTACK_HYPERVISOR_FEATURES = {
   184 OPENSTACK_HYPERVISOR_FEATURES = {
   169     'can_set_mount_point': False,
   185     'can_set_mount_point': False,
       
   186     'can_set_password': False,
       
   187 }
       
   188 
       
   189 # The OPENSTACK_CINDER_FEATURES settings can be used to enable optional
       
   190 # services provided by cinder that is not exposed by its extension API.
       
   191 OPENSTACK_CINDER_FEATURES = {
       
   192     'enable_backup': False,
   170 }
   193 }
   171 
   194 
   172 # The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional
   195 # The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional
   173 # services provided by neutron. Options currenly available are load
   196 # services provided by neutron. Options currently available are load
   174 # balancer service, security groups, quotas, VPN service.
   197 # balancer service, security groups, quotas, VPN service.
   175 OPENSTACK_NEUTRON_NETWORK = {
   198 OPENSTACK_NEUTRON_NETWORK = {
       
   199     'enable_router': True,
       
   200     'enable_quotas': True,
       
   201     'enable_ipv6': True,
       
   202     'enable_distributed_router': False,
       
   203     'enable_ha_router': False,
   176     'enable_lb': False,
   204     'enable_lb': False,
   177     'enable_firewall': False,
   205     'enable_firewall': False,
   178     'enable_quotas': True,
       
   179     'enable_vpn': False,
   206     'enable_vpn': False,
   180     # The profile_support option is used to detect if an external router can be
   207     # The profile_support option is used to detect if an external router can be
   181     # configured via the dashboard. When using specific plugins the
   208     # configured via the dashboard. When using specific plugins the
   182     # profile_support can be turned on if needed.
   209     # profile_support can be turned on if needed.
   183     'profile_support': None,
   210     'profile_support': None,
   184     #'profile_support': 'cisco',
   211     #'profile_support': 'cisco',
       
   212     # Set which provider network types are supported. Only the network types
       
   213     # in this list will be available to choose from when creating a network.
       
   214     # Network types include local, flat, vlan, gre, and vxlan.
       
   215     'supported_provider_types': ['*'],
   185 }
   216 }
   186 
   217 
   187 # The OPENSTACK_IMAGE_BACKEND settings can be used to customize features
   218 # The OPENSTACK_IMAGE_BACKEND settings can be used to customize features
   188 # in the OpenStack Dashboard related to the Image service, such as the list
   219 # in the OpenStack Dashboard related to the Image service, such as the list
   189 # of supported image formats.
   220 # of supported image formats.
   190 # OPENSTACK_IMAGE_BACKEND = {
   221 # OPENSTACK_IMAGE_BACKEND = {
   191 #     'image_formats': [
   222 #     'image_formats': [
   192 #         ('', ''),
   223 #         ('', _('Select format')),
   193 #         ('aki', _('AKI - Amazon Kernel Image')),
   224 #         ('aki', _('AKI - Amazon Kernel Image')),
   194 #         ('ami', _('AMI - Amazon Machine Image')),
   225 #         ('ami', _('AMI - Amazon Machine Image')),
   195 #         ('ari', _('ARI - Amazon Ramdisk Image')),
   226 #         ('ari', _('ARI - Amazon Ramdisk Image')),
   196 #         ('iso', _('ISO - Optical Disk Image')),
   227 #         ('iso', _('ISO - Optical Disk Image')),
   197 #         ('qcow2', _('QCOW2 - QEMU Emulator')),
   228 #         ('qcow2', _('QCOW2 - QEMU Emulator')),
   200 #         ('vhd', _('VHD')),
   231 #         ('vhd', _('VHD')),
   201 #         ('vmdk', _('VMDK'))
   232 #         ('vmdk', _('VMDK'))
   202 #     ]
   233 #     ]
   203 # }
   234 # }
   204 
   235 
       
   236 # The IMAGE_CUSTOM_PROPERTY_TITLES settings is used to customize the titles for
       
   237 # image custom property attributes that appear on image detail pages.
       
   238 IMAGE_CUSTOM_PROPERTY_TITLES = {
       
   239     "architecture": _("Architecture"),
       
   240     "kernel_id": _("Kernel ID"),
       
   241     "ramdisk_id": _("Ramdisk ID"),
       
   242     "image_state": _("Euca2ools state"),
       
   243     "project_id": _("Project ID"),
       
   244     "image_type": _("Image Type")
       
   245 }
       
   246 
       
   247 # The IMAGE_RESERVED_CUSTOM_PROPERTIES setting is used to specify which image
       
   248 # custom properties should not be displayed in the Image Custom Properties
       
   249 # table.
       
   250 IMAGE_RESERVED_CUSTOM_PROPERTIES = []
       
   251 
   205 # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
   252 # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
   206 # in the Keystone service catalog. Use this setting when Horizon is running
   253 # in the Keystone service catalog. Use this setting when Horizon is running
   207 # external to the OpenStack environment. The default is 'publicURL'.
   254 # external to the OpenStack environment. The default is 'publicURL'.
   208 #OPENSTACK_ENDPOINT_TYPE = "publicURL"
   255 #OPENSTACK_ENDPOINT_TYPE = "publicURL"
   209 
   256 
   223 # The timezone of the server. This should correspond with the timezone
   270 # The timezone of the server. This should correspond with the timezone
   224 # of your entire OpenStack installation, and hopefully be in UTC.
   271 # of your entire OpenStack installation, and hopefully be in UTC.
   225 TIME_ZONE = "UTC"
   272 TIME_ZONE = "UTC"
   226 
   273 
   227 # When launching an instance, the menu of available flavors is
   274 # When launching an instance, the menu of available flavors is
   228 # sorted by RAM usage, ascending.  Provide a callback method here
   275 # sorted by RAM usage, ascending. If you would like a different sort order,
   229 # (and/or a flag for reverse sort) for the sorted() method if you'd
   276 # you can provide another flavor attribute as sorting key. Alternatively, you
   230 # like a different behaviour.  For more info, see
   277 # can provide a custom callback method to use for sorting. You can also provide
       
   278 # a flag for reverse sort. For more info, see
   231 # http://docs.python.org/2/library/functions.html#sorted
   279 # http://docs.python.org/2/library/functions.html#sorted
   232 # CREATE_INSTANCE_FLAVOR_SORT = {
   280 # CREATE_INSTANCE_FLAVOR_SORT = {
       
   281 #     'key': 'name',
       
   282 #      # or
   233 #     'key': my_awesome_callback_method,
   283 #     'key': my_awesome_callback_method,
   234 #     'reverse': False,
   284 #     'reverse': False,
   235 # }
   285 # }
   236 
   286 
   237 # The Horizon Policy Enforcement engine uses these values to load per service
   287 # The Horizon Policy Enforcement engine uses these values to load per service
   242 # Path to directory containing policy.json files
   292 # Path to directory containing policy.json files
   243 #POLICY_FILES_PATH = os.path.join(ROOT_PATH, "conf")
   293 #POLICY_FILES_PATH = os.path.join(ROOT_PATH, "conf")
   244 # Map of local copy of service policy files
   294 # Map of local copy of service policy files
   245 #POLICY_FILES = {
   295 #POLICY_FILES = {
   246 #    'identity': 'keystone_policy.json',
   296 #    'identity': 'keystone_policy.json',
   247 #    'compute': 'nova_policy.json'
   297 #    'compute': 'nova_policy.json',
       
   298 #    'volume': 'cinder_policy.json',
       
   299 #    'image': 'glance_policy.json',
       
   300 #    'orchestration': 'heat_policy.json',
       
   301 #    'network': 'neutron_policy.json',
   248 #}
   302 #}
   249 
   303 
   250 # Trove user and database extension support. By default support for
   304 # Trove user and database extension support. By default support for
   251 # creating users and databases on database instances is turned on.
   305 # creating users and databases on database instances is turned on.
   252 # To disable these extensions set the permission here to something
   306 # To disable these extensions set the permission here to something
   355         },
   409         },
   356         'iso8601': {
   410         'iso8601': {
   357             'handlers': ['null'],
   411             'handlers': ['null'],
   358             'propagate': False,
   412             'propagate': False,
   359         },
   413         },
       
   414         'scss': {
       
   415             'handlers': ['null'],
       
   416             'propagate': False,
       
   417         },
   360     }
   418     }
   361 }
   419 }
   362 
   420 
       
   421 # 'direction' should not be specified for all_tcp/udp/icmp.
       
   422 # It is specified in the form.
   363 SECURITY_GROUP_RULES = {
   423 SECURITY_GROUP_RULES = {
   364     'all_tcp': {
   424     'all_tcp': {
   365         'name': 'ALL TCP',
   425         'name': _('All TCP'),
   366         'ip_protocol': 'tcp',
   426         'ip_protocol': 'tcp',
   367         'from_port': '1',
   427         'from_port': '1',
   368         'to_port': '65535',
   428         'to_port': '65535',
   369     },
   429     },
   370     'all_udp': {
   430     'all_udp': {
   371         'name': 'ALL UDP',
   431         'name': _('All UDP'),
   372         'ip_protocol': 'udp',
   432         'ip_protocol': 'udp',
   373         'from_port': '1',
   433         'from_port': '1',
   374         'to_port': '65535',
   434         'to_port': '65535',
   375     },
   435     },
   376     'all_icmp': {
   436     'all_icmp': {
   377         'name': 'ALL ICMP',
   437         'name': _('All ICMP'),
   378         'ip_protocol': 'icmp',
   438         'ip_protocol': 'icmp',
   379         'from_port': '-1',
   439         'from_port': '-1',
   380         'to_port': '-1',
   440         'to_port': '-1',
   381     },
   441     },
   382     'ssh': {
   442     'ssh': {
   462         'ip_protocol': 'tcp',
   522         'ip_protocol': 'tcp',
   463         'from_port': '3389',
   523         'from_port': '3389',
   464         'to_port': '3389',
   524         'to_port': '3389',
   465     },
   525     },
   466 }
   526 }
       
   527 
       
   528 # Deprecation Notice:
       
   529 #
       
   530 # The setting FLAVOR_EXTRA_KEYS has been deprecated.
       
   531 # Please load extra spec metadata into the Glance Metadata Definition Catalog.
       
   532 #
       
   533 # The sample quota definitions can be found in:
       
   534 # <glance_source>/etc/metadefs/compute-quota.json
       
   535 #
       
   536 # The metadata definition catalog supports CLI and API:
       
   537 #  $glance --os-image-api-version 2 help md-namespace-import
       
   538 #  $glance-manage db_load_metadefs <directory_with_definition_files>
       
   539 #
       
   540 # See Metadata Definitions on: http://docs.openstack.org/developer/glance/
       
   541 
       
   542 # Indicate to the Sahara data processing service whether or not
       
   543 # automatic floating IP allocation is in effect.  If it is not
       
   544 # in effect, the user will be prompted to choose a floating IP
       
   545 # pool for use in their cluster.  False by default.  You would want
       
   546 # to set this to True if you were running Nova Networking with
       
   547 # auto_assign_floating_ip = True.
       
   548 # SAHARA_AUTO_IP_ALLOCATION_ENABLED = False
       
   549 
       
   550 # The hash algorithm to use for authentication tokens. This must
       
   551 # match the hash algorithm that the identity server and the
       
   552 # auth_token middleware are using. Allowed values are the
       
   553 # algorithms supported by Python's hashlib library.
       
   554 # OPENSTACK_TOKEN_HASH_ALGORITHM = 'md5'
       
   555