Add a simple object pool implementation for our connection pool, in
place of eventlet.pools.Pool.
Also use threading.Lock in place of eventlet.Semaphore.
There are still some eventlet modules imported by the code, but we can
avoid using them at runtime and clean things up later. We can't remove
them now or it'll cause pep8 failures.
Change-Id: I380408d1321802de813de541cd0a2d4305c3627c
Some additional modules from oslo-incubator are required by the driver
code. Don't fret, some of these will be removed in subsequent patches!
Change-Id: I3674bfbc4b1c93afc746b84fbbf8859456cbcb3c
I want to make it absolutely clear what changes we're making from the
original driver code, so let's start with a pristine copy.
Change-Id: I38507382b1ce68c7f8f697522f9a1bf00e76532d
Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.
blueprint oslo.sphinx
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8
The notifier in oslo-incubator does:
payload = jsonutils.to_primitive(payload, convert_instances=True)
Using the serializer abstraction should be a more general was of
supporting this.
Inspired by tulip, have every module define a __all__ list and import *
from the top-level module.
Rename transport.set_defaults() since we don't want this to be a
top-level set_defaults() function as there may be multiple.
Also, rather than configuring flake8 to allow star imports, just exclude
the __init__.py files from flake8 checks.
By storing the reply_q on the listener, we were assuming there was only
one message being dispatched at the time. Put it on the incoming message
instead and use it directly in reply().
Add a helper method to the RPCClient class. This is a little nicer to
use for checking to see if a given message is copmatible with the set
version cap.
This can be used in a bunch of different ways:
client = RPCClient(version_cap='1.6', version='1.0')
client.can_send_version()
client.can_send_version(version='1.6')
client = client.prepare(version_cap='1.8', version='1.5')
client.can_send_version()
client.can_send_version(version='1.2')
Co-authored-by: Russell Bryant <rbryant@redhat.com>