Running the tests installs pbr in a way that leaves a .egg directory in
the source tree, so update the ignore file to ignore it.
Change-Id: I7d702c9511992efc518195def0967bc0191d93a9
The dispatcher is now responsible to configure and to get the listener from
the transport.
The server just ask to the dispatcher to build and return a configured
listener for a provider transport.
Partial implements blueprint notification-subscriber-server
Change-Id: I4a6d9620b8239f6d377bc5788b8a90a860b2f02c
This patch allow the fake driver to comsume multiple topics
with one listener.
Partial implements blueprint notification-subscriber-server
Change-Id: Ib52dc181e10b487854fbb398eda9f758232a1251
Currently it is not possible to modify the login method used with
kombu connections via configuration files, and requires modifying
the source code to actually add a login method in the first place.
This adds a configuration option (and default) which are passed
along to the kombu connection.
RabbitMQ allows three login method strings by default, but server
side plugins allow arbitrarily named strings to be used as login
methods and as such it is not possible to provide a fixed list of
options to the user.
DocImpact
Change-Id: I5c62a8dd4125d42bb429d3985061e37a9d519fff
Closes-Bug: #1269890
Replace the use of TestManager with make_test_instance
to get an instance of the type of manager expected.
The old TestManager class is deprecated
Change-Id: I717c0296bf8ae07b1dad8f0045bfe12c8620ad0a
Partial-bug: #1273455
Register a oslo.messaging entry point in the oslo.config.opts namespace
which, when called, returns a list of the configuration options which
may be registered by the library at runtime.
The idea here is that the sample config file generator can query this
and include the returned options in the sample config file of any
applications which use the library.
Some sample code for fetching available options:
import pkg_resources
for ep in pkg_resources.iter_entry_points('oslo.config.opts'):
if ep.name == "oslo.messaging":
list_opts = ep.load()
for g, opts in list_opts():
opts.sort(key=lambda x: x.name)
print "[%s]" % g
for o in opts:
print "%s = %s" % (o.name, o.default)
print
Related-Bug: #1241566
Change-Id: Ic28351258652d2ea38974e2f4d1aa6b1d3dd7192
This change corrects the UnboundLocalError exception that
can occur if something bad happens on reconnect to RabbitMQ
Closes-Bug: #1272271
Change-Id: I9e157810caa7a45e9a61ec571cfe9024fabacf93
In order to transition to a python 3.x compatible world,
lets switch to mox3 which is python 3.x compatible drop-in
replacement of mox.
Change-Id: Iaa22779cd516f842c9f70828f863f90ddae0bab5
Takes a yaml-based config file
(see etc/oslo/routing_notifier.yaml.sample) via
routing_notifier_config option.
Events may be routed by priority or event_type.
Implements: blueprint configurable-notification
Change-Id: I437dfac348f387044e6da3d6a0bbb208323c1741
The set_time_override function in timeutils was written as a
helper function to mock utcnow for unittests before 'mock' was
generally used. Now that we have mock and fixture, we no longer
need to use it.
Change-Id: I9a0727edab12ccd5f1e4eb4f5f62d588f5a0faee
Partial-Bug: #1266962
* Get the current line at runtime, don't hardcode the line number
* Only strip last character of the filename if it ends with ".pyc"
or ".pyo". On Python 3, import automatically replaces .pyc and
.pyo with .py.
* Use threading.current_thread().ident to get the identifier of the
current thread. The get_ident() function is available in thread
module in Python 2, but in threading module in Python 3. And on
Python 3, logging.thread symbol does not exist anymore.
Change-Id: I3f248bb860caafaf38eefcf440d36b9bebc8f05e
basestring does not exist anymore in Python 3: use six.string_types instead.
In "try: .../except Exception as err: ...", err is a local variable, it does no
more exist after the except block. Copy the exception in a new cls_error
variable to fix Python 3 support.
Extract of Python 3 documentation: "When an exception has been assigned using
as target, it is cleared at the end of the except clause. (...) Exceptions are
cleared because with the traceback attached to them, they form a reference
cycle with the stack frame, keeping all locals in that frame alive until the
next garbage collection occurs."
http://docs.python.org/3.3/reference/compound_stmts.html#try
Change-Id: I2efb14b3838f78d1ed5e09b3ccd4e796a3448aee
Manually applied ef406a21782134aeefb944f74b3f1a47d6169318 from
oslo-incubator to get the fix required for bug 1257293.
Copying the original commit message from oslo-incubator below.
"""
When multiple RPC servers (consumers) are subscribed to the same RPC
topic, a single RPC request to that topic should be received by only
one of the consumers. A bug in the QPID driver caused every consumer
to receive a copy of the RPC request. This bug affects only Topology
version 2. This patch will cause a single queue to be created for
each topic, and shared among all consumers of that topic. This
results in each RPC request being received by only one consumer,
in turn across all the competing consumers.
"""
Change-Id: I76bfa5b48bad4a70fbf06b74f4cc8234af6610c2
Closes-bug: #1257293.
dict.iteritems() was replaced with dict.items() in Python 3. Use the
six.iteritems() function to get code compatible with Python 2 and Python 3.
Change-Id: I0c8ecc3ae540ffaf4c6b159e09ca16ccf365973d
Because driver should rely on executor and not directly on eventlet,
delete eventlet/greenlet related code.
qpid/rabbit part.
Change-Id: I20a0850d54b6c6f81957beabb12f7d67f0c1e741
"except (IOError, errors):" fails with a TypeError if errors is a tuple on
Python 3, whereas it was accepted in Python 2.
Change-Id: I65cfb60af87e76fdf2d37043fb106adbd4586fb9
Builtin exceptions are now in the builtins module, the exceptions module has
been removed.
Fix also the unit test for tracebacks, Unicode representation doesn't start
with "u" prefix anymore (u'...').
Change-Id: I422be457e23066699950c9a3999878ecf65f1b3f
With the routing notifier we can now issue high-frequency notifications
and not worry about clogging up the queue. The Sample priority will
be used for this situation.
Change-Id: Ia4aa77b7aa4ca9458e97ca3ed81101d92934b691
Update to get jsonutils compatible with Python 3.
The babel Python module is now required by gettextutils, and gettextutils is
imported by excutils.
Change-Id: Ifa6d6b29e2af58dfcfda1ab7efdb2f32cf9de655
Because driver should rely on executor and not directly on eventlet,
delete eventlet related code. This also drop the old driver API.
This is the amqp part.
Change-Id: Ic6060058dafa4dabbc5e8c68bf231c818a7fec25