Commit Graph

7 Commits

Author SHA1 Message Date
Gevorg Davoian
cf0c18a214 Remove nonexistent functions from documentation
This patch cleans up the documentation by removing some functions
which don't exist anymore and cause sphinx warnings. The patch also
adds pika_driver to index.rst.

Change-Id: I23908089ef6ad1f05c78521c2eea3a0a3276eb2a
Closes-Bug: #1639171
2016-11-04 14:54:37 +02:00
Kenneth Giusti
9bc9c0dc6a Fixups to the inline documentation
Rework the inline documentation for executors, RPC servers and
clients, notifiers and notification listeners for clarity and flow.

Change-Id: If4f1db853a7fc85340177fd2c9c43a479d72459d
2016-09-12 09:49:00 -04:00
Paul Vinciguerra
d3a8f280eb Allow dispatcher to restrict endpoint methods.
Implements access_policy for dispatcher to restrict endpoint methods.

Implements the following access policies:
* LegacyRPCAccessPolicy
* DefaultRPCAccessPolicy
* ExplicitRPCAccessPolicy

* Implement decorator @rpc.expose for use with the
 ExplicitRPCAccessPolicy

* Modify get_rpc_server to allow optional access_policy argument
* Set default access_policy to LegacyRPCAccessPolicy (Nova exposes
 _associate_floating_ip in tempest tests). Added debtcollector
 notification.
* Add test cases for access_policy=None
* Clarify documentation

Change-Id: I42239e6c8a8be158ddf5c3b1773463b7dc93e881
Closes-Bug: 1194279
Closes-Bug: 1555845
2016-08-30 20:32:35 -04: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
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
f6df32d943 Add API for expected endpoint exceptions
Review I4e7b19dc730342091fd70a717065741d56da4555 gives a lot of the
background here, but the idea is that some exceptions raised by an RPC
endpoint method do not indicate any sort of failure and should not be
logged by the server as an error.

The classic example of this is conductor's instance_get() method raising
InstanceNotFound. This is perfectly normal and should not be considered
an error.

The new API is a decorator which you can use with RPC endpoints methods
to indicate which exceptions are expected:

    @messaging.expected_exceptions(InstanceNotFound)
    def instance_get(self, context, instance_id):
        ...

but we also need to expose the ExpectedException type itself so that
direct "local" users of the endpoint class know what type will be used
to wrap expected exceptions. For example, Nova has an ExceptionHelper
class which unwraps the original exception from an ExpectedException and
re-raises it.

I've changed from client_exceptions() and ClientException to make it
more clear it's intent. I felt that the "client" naming gave the
impression it was intended for use on the client side.

Change-Id: Ieec4600bd6b70cf31ac7925a98a517b84acada4d
2013-08-07 12:52:54 +01:00
Mark McLoughlin
837aa03c43 Include docstrings in published docs
Change-Id: Icdfb0535b26162d39c3af683b7729b5e834d89b9
2013-07-10 09:33:13 +01:00