diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-02-14 18:12:41 -0500 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-02-14 18:14:15 -0500 |
commit | 6ae709c2689de603490e019ded7c4e4048d8654d (patch) | |
tree | f190247672866ecd45ffbd7e8a1b330e1c18843c /bin | |
parent | bc1bd84b916166d4f5df3636ced759e567a98f55 (diff) | |
download | ceilometer-6ae709c2689de603490e019ded7c4e4048d8654d.tar.gz |
Update openstack.common
This update brings in the new join_consumer_pool()
method of the message bus connection class.
Change-Id: Ie5b9bf93c9aaf8f4f85b47b2394969741ba5fef4
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ceilometer-rpc-zmq-receiver | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/bin/ceilometer-rpc-zmq-receiver b/bin/ceilometer-rpc-zmq-receiver new file mode 100755 index 00000000..41a9307a --- /dev/null +++ b/bin/ceilometer-rpc-zmq-receiver @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2011 OpenStack LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import eventlet +eventlet.monkey_patch() + +import contextlib +import os +import sys + +# If ../ceilometer/__init__.py exists, add ../ to Python search path, so that +# it will override what happens to be installed in /usr/(local/)lib/python... +POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), + os.pardir, + os.pardir)) +if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'ceilometer', '__init__.py')): + sys.path.insert(0, POSSIBLE_TOPDIR) + +from ceilometer.openstack.common import cfg +from ceilometer.openstack.common import log as logging +from ceilometer.openstack.common import rpc +from ceilometer.openstack.common.rpc import impl_zmq + +CONF = cfg.CONF +CONF.register_opts(rpc.rpc_opts) +CONF.register_opts(impl_zmq.zmq_opts) +CONF(sys.argv[1:], project='ceilometer') + + +def main(): + logging.setup("ceilometer") + + with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor: + reactor.consume_in_thread() + reactor.wait() + +if __name__ == '__main__': + main() |