oslo.messaging/oslo/messaging/_drivers
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
..
__init__.py Move files to new locations for oslo.messaging 2013-06-15 08:43:54 +01:00
amqp.py Pop _unique_id when checking for duplicates 2013-08-02 06:48:01 +01:00
amqpdriver.py Add API for expected endpoint exceptions 2013-08-07 12:52:54 +01:00
base.py Add API for expected endpoint exceptions 2013-08-07 12:52:54 +01:00
common.py Add exception serialization tests 2013-07-26 06:55:15 +01:00
impl_fake.py Add API for expected endpoint exceptions 2013-08-07 12:52:54 +01:00
impl_qpid.py Implement wait_for_reply timeout in rabbit driver 2013-08-07 06:51:03 +01:00
impl_rabbit.py Implement wait_for_reply timeout in rabbit driver 2013-08-07 06:51:03 +01:00
pool.py Remove only_free param to Pool.get() 2013-07-27 15:43:29 +01:00