# We recommend you use memcached for development; otherwise after every reload
# of the django development server, you will have to login again. To use
# memcached set CACHE_BACKED to something like 'memcached://127.0.0.1:11211/'
CACHE_BACKEND = 'locmem://'
# Send email to the console by default
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Or send them to /dev/null
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
# Configure these for your outgoing email host
# EMAIL_HOST = 'smtp.my-company.com'
# EMAIL_PORT = 25
# EMAIL_HOST_USER = 'djangomail'
# EMAIL_HOST_PASSWORD = 'top-secret!'
# The OPENSTACK_KEYSTONE_BACKEND settings can be used to identify the
# capabilities of the auth backend for Keystone.
# If Keystone has been configured to use LDAP as the auth backend then set
# can_edit_user to False and name to 'ldap'.
#
# TODO(tres): Remove these once Keystone has an API to identify auth backend.
OPENSTACK_KEYSTONE_BACKEND = {
'name': 'native',
'can_edit_user': True
}
# OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints
# in the Keystone service catalog. Use this setting when Horizon is running
# external to the OpenStack environment. The default is 'internalURL'.
#OPENSTACK_ENDPOINT_TYPE = "publicURL"
# The number of Swift containers and objects to display on a single page before
# providing a paging element (a "more" link) to paginate results.
API_RESULT_LIMIT = 1000
# If you have external monitoring links, eg:
# EXTERNAL_MONITORING = [
# ['Nagios','http://foo.com'],
# ['Ganglia','http://bar.com'],
# ]
LOGGING = {
'version': 1,
# When set to True this will disable all logging except
# for loggers specified in this configuration dictionary. Note that
# if nothing is specified here and disable_existing_loggers is True,
# django.db.backends will still log unless it is disabled explicitly. 'disable_existing_loggers': False,
'handlers': {
'null': { 'level': 'DEBUG', 'class': 'django.utils.log.NullHandler',
}, 'console': {
# Set the level to "DEBUG" for verbose output logging. 'level': 'INFO', 'class': 'logging.StreamHandler',
},
},
'loggers': {
# Logging from django.db.backends is VERY verbose, send to null
# by default. 'django.db.backends': { 'handlers': ['null'], 'propagate': False,
}, 'horizon': { 'handlers': ['console'], 'propagate': False,
}, 'novaclient': { 'handlers': ['console'], 'propagate': False,
}, 'keystoneclient': { 'handlers': ['console'], 'propagate': False,
}, 'nose.plugins.manager': { 'handlers': ['console'], 'propagate': False,
}
}
}
local_settings.py
import os
from django. utils.translati on import ugettext_lazy as _
DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROD = False
USE_SSL = False
# Note: You should change this value 4219-4117- a81c-b27fff6f5f d9:jiaohuanproj ect' 14a9-4abf- 80cf-2ae59c2ee8 5d' ADMIN_TOKEN = "999888777666" KEYSTONE_ URL = "http:// 59.64.158. 7:5000/ v2.0/" db.backends. mysql', character- set': 'utf8' validator" : {
NOVA_DEFAULT_REGION = 'nova'
NOVA_ACCESS_KEY = 'ed521c26-
NOVA_SECRET_KEY = '60e6c382-
NOVA_ADMIN_USER = 'nova'
NOVA_PROJECT = 'jiaohuanproject'
OPENSTACK_
OPENSTACK_
DATABASES = {
'default': {
'ENGINE': 'django.
'NAME': 'dash',
'USER': 'dash',
'PASSWORD': 'jiaohuan',
'HOST': 'localhost',
'default-
},
}
SWIFT_ENABLED = "true"
# Specify a regular expression to validate user passwords.
# HORIZON_CONFIG = {
# "password_
# "regex": '.*',
# "help_text": _("Your password does not meet the requirements.")
# }
# }
LOCAL_PATH = os.path. dirname( os.path. abspath( __file_ _))
# We recommend you use memcached for development; otherwise after every reload //127.0. 0.1:11211/ '
# of the django development server, you will have to login again. To use
# memcached set CACHE_BACKED to something like 'memcached:
CACHE_BACKEND = 'locmem://'
# Send email to the console by default core.mail. backends. console. EmailBackend' core.mail. backends. dummy.EmailBack end'
EMAIL_BACKEND = 'django.
# Or send them to /dev/null
#EMAIL_BACKEND = 'django.
# Configure these for your outgoing email host company. com'
# EMAIL_HOST = 'smtp.my-
# EMAIL_PORT = 25
# EMAIL_HOST_USER = 'djangomail'
# EMAIL_HOST_PASSWORD = 'top-secret!'
# For multiple regions uncomment this configuration, and add (endpoint, title). cluster1. example. com:5000/ v2.0', 'cluster1'), cluster2. example. com:5000/ v2.0', 'cluster2'),
# AVAILABLE_REGIONS = [
# ('http://
# ('http://
# ]
#OPENSTACK_HOST = "127.0.0.1" KEYSTONE_ URL = "http:// %s:5000/ v2.0" % OPENSTACK_HOST KEYSTONE_ DEFAULT_ ROLE = "Member"
#OPENSTACK_
#OPENSTACK_
# The OPENSTACK_ KEYSTONE_ BACKEND settings can be used to identify the KEYSTONE_ BACKEND = { edit_user' : True
# capabilities of the auth backend for Keystone.
# If Keystone has been configured to use LDAP as the auth backend then set
# can_edit_user to False and name to 'ldap'.
#
# TODO(tres): Remove these once Keystone has an API to identify auth backend.
OPENSTACK_
'name': 'native',
'can_
}
# OPENSTACK_ ENDPOINT_ TYPE specifies the endpoint type to use for the endpoints ENDPOINT_ TYPE = "publicURL"
# in the Keystone service catalog. Use this setting when Horizon is running
# external to the OpenStack environment. The default is 'internalURL'.
#OPENSTACK_
# The number of Swift containers and objects to display on a single page before
# providing a paging element (a "more" link) to paginate results.
API_RESULT_LIMIT = 1000
# If you have external monitoring links, eg: foo.com'], bar.com'],
# EXTERNAL_MONITORING = [
# ['Nagios','http://
# ['Ganglia','http://
# ]
LOGGING = { existing_ loggers is True,
'disable_ existing_ loggers' : False,
'level' : 'DEBUG',
'class' : 'django. utils.log. NullHandler' ,
'console' : {
'level' : 'INFO',
'class' : 'logging. StreamHandler' ,
'django. db.backends' : {
'handlers' : ['null'],
'propagate' : False,
'horizon' : {
'handlers' : ['console'],
'propagate' : False,
'novaclien t': {
'handlers' : ['console'],
'propagate' : False,
'keystonec lient': {
'handlers' : ['console'],
'propagate' : False,
'nose. plugins. manager' : {
'handlers' : ['console'],
'propagate' : False,
'version': 1,
# When set to True this will disable all logging except
# for loggers specified in this configuration dictionary. Note that
# if nothing is specified here and disable_
# django.db.backends will still log unless it is disabled explicitly.
'handlers': {
'null': {
},
# Set the level to "DEBUG" for verbose output logging.
},
},
'loggers': {
# Logging from django.db.backends is VERY verbose, send to null
# by default.
},
},
},
},
}
}
}