summaryrefslogtreecommitdiffstats
path: root/tests/unit/rpc
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge "Add the rpc service and delete manager"Jenkins2012-09-271-0/+47
|\
| * Add the rpc service and delete managerAngus Salkeld2012-09-261-0/+47
| | | | | | | | | | | | Part of blueprint service-infrastructure Change-Id: Ie00efcb1c974d699ac6b2a38285abef1b295f3ce
* | Add exchange_name parameter to TopicConsumerJulien Danjou2012-09-272-0/+109
| | | | | | | | | | | | | | | | | | | | | | In Ceilometer, we need to consume messages from different exchanges of type 'topic', so being able to specify the exchange name rather than using the default in TopicConsumer is necessary. This fixes bug #1055483 Change-Id: Ibbaec8496f24c0b221cf489258af1e7fe362e84a Signed-off-by: Julien Danjou <julien@danjou.info>
* | Support for several HA RabbitMQ servers.Eugene Kirpichov2012-09-251-17/+131
| | | | | | | | | | | | | | | | Use the rabbit_ha_queues boolean option. It is off by default, and you need to wipe RabbitMQ Mnesia database (/var/lib/rabbitmq/mnesia) when changing it. Change-Id: Id06692a142d1e5316602f6ceed4ccad615ce74c1
* | Use pep8 v1.3.3Zhongyue Luo2012-09-131-1/+1
|/ | | | | | | Fixed indents which violate pep8 1.3.3 Also added .mailmap file to coalesce commits Change-Id: Ia7a788a28e6c0fd9cb52fb7ea477cddd7d589e58
* Make projects define 'control_exchange'.Russell Bryant2012-09-111-4/+4
| | | | | | | | | | | | | | | The 'control_exchange' option needs to have a project-specific default value. Just don't register this option and expect it to be registered by the project using this code, at least for now. ****** IMPORTANT NOTE WHEN IMPORTING THIS CHANGE ****** If you are importing this change into a project that uses rpc, you must add the control_exchange option in your code! ******************************************************* Change-Id: Ida5a8637c419e709bbf22fcad57b0f11c31bb959
* Remove amqp import from rpc/test_commonEric Windisch2012-08-141-1/+0
| | | | | | This import is no longer used. Change-Id: I4683a5b173fecc345b27c43b6cace39b4b491e8b
* Merge "Make receiver spawning in impl_zmq more robust/clean."Jenkins2012-08-101-19/+26
|\
| * Make receiver spawning in impl_zmq more robust/clean.Eric Windisch2012-08-011-19/+26
| | | | | | | | | | | | | | | | | | | | The receiver spawning had some faulty and complex logic which this patch improves. The old logic was logging detection of a zmq-receiver socket, although the code was also launching a receiver daemon. It was also doing dirty things such as intentionally doing a return to trigger a finally block. Change-Id: Ic044710679c43753240a2b9d909088af5317cbf4
* | Reduce test_zmq's reponse timeout.Eric Windisch2012-08-011-0/+1
|/ | | | | | | | | | | | The rpc response timeout in Nova's fake_flags.py was 5 seconds. This was lost in the transition to openstack-common, is no longer set globally. As in test_kombu.py, this should be set in test_zmq.py The default value is much higher than it needs to be for the purposes of testing. A lower value fails faster, resulting in faster tests in the event of failures. Change-Id: I106919d36acd19b702be85e453e949495db70ea9
* Merge "Remove unnecessary register_opts from test_zmq"Jenkins2012-07-311-2/+0
|\
| * Remove unnecessary register_opts from test_zmqEric Windisch2012-07-251-2/+0
| | | | | | | | | | | | | | The calls to register_opts are no longer required, and are no longer called from the tests of other rpc mechanisms. Change-Id: I40fe63d43aad8fcf37d5332a1aa05e2b3068f01a
* | Merge "Use BaseTestCase for all tests which override config"Jenkins2012-07-304-38/+19
|\ \ | |/ |/|
| * Use BaseTestCase for all tests which override configMark McLoughlin2012-07-204-38/+19
| | | | | | | | | | | | | | | | | | Fixes bug #1027120 We already have nice helper methods for overriding config and cleaning up the overrides, so let's use them. Change-Id: Ibd501743d1c4ec21cb2b0d22382cb681ee5768ed
* | Make test_zmq bind/send to 127.0.0.1Eric Windisch2012-07-201-0/+3
|/ | | | | | | | | | | | | | By default, the impl_zmq driver binds to '*' (0.0.0.0); For the purposes of testing, we only need to bind to 127.0.0.1. Binding to all interfaces could be potentially dangerous, may simply not work in some environments, etc. In particular, we do not want our Jenkins slaves to be listening on public interfaces. rpc_zmq_host is set to 127.0.0.1 as well, which avoids hostname resolution. Normally, rpc_zmq_host is set to socket.hostname, which normally should resolve to localhost, but we do not want to test that here. Change-Id: I1224799bb399ceaf79088dd622be4b6823f29a41
* Fix Zmq so it doesn't rely on nova flagsJason Kölker2012-07-101-2/+3
| | | | | | | | | * Embeded newlines in logging makes me cry * String formatting uses parens not curly braces * Fix LP1023039 * Hard skip Zmq tests so jenkins passes. Someone will have to fix. Change-Id: I9b12ac47b02edf1d8dba7236550deb8ee33f5e07
* Switch common files to using jsonutils.Andrew Bogott2012-07-031-7/+7
| | | | | | | | For blueprint use-common-jsonutils Pretty much just a search and replace. Change-Id: I66f63e7b0ff82a37d8a6b9acef94f4e10a45bf90
* 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
* Merge "Fix nova.rpc references in comments."Jenkins2012-06-191-7/+7
|\
| * Fix nova.rpc references in comments.Russell Bryant2012-06-131-7/+7
| | | | | | | | | | | | | | | | Part of blueprint common-rpc. Strip remaining references to 'nova.rpc' that existed in comments. Change-Id: I27885918a5e38eb730504c9e88bdda2b72b23257
* | Merge "rpc: Update rpc_backend handling."Jenkins2012-06-181-0/+25
|\|
| * rpc: Update rpc_backend handling.Russell Bryant2012-06-131-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of blueprint common-rpc. This patch updates the rpc_backend option handling in a couple of ways. 1) Set the default based on wherever this code has been copied to. 2) If we fail to import the backend, replace 'nova.rpc' with 'nova.openstack.common.rpc' just in case the value came from an older nova configuration file. Backwards compatibility is a good thing. Change-Id: I9ad7c084a2f0813ca1559115e7612f0a24fcce67
* | Update common code to support pep 1.3.Gary Kotton2012-06-186-105/+117
|/ | | | | | bug 1014216 Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
* Add missing ack to impl_qpid.Russell Bryant2012-06-131-0/+4
| | | | | | | | | | | Fix bug 1012374. Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that it received. This turned out to be a nasty oversight, resulting in unbounded message queue growth inside of the python-qpid library. This fixes it. Change-Id: I446530239e16701009c4db8407a344596bb17952
* Add impl_zmq to rpc.Russell Bryant2012-06-111-0/+132
| | | | | | | | | | | | | | | | | Part of blueprint common-rpc. This driver just went into nova.rpc. Pull it in over here. I haven't been able to test this, but I can't get the tests to work in nova, either. There is a bit of a complication with impl_zmq worth mentioning. It requires a service to run (nova/bin/nova-rpc-zmq-receiver). Only once instance of this service should run on a given machine, so it shouldn't be copied into each project that uses rpc. Once openstack-common is an installed library, it can be distributed with that, but until then ... we'll just leave it in nova for now. Change-Id: I2bd067be58d943d4f3a90e013b22282217484872
* Fix RPC tests to not use assertInJason Kölker2012-06-071-2/+2
| | | | | | * Fixes Bug #1010244 Change-Id: Idac365a1719c49846ef105b90683e631310fbf6c
* Add rpc to openstack-common.Russell Bryant2012-06-0610-0/+1690
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