~ubuntu-branches/ubuntu/utopic/oslo.messaging/utopic

« back to all changes in this revision

Viewing changes to oslo/messaging/transport.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-03-27 13:01:34 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20140327130134-va1pxzs253r43n15
Tags: 1.3.0~a9-0ubuntu1
* New upstream release (LP: #1298970)
* debian/control:
  - Add python-oslotest as a build dependency.
  - Use python-oslosphinx instead of python-oslo.sphinx

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        self.conf = driver.conf
79
79
        self._driver = driver
80
80
 
 
81
    def _require_driver_features(self, requeue=False):
 
82
        self._driver.require_features(requeue=requeue)
 
83
 
81
84
    def _send(self, target, ctxt, message, wait_for_reply=None, timeout=None):
82
85
        if not target.topic:
83
86
            raise exceptions.InvalidTarget('A topic is required to send',
99
102
                                           target)
100
103
        return self._driver.listen(target)
101
104
 
 
105
    def _listen_for_notifications(self, targets_and_priorities):
 
106
        for target, priority in targets_and_priorities:
 
107
            if not target.topic:
 
108
                raise exceptions.InvalidTarget('A target must have '
 
109
                                               'topic specified',
 
110
                                               target)
 
111
        return self._driver.listen_for_notifications(targets_and_priorities)
 
112
 
102
113
    def cleanup(self):
103
114
        """Release all resources associated with this transport."""
104
115
        self._driver.cleanup()