# Copyright (c) 2017 Wind River Systems, Inc.
+# Copyright (c) 2017-2018 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
import os
import sys
-import redisco
-
-from multivimbroker.pub.config.config import REDIS_HOST, REDIS_PORT, REDIS_PASSWD
-from multivimbroker.pub.config.config import DB_NAME, DB_IP, DB_USER, DB_PASSWD, DB_PORT
-
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': DB_NAME,
- 'HOST': DB_IP,
- 'PORT': DB_PORT,
- 'USER': DB_USER,
- 'PASSWORD': DB_PASSWD,
- },
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+ }
}
-redisco.connection_setup(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWD, db=0)
-# CACHE_BACKEND = 'redis_cache.cache://%s@%s:%s' % (REDIS_PASSWD, REDIS_HOST, REDIS_PORT)
+# CACHE_BACKEND = 'redis_cache.cache://%s@%s:%s' %
+# (REDIS_PASSWD, REDIS_HOST, REDIS_PORT)
TIME_ZONE = 'UTC'
'disable_existing_loggers': True,
'formatters': {
'standard': {
- 'format': '%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s',
+ 'format': '%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] \
+ [%(levelname)s]:%(message)s',
},
},
'filters': {
'multivimbroker_handler': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
- 'filename': os.path.join(BASE_DIR, 'logs/runtime_multivimbroker.log'),
+ 'filename': os.path.join(BASE_DIR,
+ 'logs/runtime_multivimbroker.log'),
'formatter': 'standard',
'maxBytes': 1024 * 1024 * 50,
'backupCount': 5,