summaryrefslogtreecommitdiffstats
path: root/openstack/common/rpc/impl_fake.py
Commit message (Collapse)AuthorAgeFilesLines
* Enable hacking H402 testSergey Lukjanov2013-06-031-2/+2
| | | | | | H402 one line docstring needs punctuation Change-Id: Ie848453cace318d8310cdf0234c512f4c1121119
* Add rpc method namespace support.Russell Bryant2013-04-121-4/+8
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix Copyright Headers - Rename LLC to FoundationDavanum Srinivas2013-03-111-1/+1
| | | | | | One code change, rest are in headers Change-Id: I73f59681358629e1ad74e49d3d3ca13fcb5c2eb1
* Add missing parameter to impl_fake notify function.Gary Kotton2013-01-141-1/+1
| | | | | | The envelope was missing. Change-Id: I3ab8f573e6c5020bd564ad78de29e6c285695f2c
* Allow exceptions to pass over RPC silentlyDan Smith2012-12-061-0/+2
| | | | | | | | | | | | | | | When one service performs an operation on behalf of another, the act of passing back an exception (even a known one) causes a lot of scary log messages about the (presumed to be) error case. This patch adds a client_exceptions decorator common/rpc/common.py, which allows RPC services to declare the list of expected exceptions for each method. If such an exception is raised during the RPC dispatch, it is wrapped in a ClientException so that the RPC layer can gracefully pass it back without overly-verbose logging. This will allow us to fix nova bug 1084707 Change-Id: I4e7b19dc730342091fd70a717065741d56da4555
* Use json instead of jsonutils in rpc.impl_fake.Russell Bryant2012-12-011-2/+7
| | | | | | | | | | | | | The fake rpc backend uses json just to make sure the data that was passed in can be serialized. Our jsonutils module makes this check a no-op, because it will automatically convert the data we pass in as primitive types if needed. Change this module back to using the json module directly and add a comment about why we don't use jsonutils here. Also add a test that ensures that non-primitive types raise an exception in the fake rpc driver. Change-Id: I61f46242cb98c875a94d86283e30efb24cc580ad
* Switch common files to using jsonutils.Andrew Bogott2012-07-031-2/+2
| | | | | | | | For blueprint use-common-jsonutils Pretty much just a search and replace. Change-Id: I66f63e7b0ff82a37d8a6b9acef94f4e10a45bf90
* Add rpc to openstack-common.Russell Bryant2012-06-061-0/+184
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