]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
neutron.api.rpc.callbacks interface rework
authorMiguel Angel Ajo <mangelajo@redhat.com>
Fri, 24 Jul 2015 00:45:35 +0000 (02:45 +0200)
committerIhar Hrachyshka <ihrachys@redhat.com>
Sat, 8 Aug 2015 08:24:20 +0000 (10:24 +0200)
commit11e22a435adc20d65196b937381c5d931130e771
tree5b40059c4fb8fa9932e6e8b10af213c955e2b1d4
parentaa8a292d930b2081c2e9d137591b38d4a585639b
neutron.api.rpc.callbacks interface rework

Split rpc.callbacks interface into consumer and producer parts.

Better terms are chosen for two RPC APIs we have:
- pull when a component actively requests a new object state;
- push when a component updates anyone interested about an object
  change.

Also, for callback registration, the following terms are used:
- subscribe when a component is registered in consumer registry;
- provide when a component is registered in provider registry.

Covered the registries with some unit tests.

Lots of existing tests utilize the registries now, and need to be
isolated from other tests that mess with the managers (that are
singletons), so introduced a common qos base test class to mock the
manager with per-test instance of it).

Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>
Partially-Implements: blueprint quantum-qos-api
Change-Id: I130cfbc8b78da6df4405b90ea1ab47899491ba41
26 files changed:
doc/source/devref/rpc_callbacks.rst
neutron/agent/l2/extensions/qos.py
neutron/api/rpc/callbacks/consumer/__init__.py [new file with mode: 0644]
neutron/api/rpc/callbacks/consumer/registry.py [new file with mode: 0644]
neutron/api/rpc/callbacks/events.py
neutron/api/rpc/callbacks/exceptions.py [new file with mode: 0644]
neutron/api/rpc/callbacks/producer/__init__.py [new file with mode: 0644]
neutron/api/rpc/callbacks/producer/registry.py [new file with mode: 0644]
neutron/api/rpc/callbacks/registry.py [deleted file]
neutron/api/rpc/callbacks/resource_manager.py
neutron/api/rpc/handlers/resources_rpc.py
neutron/plugins/ml2/plugin.py
neutron/services/qos/notification_drivers/message_queue.py
neutron/services/qos/qos_plugin.py
neutron/tests/unit/agent/l2/extensions/test_qos.py
neutron/tests/unit/api/rpc/callbacks/consumer/__init__.py [new file with mode: 0644]
neutron/tests/unit/api/rpc/callbacks/consumer/test_registry.py [new file with mode: 0644]
neutron/tests/unit/api/rpc/callbacks/producer/__init__.py [new file with mode: 0644]
neutron/tests/unit/api/rpc/callbacks/producer/test_registry.py [new file with mode: 0644]
neutron/tests/unit/api/rpc/callbacks/test_registry.py [deleted file]
neutron/tests/unit/api/rpc/callbacks/test_resource_manager.py
neutron/tests/unit/api/rpc/handlers/test_resources_rpc.py
neutron/tests/unit/services/qos/base.py [new file with mode: 0644]
neutron/tests/unit/services/qos/notification_drivers/test_manager.py
neutron/tests/unit/services/qos/notification_drivers/test_message_queue.py
neutron/tests/unit/services/qos/test_qos_plugin.py