Make driver and transport methods public
The methods of the driver and transport should be public, since they are used outside of those classes. Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This commit is contained in:
parent
3a910e8f72
commit
c7e204279b
openstack/common/messaging
@ -47,11 +47,11 @@ class BaseDriver(object):
|
||||
self._default_exchange = _default_exchange
|
||||
|
||||
@abc.abstractmethod
|
||||
def _send(self, target, message, wait_for_reply=None, timeout=None):
|
||||
def send(self, target, message, wait_for_reply=None, timeout=None):
|
||||
"""Send a message to the given target."""
|
||||
return None
|
||||
|
||||
@abc.abstractmethod
|
||||
def _listen(self, target):
|
||||
def listen(self, target):
|
||||
"""Construct a Listener for the given target."""
|
||||
return None
|
||||
|
@ -56,7 +56,7 @@ class _CallContext(object):
|
||||
|
||||
def cast(self, method, **kwargs):
|
||||
msg = self._make_message(method, kwargs)
|
||||
self.transport._send(target, msg)
|
||||
self.transport.send(target, msg)
|
||||
|
||||
def _check_for_lock():
|
||||
if not self.conf.debug:
|
||||
|
@ -53,12 +53,12 @@ class Transport(object):
|
||||
self._driver = driver
|
||||
|
||||
def send(self, target, message, wait_for_reply=None, timeout=None):
|
||||
return self._driver._send(target, message,
|
||||
wait_for_reply=wait_for_reply,
|
||||
timeout=timeout)
|
||||
return self._driver.send(target, message,
|
||||
wait_for_reply=wait_for_reply,
|
||||
timeout=timeout)
|
||||
|
||||
def listen(self, target):
|
||||
return self._driver._listen(target)
|
||||
return self._driver.listen(target)
|
||||
|
||||
|
||||
def get_transport(conf, url=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user