]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Port to oslo.messaging
authorFlavio Percoco <flaper87@gmail.com>
Fri, 7 Feb 2014 11:20:44 +0000 (12:20 +0100)
committerFlavio Percoco <flaper87@gmail.com>
Mon, 10 Mar 2014 16:03:03 +0000 (17:03 +0100)
commitbcd9f363ff8a10ff30795c54f471a8c6d76450fe
treeab8d7602a9f35a5a47a722c8e5d2324b0a4243ad
parent174be8249b81d08cb28dd515081d259d57d1a497
Port to oslo.messaging

The oslo.messaging library takes the existing RPC code from oslo and
wraps it in a sane API with well defined semantics around which we can
make a commitment to retain compatibility in future.

The patch is large, but the changes can be summarized as:

    * oslo.messaging>=1.3.0a4 is required; a proper 1.3.0 release will be
    pushed before the icehouse release candidates.

    * The new rpc module has init() and cleanup() methods which manage the
    global oslo.messaging transport state. The TRANSPORT and NOTIFIER
    globals are conceptually similar to the current RPCIMPL global,
    except we're free to create and use alternate Transport objects
    in e.g. the cells code.

    * The rpc.get_{client,server,notifier}() methods are just helpers
    which wrap the global messaging state, specifiy serializers and
    specify the use of the eventlet executor.

    * In oslo.messaging, a request context is expected to be a dict so
    we add a RequestContextSerializer which can serialize to and from
    dicts using RequestContext.{to,from}_dict()

    * The allowed_rpc_exception_modules configuration option is replaced
    by an allowed_remote_exmods get_transport() parameter. This is not
    something that users ever need to configure, but it is something
    each project using oslo.messaging needs to be able to customize.

    * We maintain a global NOTIFIER object and create specializations of
    it with specific publisher IDs in order to avoid notification driver
    loading overhead.

    * rpc.py contains transport aliases for backwards compatibility
    purposes. setup.cfg also contains notification driver aliases for
    backwards compat.

    * The messaging options are moved about in cinder.conf.sample because
    the options are advertised via a oslo.config.opts entry point and
    picked up by the generator.

    * We use messaging.ConfFixture in tests to override oslo.messaging
    config options, rather than making assumptions about the options
    registered by the library.

Implements blueprint: oslo-messaging

Change-Id: Ib912809428d92e788558439e2d85b51272ebefdd
68 files changed:
bin/cinder-api
bin/cinder-manage
cinder/api/contrib/admin_actions.py
cinder/api/contrib/qos_specs_manage.py
cinder/api/contrib/types_extra_specs.py
cinder/api/contrib/types_manage.py
cinder/api/contrib/volume_actions.py
cinder/api/contrib/volume_type_encryption.py
cinder/backup/manager.py
cinder/backup/rpcapi.py
cinder/manager.py
cinder/openstack/common/log_handler.py
cinder/openstack/common/notifier/__init__.py [deleted file]
cinder/openstack/common/notifier/api.py [deleted file]
cinder/openstack/common/notifier/log_notifier.py [deleted file]
cinder/openstack/common/notifier/no_op_notifier.py [deleted file]
cinder/openstack/common/notifier/proxy.py [deleted file]
cinder/openstack/common/notifier/rpc_notifier.py [deleted file]
cinder/openstack/common/notifier/rpc_notifier2.py [deleted file]
cinder/openstack/common/notifier/test_notifier.py [deleted file]
cinder/openstack/common/rpc/__init__.py [deleted file]
cinder/openstack/common/rpc/amqp.py [deleted file]
cinder/openstack/common/rpc/common.py [deleted file]
cinder/openstack/common/rpc/dispatcher.py [deleted file]
cinder/openstack/common/rpc/impl_fake.py [deleted file]
cinder/openstack/common/rpc/impl_kombu.py [deleted file]
cinder/openstack/common/rpc/impl_qpid.py [deleted file]
cinder/openstack/common/rpc/impl_zmq.py [deleted file]
cinder/openstack/common/rpc/matchmaker.py [deleted file]
cinder/openstack/common/rpc/matchmaker_redis.py [deleted file]
cinder/openstack/common/rpc/matchmaker_ring.py [deleted file]
cinder/openstack/common/rpc/proxy.py [deleted file]
cinder/openstack/common/rpc/serializer.py [deleted file]
cinder/openstack/common/rpc/service.py [deleted file]
cinder/openstack/common/rpc/zmq_receiver.py [deleted file]
cinder/rpc.py [new file with mode: 0644]
cinder/scheduler/flows/create_volume.py
cinder/scheduler/manager.py
cinder/scheduler/rpcapi.py
cinder/service.py
cinder/test.py
cinder/tests/api/contrib/test_admin_actions.py
cinder/tests/api/contrib/test_qos_specs_manage.py
cinder/tests/api/contrib/test_types_extra_specs.py
cinder/tests/api/contrib/test_types_manage.py
cinder/tests/api/contrib/test_volume_actions.py
cinder/tests/api/contrib/test_volume_transfer.py
cinder/tests/api/contrib/test_volume_type_encryption.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/stubs.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/cast_as_call.py [new file with mode: 0644]
cinder/tests/fake_notifier.py [new file with mode: 0644]
cinder/tests/integrated/integrated_helpers.py
cinder/tests/scheduler/test_rpcapi.py
cinder/tests/test_huawei_hvs.py
cinder/tests/test_quota.py
cinder/tests/test_test.py
cinder/tests/test_volume.py
cinder/tests/test_volume_rpcapi.py
cinder/tests/test_volume_utils.py
cinder/volume/manager.py
cinder/volume/rpcapi.py
cinder/volume/utils.py
etc/cinder/cinder.conf.sample
openstack-common.conf
requirements.txt
setup.cfg