Remove six, the python 2/3 compatibility library. It's not needed
anymore since the repo is python3 only.
Remove a now unneeded hacking test.
Change-Id: I40522c4accb4aaf8115d11fee8b081e2d991cb4d
With this feature, it is possible to specialize the parameters to send.
`options = oslo_messaging.TransportOptions(at_least_once=True)`
TransportOptions is used in every single driver,
for example in RabbitMQ driver is used to handle the mandatory flag.
Notes:
- The idea of creating a new class TransportOptions is because I'd like
to have an abstract class not related only to the RPCClient
- at_least_once is the first parameter, when needed we can add the
others.
Implements: blueprint transport-options (second point)
The blueprint link is [1]
To test it you can use [2]
1- https://blueprints.launchpad.net/oslo.messaging/+spec/transport-options
2- https://github.com/Gsantomaggio/rabbitmq-utils/
tree/master/openstack/mandatory_test
Change-Id: I1858e4a990507d3c2bac2ef7fbef75d8c2dbfce2
With this new parameter is possible to pass other parameters
from the client to the drivers.
So it is possible to tune the driver behavior.
For example can be used to send the mandatory flag in RabbitMQ
Note:
- The transport_options parameter is not actually used (yet).
- This part of blueprint transport-options (first part)
Implements: blueprint transport-options
The blueprint link is
https://blueprints.launchpad.net/oslo.messaging/+spec/transport-options
Change-Id: Iff23a9344c2c87259cf36b0d14c0a9fc075a2a72
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.
Change-Id: I9ddb6595fc52e46ed8844e39d2fa71029c90b65c
Closes-Bug: #1674567
Change d3f6ca0b47e2a5a3413b27617d9655f02b191c6a have broken
oslo.messaging defaults, no more transport are selected by default and
oslo.messaging just crash:
Traceback (most recent call last):
File "/home/sileht/workspace/openstack/oslo.messaging/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
return func(*args, **keywargs)
File "oslo_messaging/tests/test_transport.py", line 111, in test_get_transport
transport_ = oslo_messaging.get_transport(self.conf, **kwargs)
File "/home/sileht/workspace/openstack/oslo.messaging/.tox/py27/lib/python2.7/site-packages/debtcollector/removals.py", line 242, in wrapper
return f(*args, **kwargs)
File "oslo_messaging/transport.py", line 247, in get_transport
transport_cls=RPCTransport)
File "oslo_messaging/transport.py", line 205, in _get_transport
url.transport.split('+')[0],
AttributeError: 'NoneType' object has no attribute 'split'
This change restores rabbit:// as default.
Change-Id: I945a2aca60347dad672cc406cd33e80e93c588a7
Now that most projects have transitioned from using
ConfFixture.transport_driver, we can remove it and rpc_backend as a
whole. rpc_backend was first deprecated in 5.10.0, released during
Ocata.
Closes-Bug: #1712399
Change-Id: I193cc0e613459a6dbbfd54ed0901a54ded78d712
Users of the oslo.messaging RPC communications service must use
the rabbit ("rabbit://...") or AMQP 1.0 ("amqp://...") drivers.
Change-Id: If3474142f1fe99d41d7b4466061ed0e23ca38549
Closes-Bug: 1789259
To facilitate removing rpc_backend support, disentangle the aliases
code by removing it to simplify the code and the tests. Aliases were
first depreacted in 5.20.0 during Pike.
Change-Id: I7d80cd050ce1eca2c6b6c38f0fac29d090b90bf3
Closes-Bug: #1424728
This adds an optional call_monitor_timeout parameter to the RPC client,
which if specified, will enable heartbeating of long-running calls by
the server. This enables the user to increase the regular timeout to
a much larger value, allowing calls to take a very long time, but
with heartbeating to indicate that they are still running on the server
side. If the server stops heartbeating, then the call_monitor_timeout
takes over and we fail with the usual MessagingTimeout instead of waiting
for the longer overall timeout to expire.
Change-Id: I60334aaf019f177a984583528b71d00859d31f84
This is a complicated config opt and the single line help text
doesn't provide anywhere near enough detail for a user to properly
configure it. This change adds the expected format from the
TransportURL docstring and leaves a link to the docs for that
class since the full details are probably too verbose to put in the
help text in their entirety.
Change-Id: I66122bf9c619d35bcb3caadfde9c0dcdb5cd9095
Since RPC and notifications can have different backends, it is
useful to warn users if they use a notification transport in RPC
and vice versa. This patch introduces RPCTransport and
NotificationTransport subclasses of Transport, so it's easier to
add different behavior for them if need be.
Related-Bug: #1680192
Change-Id: Iab60544d69053c8e74c28a2d5c84665be749013f
Be specific regarding which characters can be used in the 'username'
and 'password' fields of the URL.
Change-Id: I9a2a801b3dd86fceffb05f4d52c715748c88d0cb
Closes-Bug: #1693967
The get_rpc_transport wraps get_transport to unify the API in
anticipation of comprehensive separation of RPC and Notification
messaging backends.
Related-Bug: 1680192
Change-Id: Ic6af07b98ff43806c2af38a3ba129991f1e0ec86
We log deprecation message even if application doesn't use it.
And we missing the parse method.
This change fixes that.
Change-Id: I476816cb14ac8218feb74e8459cfa5f18fdb6c61
The rightmost '@' in a url netloc field separates the user:password
from the hostname:port. Using the first may cause the separation to
occur in the username or password field (if unencoded).
Change-Id: I7b02d8e0cbdf875ea80a55065ce98fa73696e05f
Closes-Bug: 1675423
oslo.messaging deprecated transport aliases[1] since 5.2.0+
that is the minimal version supported for stable/newton.
This commit deprecates aliases kwargs of TransportURL() and
get_transport(), then we can remove the parameter aliases
in the future version.
Related-Bug: #1424728
[1]I314cefa5fb1803fa7e21e3e34300e5ced31bba89
Change-Id: I0c96979dacd9eb05b4215c687b5e34e7b3475ddb
When transport url is set to something like "amqp://hostname:/"
it currently raise ValueError while any url parsing library
(like urlparse) just ignore the port, and don't fail since this is a
value url.
This change make the transport url ignore empty port instead of raising
ValueError.
Change-Id: I04df76012e3b133eddbcf365363cd261d277e369
In TransportURL.parse(), a classmethod, we expect conf.transport_url
to be accessible if a url is not passed in. However, since the
_transport_opts are not registered yet, that will fail, which is
a pretty easy case to hit if we're constructing our TransportURL
for the first time on startup.
This registers the opts if we're likely to hit it.
Change-Id: Id94bc0a7fec3ce536e134d4f162ac253a775b238
1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators.
We can use dict.items instead, as it will return iterators in PY3 as well.
And dict.items/keys will more readable. 2.In py2, the performance about
list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ia235afc3532f62f265f91ca46d2306c72fc2a2a2
User may not set username/password for each host in config
option transport_url. All hosts should have username/password,
or no host have username/password at the same time.
This commit adds warning if user doesn't set properly.
Closes-Bug: #1595965
Change-Id: I4e204ce8365274566064168a2ba02c3278579717
This patch proposes to allow TransportURLs to have query parameters
with driver-specific options which may override corresponding
values from a static configuration. As an example, the patch
implements this possibility in the pika driver. If the idea is
approved, it will be possible to also implement it in the other
drivers.
Change-Id: Ibb7e13b4509fde035a3c334cde9bc4c498f92140
This change starts the deprecation process for the transport aliases.
The first step is deprecate this one cycle. To ensure deployer have
updated they configuration during Newton Then in Octacia we will deprecate
'aliases' kwargs of transportURL() and get_transport() for consuming
application.
Related-bug: #1424728
Change-Id: I314cefa5fb1803fa7e21e3e34300e5ced31bba89
For no real reason, the transport_url confi option was not read by the
TransportURL class while other config options are read directly from
configuration. Instead the transport_url was always passed to
TransportURL.parse().
This change allows url to be optional for TransportURL.parse() and read
the url from transport_url config when not provided.
Change-Id: Idfe9aa37bf3a409d2c1f76d99ea3d2bdf9837193
We keep backward compatibily of this options since the begin
of oslo.messaging while other driver get theses options trough
the TransportURL.
This changes mark them as deprecated.
Change-Id: I8009c0512f3d7864d2699abf8335bcded259fa02
1) Add MessageHandler base interface for on_incoming_callback replacement
2) Move message_handler parameter form Listener's __init__() to start()
3) Remove wait method from listener
Change-Id: Id414446817e3d2ff67b815074d042a9ce637ec24
The transport_url may contain credentials to the message queue; For
this reason, this option should be secret for it to not leak into the
logs.
Closes-Bug: #1567233
Change-Id: I49c641a2662976d7220e4222e3c4a4d2586b1336
Current Listener interface has poll() method which return messages
To use it we need have poller thread which is located in MessageHandlerServer
But my investigations of existing driver's code shows that some implemetations have
its own thread inside for processing connection event loop. This event loop received
messages and store in queue object. And then our poller's thread reads this queue
This situation can be improved. we can remove poller's thread, remove queue object
and just call on_message server's callback from connection eventloop thread
This path provide posibility to do this for one of drivers and leave as is other drivers
Change-Id: I3e3d4369d8fdadcecf079d10af58b1e4f5616047
Back in liberty we marked this driver as deprecated. This patch removes
it from the tree. The patch also removes tests, options and other
references in the documentation. Note that one script is being kept
because it's required by the amqp driver.
Depends-On: If4b1773334e424d1f4a4e112bd1f10aca62682a9
Change-Id: I4a9cba314c4a2f24307504fa7b5427424268b114
This statement is useless since both 'username' and 'password' are set to None
in the for loop, and that they are not used outside of the loop.
Removing this line also help us getting rid of a false positive thrown by
bandit.
Change-Id: I2aa1a16f30928b77aa40c5a900e35b7bf752658a
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.
bp/drop-namespace-packages
Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7