ranger/orm/services/image_manager/config.py
Nicholas Jones 7667a7b9af Fix pep8 errors
Fixes existing pep8 errors and reenables the corresponding tox rules

Change-Id: I4168a90c40173e4c35c9d75030cd592ace657508
2017-08-07 15:46:47 -05:00

122 lines
3.5 KiB
Python
Executable File

from ims.hooks.service_hooks import TransIdHook
from orm_common.hooks.api_error_hook import APIErrorHook
from orm_common.hooks.security_headers_hook import SecurityHeadersHook
global TransIdHook
global APIErrorHook
global SecurityHeadersHook
# Server Specific Configurations
server = {
'port': '8084',
'host': '0.0.0.0',
'name': 'ims'
}
# Pecan Application Configurations
app = {
'root': 'ims.controllers.root.RootController',
'modules': ['ims'],
'static_root': '%(confdir)s/public',
'template_path': '%(confdir)s/ims/templates',
'debug': True,
'errors': {
'__force_dict__': True
},
'hooks': lambda: [TransIdHook(), APIErrorHook(), SecurityHeadersHook()]
}
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'ims': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'audit_client': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'pecan': {'level': 'DEBUG', 'handlers': ['console'],
'propagate': False},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,
'filename': '/opt/app/orm/ims/ims.log',
'formatter': 'simple'
}
},
'formatters': {
'simple': {
'format': ('%(asctime)s %(levelname)-5.5s [%(name)s]'
'[%(threadName)s] %(message)s')
},
'color': {
'()': 'pecan.log.ColorFormatter',
'format': ('%(asctime)s [%(padded_color_levelname)s] [%(name)s]'
'[%(threadName)s] %(message)s'),
'__force_dict__': True
}
}
}
database = {
'host': 'localhost',
'username': 'root',
'password': 'stack',
'db_name': 'orm_ims_db',
}
verify = False
database['connection_string'] = 'mysql://{0}:{1}@{2}:3306/{3}'.format(database['username'],
database['password'],
database['host'],
database['db_name'])
application_root = 'http://localhost:{0}'.format(server['port'])
api = {
'uuid_server': {
'base': 'http://127.0.0.1:8090/',
'uuids': 'v1/uuids'
},
'rds_server': {
'base': 'http://127.0.0.1:8777/',
'resources': 'v1/rds/resources',
'status': 'v1/rds/status/resource/'
},
'rms_server': {
'base': 'http://127.0.0.1:8080/',
'groups': 'v2/orm/groups',
'regions': 'v2/orm/regions',
'cache_seconds': 60
},
'audit_server': {
'base': 'http://127.0.0.1:8776/',
'trans': 'v1/audit/transaction'
}
}
authentication = {
"enabled": True,
"mech_id": "admin",
"mech_pass": "stack",
"rms_url": "http://127.0.0.1:8080",
"tenant_name": "admin",
"token_role": "admin",
"keystone_version": "2.0",
"policy_file": "ims/etc/policy.json"
}