diff options
author | Zed Shaw <zedshaw@zedshaw.com> | 2011-07-29 12:08:59 -0700 |
---|---|---|
committer | Zed Shaw <zedshaw@zedshaw.com> | 2011-07-29 12:08:59 -0700 |
commit | 87f021f73c01806bc1c22106e3a169d60024104f (patch) | |
tree | d4833950d974e18d2d2529d391a191af8c996cb0 /nova/rpc.py | |
parent | 14b5036d01cdfecd650755345589424969b675ff (diff) | |
download | nova-87f021f73c01806bc1c22106e3a169d60024104f.tar.gz |
Reorganize the code to satisfy review comments.
Diffstat (limited to 'nova/rpc.py')
-rw-r--r-- | nova/rpc.py | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/nova/rpc.py b/nova/rpc.py deleted file mode 100644 index f5dd499822..0000000000 --- a/nova/rpc.py +++ /dev/null @@ -1,66 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# 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 nova.utils import import_object -from nova.rpc_backends.common import RemoteError, LOG -from nova import flags - -FLAGS = flags.FLAGS -flags.DEFINE_string('rpc_backend', - 'nova.rpc_backends.amqp', - "The messaging module to use, defaults to AMQP.") - -RPCIMPL = import_object(FLAGS.rpc_backend) - - -def create_connection(new=True): - return RPCIMPL.Connection.instance(new=True) - - -def create_consumer(conn, topic, proxy, fanout=False): - if fanout: - return RPCIMPL.FanoutAdapterConsumer( - connection=conn, - topic=topic, - proxy=proxy) - else: - return RPCIMPL.TopicAdapterConsumer( - connection=conn, - topic=topic, - proxy=proxy) - - -def create_consumer_set(conn, consumers): - return RPCIMPL.ConsumerSet(connection=conn, consumer_list=consumers) - - -def call(context, topic, msg): - return RPCIMPL.call(context, topic, msg) - - -def cast(context, topic, msg): - return RPCIMPL.cast(context, topic, msg) - - -def fanout_cast(context, topic, msg): - return RPCIMPL.fanout_cast(context, topic, msg) - - -def multicall(context, topic, msg): - return RPCIMPL.multicall(context, topic, msg) |