blazar/climate/manager/__init__.py
Dina Belova 34778799f4 Port to oslo.messaging
* Remove openstack.common.rpc module and implement oslo.messaging
usage instead of that.
* Remove openstack.common.notifier (except api) as it is part of
oslo.messaging now.
* Remove zmq_receiver as a part of oslo.messaging too.

Implements: blueprint oslo-messaging
Change-Id: I4855826b2435b96bcf22ada239d17fa6d0837184
2014-02-13 08:55:51 +04:00

36 lines
1.1 KiB
Python

# Copyright (c) 2013 Mirantis Inc.
#
# 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.
from oslo.config import cfg
from oslo import messaging
opts = [
cfg.StrOpt('rpc_topic',
default='climate.manager',
help='The topic Climate uses for climate-manager messages.'),
]
CONF = cfg.CONF
CONF.register_opts(opts, 'manager')
CONF.import_opt('host', 'climate.config')
RPC_API_VERSION = '1.0'
def get_target():
return messaging.Target(topic=CONF.manager.rpc_topic,
version=RPC_API_VERSION,
server=CONF.host,
namespace='manager.api')