summaryrefslogtreecommitdiffstats
path: root/tests/unit/rpc/test_dispatcher.py
Commit message (Collapse)AuthorAgeFilesLines
* Add generic serialization supportDan Smith2013-05-211-0/+27
| | | | | | | | | | | | This adds a generic serialization model that the RpcProxy and RpcDispatcher will use to serialize and deserialize arguments and return values. The base definition is provided, as well as a default NoOpSerializer which performs no special action (retaining the existing behavior). Related to blueprint rpc-object-serialization Change-Id: I0a33baddee3e28dfc47100eb3216b679558b0bdd
* Add rpc method namespace support.Russell Bryant2013-04-121-4/+40
| | | | | | | | | | | | | | | | | | | | | | RPC endpoints already had the ability to expose multiple APIs ... sort of. You could pass multiple callback objects to the dispatcher and it would check all of them for a method call. This patch adds the ability to set a namespace on a callback object. This makes exposing multiple APIs a bit more like you would expect it to work. You can invoke a method on a specific callback object, as opposed to having it check all of them for the method. This will allow you to create, manage, and version APIs without any potential conflicts with other APIs being exposed by the same endpoint. An example of where I would like to use this is in Nova, where we have some methods that we would like to expose on *all* rpc endpoints. This includes no public API changes and is fully backwards compatible. Implement blueprint rpc-multi-api. Change-Id: Ief4433e2e1c32cfb05b4cd27b87fe32b40f4341d
* Replace direct use of testtools BaseTestCase.Monty Taylor2013-01-241-3/+2
| | | | | | | | | Using the BaseTestCase across the tests in the tree lets us put in log fixtures and consistently handle mox and stubout. Part of blueprint grizzly-testtools. Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
* Use testtools as test base class.Monty Taylor2013-01-241-6/+3
| | | | | | | | | | | | | On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtools.skipTest Part of blueprint grizzly-testtools. Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
* Avoid erroneous "Unsupported RPC Version" message if method is missingDan Smith2012-06-211-0/+14
| | | | | | | | | | | | | | | | | | The recent RPC versioning support introduced some odd behavior if a non- existent method is called. Instead of reporting that the method does not exist (as the code used to do, in the form of an AttributeError), it now Reports "Unsupported RPC Version". This is highly confusing, as the RPC versions *do* match and is just a result of the logic used to check every advertised RPC proxy for the method. This patch notes if any of the RPC versions matched the requested one, and if so, raises an AttributeError if the method is never found, instead of UnsupportedRpcVersion. Also add unit tests for the cases where a method is missing, both when the API version matches and not. Change-Id: Icb7b13fa890000f1bd03382d5cce747e3311ef6a
* Update common code to support pep 1.3.Gary Kotton2012-06-181-8/+12
| | | | | | bug 1014216 Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
* Add rpc to openstack-common.Russell Bryant2012-06-061-0/+110
Implements blueprint common-rpc. This patch imports nova.rpc to openstack-common. All of the necessary changes to the core code to make it compatible with openstack-common have been done in nova, so the only changes made here are to imports. There are more changes made to the tests, but nothing that changes the core functionality of the tests. Change-Id: I17330aa4adfd0f22c449a2376833c7fe9dfd0cf1