Commit Graph

9 Commits

Author SHA1 Message Date
Doug Hellmann 03265410e0 Remove oslo namespace package
Blueprint remove-namespace-packages

Depends-on: I2eeef93ee2e61a721c69f62add819f93f62f077d
for openstack/ceilometer
Depends-on: I26390dd908769be5f1a5b70be22d3b98e3a45563
for openstack/ceilometermiddleware
Depends-on: Ifa8baab33cdb3e606cf175a8c29c3a4ef6c44480
for openstack/glance
Depends-on: I029c3260051aa48cfaae428c096c1ac7b43b2bd2
for openstack/ceilometermiddleware

Change-Id: I8c5595bbafa82db33f62fa47d214f5cb756a2639
2015-07-16 17:47:16 +00:00
Doug Hellmann e55a83e832 Move files out of the namespace package
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7
2015-01-12 12:50:41 -05:00
Mark McLoughlin a2f99ad35e Remove ConfFixture from toplevel public API
There's no need to make the fixtures, testtools, etc. libraries a
runtime requirement, so let's move it from the toplevel oslo.messaging
API so you need to explicitly import it.

Change-Id: I9e2f32a898d78489f2d8d9c218c81f35cda14e34
2013-08-17 17:49:23 +01:00
Mark McLoughlin fbe3192d9a Add a unit testing configuration fixture
The configuration options registered by oslo.messaging should not be
directly relied upon by users of the library, since those config option
names could change in future.

Add an API which allows API users to override specific configuration
options e.g.

    self.messaging_conf = self.useFixture(messaging.ConfFixture(cfg.CONF))
    self.messaging_conf.transport_driver = 'fake'

Change-Id: If0d837e1b86e3b04237fde522551cfb81505a543
2013-08-13 13:52:42 +01:00
Mark McLoughlin f1612f2895 Add thread-local store of request context
Oslo's logging code has some useful support for including bits of the
request context in log messages. While this isn't exclusively about the
request context in a dispatching RPC method, it seems useful for
oslo.messaging to support the concept for at least this use case simply
by recording the context in a thread local store before dispatching an
endpoint method and immediately clearing it when the method returns.

Note, we don't need to store weak refs in our store because we will
clear the reference in all cases rather than ever leaving a stale
reference around in the store.

Change-Id: I70ac06ed3a2a891a7a7b388b1823a0f3b08f2dd1
2013-08-09 11:21:27 +01:00
Mark McLoughlin eb94be8834 Make Notifier public at top-level 2013-06-24 12:52:56 +01:00
Mark McLoughlin 03aafcb49c Simplify public symbol exports
Inspired by tulip, have every module define a __all__ list and import *
from the top-level module.

Rename transport.set_defaults() since we don't want this to be a
top-level set_defaults() function as there may be multiple.

Also, rather than configuring flake8 to allow star imports, just exclude
the __init__.py files from flake8 checks.
2013-06-24 12:52:30 +01:00
Mark McLoughlin 1ab3b83f43 Don't raise a driver-specific error on send
Similar to doing listen() on the server side, if the driver throws an
exception when we do a cast() or call() we should translate it into
a transport-agnostic exception.
2013-06-15 19:24:32 +01:00
Mark McLoughlin cbfb1452a4 Move files to new locations for oslo.messaging 2013-06-15 08:43:54 +01:00