23 lines
493 B
Python
Executable File
23 lines
493 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
|
|
from kwapi.plugins.api import app
|
|
from kwapi.openstack.common import cfg, log
|
|
|
|
app_opts = [
|
|
cfg.IntOpt('api_port',
|
|
required=True,
|
|
),
|
|
]
|
|
|
|
cfg.CONF.register_opts(app_opts)
|
|
|
|
if __name__ == '__main__':
|
|
cfg.CONF(sys.argv[1:], project='kwapi', default_config_files=['/etc/kwapi/api.conf'])
|
|
log.setup('kwapi')
|
|
|
|
root = app.make_app()
|
|
root.run(host='0.0.0.0', port=cfg.CONF.api_port)
|