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