app.py
API_SERVICE_OPTS = [
cfg.IntOpt('port',
default=9511,
help='The port for the magnum API server'),
cfg.StrOpt('host',
default='127.0.0.1',
help='The listen IP for the magnum API server'),
cfg.IntOpt('max_limit',
default=1000,
help='The maximum number of items returned in a single '
'response from a collection resource.')
]def setup_app(config=None):
if not config:
config = get_pecan_config()
app_conf = dict(config.app)
app = pecan.make_app(
app_conf.pop('root'),
logging=getattr(config, 'logging', {}),
wrap_app=middleware.ParsableErrorMiddleware,
**app_conf
)
return auth.install(app, CONF, config.app.acl_public_routes)Last updated