Add bin/ceilometer-api for convenience
This is a bit more obvious than running the module. I have basically just moved api/__main__.py into bin/ceilometer-api. Change-Id: I50d614ea98b278563b576e0b3b9df03b391e2152 Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
4b8a56f89a
commit
731d3fce5e
10
ceilometer/api/__main__.py → bin/ceilometer-api
Normal file → Executable file
10
ceilometer/api/__main__.py → bin/ceilometer-api
Normal file → Executable file
@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
||||||
@ -17,11 +18,16 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
"""Set up the development API server.
|
"""Set up the development API server.
|
||||||
"""
|
"""
|
||||||
|
import sys
|
||||||
|
|
||||||
from ceilometer.api.app import app
|
from ceilometer.api.app import app
|
||||||
from ceilometer.openstack.common import cfg
|
from ceilometer.openstack.common import cfg
|
||||||
|
from ceilometer.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
cfg.CONF()
|
cfg.CONF(sys.argv[1:])
|
||||||
app.debug = True
|
logging.setup('ceilometer.api')
|
||||||
|
if cfg.CONF.verbose or cfg.CONF.debug:
|
||||||
|
app.debug = True
|
||||||
app.run(host='0.0.0.0', port=cfg.CONF.metering_api_port)
|
app.run(host='0.0.0.0', port=cfg.CONF.metering_api_port)
|
@ -61,15 +61,12 @@ ceilometer::
|
|||||||
Running the API Server
|
Running the API Server
|
||||||
======================
|
======================
|
||||||
|
|
||||||
There is not currently a wrapper script for the ceilometer API server,
|
|
||||||
so it must be started manually.
|
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
double: installing; API
|
double: installing; API
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ python -m ceilometer.api
|
$ ceilometer-api
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
1
setup.py
1
setup.py
@ -34,6 +34,7 @@ setuptools.setup(
|
|||||||
setup_requires=['setuptools-git>=0.4'],
|
setup_requires=['setuptools-git>=0.4'],
|
||||||
scripts=['bin/ceilometer-agent-compute',
|
scripts=['bin/ceilometer-agent-compute',
|
||||||
'bin/ceilometer-agent-central',
|
'bin/ceilometer-agent-central',
|
||||||
|
'bin/ceilometer-api',
|
||||||
'bin/ceilometer-collector'],
|
'bin/ceilometer-collector'],
|
||||||
py_modules=[],
|
py_modules=[],
|
||||||
entry_points=textwrap.dedent("""
|
entry_points=textwrap.dedent("""
|
||||||
|
2
tox.ini
2
tox.ini
@ -18,7 +18,7 @@ commands = {toxinidir}/run_tests.sh --no-path-adjustment --with-coverage --cover
|
|||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = pep8==1.1
|
deps = pep8==1.1
|
||||||
commands = pep8 --repeat --show-source ceilometer setup.py bin/ceilometer-agent-central bin/ceilometer-agent-compute bin/ceilometer-collector
|
commands = pep8 --repeat --show-source ceilometer setup.py bin/ceilometer-agent-central bin/ceilometer-agent-compute bin/ceilometer-collector bin/ceilometer-api
|
||||||
|
|
||||||
[testenv:py26-essex]
|
[testenv:py26-essex]
|
||||||
deps = -r{toxinidir}/tools/pip-requires_essex
|
deps = -r{toxinidir}/tools/pip-requires_essex
|
||||||
|
Loading…
Reference in New Issue
Block a user