3aca3f7745
Now that all preparations are done, actually port the code to use oslo.messaging. This patch does as little as possible. Follow up patches that refactor and cleanup the code and configuration files, will be merged later. The reason for this is to make the patch as slim as possible, to make review process more smooth and concentrated. Details: * neutron/common/rpc.py: - added init() and cleanup() to set global RPC layer state. - added utility functions: get_server(), get_client(), get_notifier() that wrap up oslo.messaging API a bit, enforcing eventlet executor and setting serializer, among other things. - removed PluginRpcDispatcher, instead introduced PluginRpcSerializer to use as a default serializer for API callbacks. * neutron/common/rpc_compat.py: - emulated incubator RPC layer behaviour thru previously introduced stub classes (RpcCallback, RpcProxy, ...) using new oslo.messaging API. - switched to using new oslo.messaging exception types. * neutron/service.py: - expect multiple RPC listeners that are of MessageHandlingServer type, not GreenThread. * neutron/common/config.py: - initialize RPC layer in init() * setup.cfg: - added entry points for old notifier drivers to retain backward compatibility. * neutron/tests/...: - introduced fake_notifier to replace impl_fake. - faked out consume_in_thread() to avoid starting RPC listeners when running unit tests. - used 'fake' transport driver. - made sure neutron.test.* exceptions are caught. - initialize and clean up RPC layer for each test case. * Ported all affected code from using neutron.openstack.common.notifier API to oslo.messaging.Notifier. * rpc.set_defaults() was renamed to rpc.set_transport_defaults() * other changes not worth mentioning here. blueprint oslo-messaging DocImpact Change-Id: I5a91c34df6e300f2dc46217b1b16352fcc3039fc |
||
---|---|---|
.. | ||
rpc | ||
v2 | ||
views | ||
__init__.py | ||
api_common.py | ||
extensions.py | ||
versions.py |