| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Add a helper method to the RpcProxy class. This is a little nicer to
use for checking to see if a given message is copmatible with the set
version cap.
Change-Id: Ic44d76f4181351dff367f2d1181a3d508a11db78
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
This allows one to subclass RpcProxy for use with a particular
namespace without having to repeatedly pass the namespace into the
make_namespaced_msg() method. This new RPC_API_NAMESPACE attribute will
be used for the make_msg() call. It is defaulted to None to match previous
behavior.
Change-Id: Ied62df839cda0be6f9f9b060bbfc22e086f61be8
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I4fdc8eed74dd90d6450864daba7492d5e7266448
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When doing a rolling upgrade, we need to be able to tell all rpc clients
to hold off on sending newer versions of messages until all nodes
understand the new message version. This patch adds the oslo component
of this.
It's quite simple. The rpc proxy just stores the version cap and will
raise an exception if code ever tries to send a message that exceeds
this cap.
Allowing the cap to be configured and generating different types of
messages based on the configured value is the hard part here, but that
is left up to the project using the rpc library.
Implements blueprint rpc-version-control.
Change-Id: Ia69db03a80dc3b1c63d52c7e163ea3cfec80c882
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From http://docs.python.org/3.1/whatsnew/3.0.html:
"Python 3.0 uses the concepts of text and (binary) data instead of
Unicode strings and 8-bit strings."
Use six.text_type to Type for representing (Unicode) textual data. This
is unicode() in Python 2 and str in Python 3.
Change-Id: I3da268a714a34a8e626a2590f01b86e414dc3411
Signed-off-by: Chuck Short <chuck.short@canonical.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
flake8 is pluggable and handles pep8 and pyflakes, as well as configuration
through tox.ini. It also removes the need for flakes.py.
Change-Id: If5f7d8ad348b4fb8119fa4ec7b5e9d17bdc72a39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves the traceback for an rpc timeout from inside an
iterator, which gave a useless traceback, into the main flow of the
program.
It also adds the rpc method being called and the topic used to the
exception's message.
When the caller logs the message higher up the stack, the log
information and traceback will be more useful.
Finally it removes the timeout logging in the amqp.py module, in the
spirit of bug #1137994 and https://review.openstack.org/#/c/23295/
Works towards: bug #1148516
Change-Id: I29a3b1b97c6114c4479e2b71c1257c4d72131535
|
|
|
|
|
|
| |
Fixes bug #1157596
Change-Id: I36d5484eaa2f0e21188eed6e70cc1ad785233d6a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch will log a warning every time a RPC call is made while
a lock is held if the caller has requested it. This should help us
track down performance problems such as the security group refresh
problem recently found in nova.
RPC calls can emit a warning if called with check_for_lock=True
and debugging is turned on.
Sneaks up on bug 1063222.
Change-Id: Ice94093efb3cb95dd58b31d6ba817c7d505c15af
|
|
|
|
|
|
|
|
| |
BaseTestCase properly hooks stubout into fixtures. Just use that.
Part of blueprint grizzly-testtools.
Change-Id: I4bf6b92b9b16d051d8c6ecaf52cf70925848ed8c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
bug 1014216
Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
|
|
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
|