dict.iteritems() was replaced with dict.items() in Python 3. Use the
six.iteritems() function to get code compatible with Python 2 and Python 3.
Change-Id: I0c8ecc3ae540ffaf4c6b159e09ca16ccf365973d
With the routing notifier we can now issue high-frequency notifications
and not worry about clogging up the queue. The Sample priority will
be used for this situation.
Change-Id: Ia4aa77b7aa4ca9458e97ca3ed81101d92934b691
Update to get jsonutils compatible with Python 3.
The babel Python module is now required by gettextutils, and gettextutils is
imported by excutils.
Change-Id: Ifa6d6b29e2af58dfcfda1ab7efdb2f32cf9de655
Because driver should rely on executor and not directly on eventlet,
delete eventlet related code. This also drop the old driver API.
This is the amqp part.
Change-Id: Ic6060058dafa4dabbc5e8c68bf231c818a7fec25
Some modules have different names in Python2 and Python3. This patch
make them compatible with Python 3.
* Use six.moves.filter instead of itertools.ifilter() in Python 2.
* Use common.py3kcompat.urlutils instead of urllib and urlparse.
Change-Id: Ia27ebf6057d91d0e129fbe90f995cfdaa89efa8a
In Python 3, some data structures' attribute is different in Python 2.
See http://pythonhosted.org/six/#object-model-compatibility
This is change mapping:
six Python 2 Python 3
six.next(it) it.next() next(it)
six.iterkeys(dict) dict.iterkeys() dict.keys()
six.itervalues(dict) dict.itervalues() dict.values()
Implements: blueprint make-python3-compatible
Change-Id: Ida48f39ff230860feee7305b93b134c625a21663
In current logic, class impl_qpid.Connnection constructor calls
method connection_create twice indirectly. Let us avoid this.
Change-Id: I7618cf3506d857579dc37b338690d05179ba272d
We need to support deprecated transport driver configurations like:
rpc_backend = nova.rpc.impl_kombu
i.e. 'nova.rpc.impl_kombu' is a deprecated alias for 'rabbit'.
Initially, we supported this by adding the aliases to each project's
setup.cfg:
oslo.messaging.drivers =
nova.rpc.impl_kombu = oslo.messaging._drivers.impl_rabbit:RabbitDriver
However, this means that code like this:
url = str(TransportURL(conf))
generates a bogus URL string like:
nova.rpc.impl_kombu://...
We need to apply these transport aliases when we load drivers, but also
when we create transport URLs from configuration containing potentially
deprecated aliases.
To enable that, add an aliases parameter to TransportURL(),
TransportURL.parse() and get_transport().
blueprint: transport-aliases
Change-Id: Ifce68ff62746c2a363c719417a2bd0a78ee025dd
The ack_on_error is not used by the abstraction layer, and only the
rabbitmq implements it.
This commit remove this feature, and next commit will add a new way for
this.
Partial implements blueprint notification-subscriber-server
Change-Id: I17eb23f2e3e374630251576438011f186e5b2150
Some modules use different names in Python2 and Python3. Use six.moves
to make them work well in Python2 and Python3.
This is changes mapping:
six.moves Python 2 Python 3
reduce reduce() functools.reduce()
Implements: blueprint make-python3-compatible
Change-Id: I97971f2ab40385bfc2c73ae7e8a7620c4d64a03c
No need to set tabstop 189 times, this can be set in your vimrc file
instead. Also if set incorrectly gate (pep8 check) will catch your
mistakes.
Change-Id: Ic6f0c0ef94e8194a5c121598305d1ec3c74e4843
Handle the case where the context passed into def pack_context() is a
dictionary. If a dictionary is passed in, we don't need to call to_dict
before updating the msg.
Closes-Bug: #1208971
Change-Id: I2ce0b28f97634e717868e0ee5525189338d4981c
It seems there's no gain in trying to be smarter and different from the
base Python Exception, so let's remove our custom code to be more
compatible and friendly with all Python versions.
Change-Id: I259783ef1f77c6661ea7dc2325605c8d6290b898
When the QPID broker is restarted (or fails over), subscribed clients
will attempt to re-establish their connections. In the case of fanout
subscriptions, this reconnection functionality is broken. For version
1 topologies, the clients attempt to reconnect twice to the same
exclusive address - which is illegal. In the case of version 2
topologies, the address parsing is broken and an illegal address is
created on reconnect. This fix avoids the problem by removing the
special-case reconnect code that manages UUID addresses; it is
unnecessary as the QPID broker will generate unique queue names
automatically when the clients reconnect.
Closes-bug: #1251757
Change-Id: I6051fb503663bb8c7c5468db6bcde10f6cf1b318
This removes a few import and global variables that are not used through
the code. That cleans things a little.
Change-Id: I7b30bb11e8ad3c2df01ca2107eff2444feed3fe2
The notifier itself doesn't use the configuration. So let's not store
it, that lights the dependency a bit on this configuration object.
Blueprint: messaging-decouple-cfg
Change-Id: Ic4b5ddd93ea0382bd8292f9e31b7dacba9b489d3
The standard Python logging system uses 'warning' and not 'warn'. To
ease compatibility with it, let's add 'warning' too.
Change-Id: I7778d7960ca7a72be007cb083e5434ede6e3fe6e
uuidutils module will be deprecated in Icehouse, So need replace it.
This patch uses str(uuid.uuid4()) instead of method generate_uuid.
Closes-Bug: #1253497
Change-Id: I35815544429c489096b4db3fa79a649f4cd9459f
There has been a bug open for a while pointing out that the way we
create direct exchanges with qpid results in leaking exchanges since
qpid doesn't support auto-deleting exchanges. This was somewhat
mitigated by change to use a single reply queue. This meant we created
far fewer direct exchanges, but the problem persists anyway.
A Qpid expert, William Henry, originally proposed a change to address
this issue. Unfortunately, it wasn't backwards compatible with existing
installations. This patch takes the same approach, but makes it
optional and off by default. This will allow a migration period.
As a really nice side effect, the Qpid experts have told us that this
change will also allow us to use Qpid broker federation to provide HA.
DocImpact
Closes-bug: #1178375
Co-authored-by: William Henry <whenry@redhat.com>
Change-Id: I09b8317c0d8a298237beeb3105f2b90cb13933d8