summaryrefslogtreecommitdiff
path: root/oslo_messaging/rpc/client.py
diff options
context:
space:
mode:
authorAndrew Smith <ansmith@redhat.com>2017-04-06 09:47:34 -0400
committerAndrew Smith <ansmith@redhat.com>2017-05-12 12:30:41 -0400
commitec4d6639bc7556afaf439d261b716818b02a1605 (patch)
tree88a677dc6f04fab27c0079c073147469bb89ebe7 /oslo_messaging/rpc/client.py
parente569c92cd9d17c907ecc35e24c50c49717844bde (diff)
downloadoslo-messaging-ec4d6639bc7556afaf439d261b716818b02a1605.tar.gz
Add get_rpc_transport call
The get_rpc_transport wraps get_transport to unify the API in anticipation of comprehensive separation of RPC and Notification messaging backends. Related-Bug: 1680192 Change-Id: Ic6af07b98ff43806c2af38a3ba129991f1e0ec86
Diffstat (limited to 'oslo_messaging/rpc/client.py')
-rw-r--r--oslo_messaging/rpc/client.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/oslo_messaging/rpc/client.py b/oslo_messaging/rpc/client.py
index b746fbe..2a27a9f 100644
--- a/oslo_messaging/rpc/client.py
+++ b/oslo_messaging/rpc/client.py
@@ -282,7 +282,7 @@ class RPCClient(_BaseCallContext):
However, this class can be used directly without wrapping it another class.
For example::
- transport = messaging.get_transport(cfg.CONF)
+ transport = messaging.get_rpc_transport(cfg.CONF)
target = messaging.Target(topic='test', version='2.0')
client = messaging.RPCClient(transport, target)
client.call(ctxt, 'test', arg=arg)
@@ -440,12 +440,12 @@ class RPCClient(_BaseCallContext):
method are handled are quite subtle.
Firstly, if the remote exception is contained in one of the modules
- listed in the allow_remote_exmods messaging.get_transport() parameter,
- then it this exception will be re-raised by call(). However, such
- locally re-raised remote exceptions are distinguishable from the same
- exception type raised locally because re-raised remote exceptions are
- modified such that their class name ends with the '_Remote' suffix so
- you may do::
+ listed in the allow_remote_exmods messaging.get_rpc_transport()
+ parameter, then it this exception will be re-raised by call(). However,
+ such locally re-raised remote exceptions are distinguishable from the
+ same exception type raised locally because re-raised remote exceptions
+ are modified such that their class name ends with the '_Remote' suffix
+ so you may do::
if ex.__class__.__name__.endswith('_Remote'):
# Some special case for locally re-raised remote exceptions