This patch introduces a new publisher that uses notification instead
of RPC.
And set it by default.
Closes bug: #1005933
Implements blueprint replace-rpc-cast-with-notifications
Co-Authored-By: Ala Rezmerita <ala.rezmerita@cloudwatt.com>
Change-Id: Idc40c148ef60d5e1349d30c66ba85691d93c5675
To keep the global state of messaging like the old olso-incubator
library does, we have created a global TRANSPORT object.
But since the test use the fake:// driver of oslo.messaging in tests,
this transport is shared between tests, but some tests use 'fake://',
other the default one, and someother disable the transport.
This change ensures that a different transport is used for
code tests.
Change-Id: I22317527cc4fb44ea1fb9642586e8cdcbc97030b
The word "Copyright" alone is sufficient to claim copyright, the (c)
symbol need not be present.[1]
As per PEP 263, a Python file with non-ASCII characters must have a
line with "coding: <some-encoding>". Python files containing only
7-bit ASCII characters need no such line.[2]
This commit removes unnecessary Unicode copyright symbols and
unnecessary encoding lines.
[1]: http://www.copyright.gov/circs/circ03.pdf
[2]: http://legacy.python.org/dev/peps/pep-0263/
Closes-Bug: #1324686
Change-Id: Id381ea1f029a0cfddd3773c6d9f16c47842d9c33
oslo.messaging assumes the context is a dict not a RequestContext
and it assumes the payload in json serializable.
This patch ensures this.
Also it removes oslo.messaging mock on some tests and use real oslo.messaging
library with the fake driver.
Change-Id: Ie3c6083bbc4ec83de28e42bb10e7c50c7e135070
Closes-bug: #1275771
Closes-bug: #1317290
The patch replaces oslo.rpc by oslo.messaging.
The important changes:
- On the collector, the queue name and the topic are now the same
(ie: metering, instead of ceilometer.collector.metering for the queue
and metering for the topic)
- Same for the alarm partitionner the queue is no more prefixed by
ceilometer.alarm.
Implements switch-to-oslo.messaging
Change-Id: Ia5e4ff1dd1d419c090b8039627234ae7f07e8660
Remove the useless arg ("start index" = 0) in files, since its default
value is 0, to make code cleaner.
Change-Id: I7cc2127b35df47624f9b4d2045b506e7f56fb7a0
* Signature is appended also to udp messages
* All methods for convert from sample to message are moved to publisher/utils.py
* In configs metering_secret is moved from group publisher_rpc to publisher
* Changed tests for udp publisher
Fixes: bug #1259171
Change-Id: Ic7727c69d4be6d17ff00f21e323341efd57122a7
Fixes bug 1262255
Previously, samples for the 'instance.scheduled' meter were always
rejected with a false negative on the message signature verification.
The problem occured because certain resource metadata (such as the
block_device_mapping) in the 'scheduler.run_instance.scheduled'
notification are realized as a list of dict, and are thus similarly
encoded in the corresponding sample payload.
However the message signature computation then became indeterminate,
as the unicode representation of equivalent dicts is not guaranteed
equal (e.g. depends on insertion order in the case of hash collisions).
Now, we avoid false negatives by explicitly re-ordering insertion
into such dicts.
Change-Id: I77f7d89229518cf040608d7eb3307e2257bce07a
Doing this allow for potential importing of the tests and is cleaner
than having a side directory. Nova already does this, so let's move.
Change-Id: I77fc9c5356f3962363fd355b8dbf44fbeec157ee