jh629g 5eb91bd5d5 Add Domain name to ranger region
Refactor ranger to allow domain
for resource deployment to be
defined in create region api call,
rather than only being retrieved
from ranger configuration.

Change-Id: I1b481c49d4402438c8aa91a8ebd8b6dbe797997b
2020-02-13 19:14:32 +00:00

84 lines
1.9 KiB
Python
Executable File

import orm.base_config as config
from orm.common.orm_common.hooks.api_error_hook import APIErrorHook
from orm.common.orm_common.hooks.security_headers_hook import SecurityHeadersHook
from orm.common.orm_common.hooks.transaction_id_hook import TransactionIdHook
global TransactionIdHook
global APIErrorHook
global SecurityHeadersHook
# Server Specific Configurations
server = {
'port': config.rms['port'],
'host': config.orm_host,
'name': 'rms'
}
rds = {
'customer_domain': config.rds['customer_domain']
}
# Pecan Application Configurations
app = {
'root': 'orm.services.region_manager.rms.controllers.root.RootController',
'modules': ['orm.services.region_manager.rms'],
'debug': config.pecan_debug,
'hooks': lambda: [TransactionIdHook(), APIErrorHook(), SecurityHeadersHook()]
}
app_module = app['modules'][0]
logging = config.get_log_config(config.rms['log'], server['name'], app_module)
# user input validations
region_options = {
'allowed_status_values': [
'functional',
'maintenance',
'down',
'building'
],
'endpoints_types_must_have': [
'dashboard',
'identity',
'ord'
]
}
# DB configurations
database = {
'url': config.db_connect,
'max_retries': 3,
'retries_interval': 10
}
endpoints = {
'lcp': config.rms['base_url'] + 'lcp'
}
verify = config.ssl_verify
authentication = config.server_request_auth(server['name'])
api = {
'uuid_server': {
'base': config.uuid['base_url'],
'uuids': 'v1/uuids'
},
'audit_server': {
'base': config.audit_server['base_url'],
'trans': 'v1/audit/transaction'
},
'fms_server': {
'base': config.fms['base_url'],
'flavors': 'v1/orm/flavors'
},
'cms_server': {
'base': config.cms['base_url'],
'customers': 'v1/orm/customers'
},
'ims_server': {
'base': config.ims['base_url'],
'images': 'v1/orm/images'
}
}