50 Commits

Author SHA1 Message Date
Davanum Srinivas
2982b6a7ed Merge remote-tracking branch 'origin/feature/pika' into merge-branch
Change-Id: I570b3dbb3ecaa13d5a6b240a092de82ee0b39c50
2016-01-07 08:21:04 -05:00
ChangBo Guo(gcb)
54d0d59476 Remove stale directory synced from oslo-incubator
Change-Id: Icba41b5f68c24e9ffdc29ad77d3fbd12db810718
2015-12-23 16:14:59 +08:00
Davanum Srinivas
cc0f8cc8a9 Merge remote-tracking branch 'origin/master' into merge-branch
Change-Id: Ice6dcc3867dff6b7fea5647a3b79d1c765bf9d73
2015-12-14 16:21:42 +02:00
Mehdi Abaakouk
4dd644ac20 batch notification listener
Gnocchi performs better if measurements are write in batch
When Ceilometer is used with Gnocchi, this is not possible.

This change introduce a new notification listener that allows that.

On the driver side, a default batch implementation is provided.
It's just call the legacy poll method many times.

Driver can override it to provide a better implementation.
For example, kafka handles batch natively and take benefit of this.

Change-Id: I16184da24b8661aff7f4fba6196ecf33165f1a77
2015-12-08 09:14:20 +01:00
Jenkins
5840ab3340 Merge "Remove qpidd's driver from the tree" 2015-11-23 14:56:33 +00:00
Flavio Percoco
925eb734a9 Remove qpidd's driver from the tree
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
2015-11-20 18:43:28 +00:00
Sean Dague
9843641b86 make pep8 faster
This builds a stripped down tox target for pep8 that doesn't need a
giant venv with all the things. Works fast and lean, and makes julien
fries.

Change-Id: Id5b7671fb7f2b8cbf88745fd12f9238b3c0bb2dd
2015-11-19 14:48:13 -05:00
Davanum Srinivas
a2ff73cb80 cleanup tox.ini
* Remove requirements.txt from deps, as this is
  already added automatically


Change-Id: I696dd69ba1d59ab026180e8e3cb864fe37442e10
2015-11-16 00:36:00 +00:00
Cyril Roelandt
2786a9ded3 Add a "bandit" target to tox.ini
This will allow us to find potential security issues, such as those fixed by
52e624891fc500c8ab9f3f10ef45258ce740916a and
c4a7ac0b653543e8a3ba10060cabdb114fb6672b .

Change-Id: I21aa0ca79232784069e55da46920eb43250d8939
2015-10-26 18:11:15 +01:00
Dmitriy Ukhlov
ad2f475955 Implements rabbit-pika driver
In this patch new driver implementation added and registered
in setup.cfg, integrated ith tox functional tests.

Implements: bp rabbit-pika

Depends-On: I7bda78820e657b1e97bf888d4065a917eb317cfb
Change-Id: I40842a03ce73d171644c362e3abfca2990aca58a
2015-10-20 15:04:36 +03:00
Kenneth Giusti
23c68ca439 AMQP1.0: Turn off debug tracing when running tox
Change-Id: I0a3da5441db4ab45ed6e5671d2612db104edf3a0
Closes-Bug: #1504563
2015-10-09 10:32:32 -04:00
Kenneth Giusti
1b605c1466 Use the hostname from the Transport for GSSAPI Authentication
Previously, the AMQP 1.0 driver did not pass the proper hostname to
pyngus.  This prevented GSSAPI authentication from working properly.

Change-Id: Ibc6678e7cbae6dd5108d1650dbb8ddf837aa3648
Closes-Bug: #1503258
2015-10-08 14:06:33 -04:00
Mehdi Abaakouk
894db18563 Remove useless additional requirement file
amqp1 requirements doesn't need anymore to be in
a separate file.

Change-Id: If8de5bcac231052ebf93323bf3923ab942a0de17
2015-09-15 11:29:52 +02:00
Kenneth Giusti
992c7ec5b0 Port the AMQP1 driver to new Pyngus SASL API
Pyngus 2.0 includes a new API for configuring SASL credentials.
Previous versions of Pyngus did not provide this API - the driver had
to invoke Proton APIs in order to configure user credentials.  Moving
to the Pyngus API will preserve compatibility with older versions of
Proton, since the next release of Proton wil be changing its SASL API.

Pyngus 2.0 also adds strict enforcement of callback re-entrancy
constrants.  This patch fixes some bad driver reentrancy violations.

Closes-bug: #1473515
Change-Id: Iddccefd3ee3c9092c086fc54e3810f78d5df9338
2015-08-26 11:24:25 -04:00
Doug Hellmann
857ccabc9c Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names. It also adds a local
hacking check to prevent regressions, while disabling style checks in
the "tests" directory, which will be deleted in a subsequent patch.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Iad2ae13c771c99861ca9493c6ab10edcfbd8684a
2015-07-13 21:12:35 +00:00
Victor Sergeyev
2734fc8f50 Remove py26 artefacts from oslo.messaging code
If we are not support py26 anymore, we can remove py26 tox environment
and some specific code.

Change-Id: I9b935c0bcbb4ddfd5388ad5ad76c6e7662c9f2fa
2015-07-06 12:04:02 +03:00
Sergey Vilgelm
862aca7f32 Manual update the requirements
According to the disscussion[1] we have to remove the requirements-PYN.txt

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-July/068469.html

Change-Id: I9de07e595f6f75b91ef3f92fddcd95300b15e772
2015-07-02 16:51:42 +03:00
Davanum Srinivas
f1c2b8ff91 Add tox target to find missing requirements
Change-Id: I49465a614540c6cc1a0e3f1b448f13db940c784c
2015-06-26 07:26:24 -04:00
Flavio Percoco
f06b19628f Enable amqp's protocol unit tests everywhere
Now that python-qpid-proton has taken an approach similar to zmq's, it's
possible to install it in boxes where the C libraries are not present in
the system. This patch takes advantage of that to enable amqp protocol's
tests everywhere.

Change-Id: Ibce4c791aafadf45fa876d6a4f5373fde94769ff
2015-06-15 20:52:24 +02:00
Mehdi Abaakouk
80ece65a54 Don't use devstack to setup our functional env
This adds a setup script for each tox functional target to start a
rabbitmq-server, qpidd or redis daemon dedicated for the functional
testing.

This script is responsible to spawn a preconfigured daemon needed for
the functional tests.

This also changes the gate script to just install the required packages
instead of setup a devstack.

This also fixes the zmq config options loading in tests

Closes-bug: #1442612

Change-Id: I27eb2c1d3d0ca67aa361c83e41372138e03d9bdd
2015-06-11 12:01:01 +02:00
Davanum Srinivas
6abfdd51da Remove support for Python 3.3
Change-Id: Ifca70a5e139090ae5fd76bd524738bb8c138fd0f
2015-05-10 19:18:41 -04:00
Jenkins
60ee6d1208 Merge "Fix coverage report generation" 2015-03-16 01:46:07 +00:00
Clint Byrum
0f87f5cb15 Fix coverage report generation
Coverage is a little bit confused by oslo.messaging as the pypi package
name. So we have to be explicit here or we get no data collection.

Adding a .coveragerc helps give the report more context as we don't
care about coverage in the tests or oslo-incubator.

Change-Id: I3d24187890efd7aecad7fcb7a2974b87e89ef6ff
2015-03-12 16:38:51 -07:00
Mehdi Abaakouk
01247563f1 Deprecates the localcontext API
We deprecate the localcontext API in favor of the
oslo.context one.

Related bug: #1288878

Change-Id: If6049544e35ae49e41f2771cae858b6d4ebe00cd
2015-03-11 16:14:50 +01:00
Mehdi Abaakouk
b2f505ee57 amqp1: fix functional tests deps
This change increases the version of python-qpid-proton to works
on fedora21.

It also installs qpid-tools to ensure authentification works before
starting the tests.

Change-Id: Ic8eb3b80ef4af6ca8cecbb6fba71cb69c0af3101
2015-02-11 16:25:04 +00:00
Mehdi Abaakouk
b6a1ea0113 Gate functionnal testing improvements
set DEVSTACK_GATE_NO_SERVICES=1 to not setup a whole openstack
when we need only a messaging broker.

Add of the zeromq gate job.

Fix the amqp1.0 password

Change-Id: If1332d97c4d4e92bf920fed4de2795461d9feb22
2015-01-30 11:04:52 +01:00
Mehdi Abaakouk
dc75773f98 Set the password used in gate
Change-Id: I7affe90e3b0f4e3677e3494731e9cb0dc421c374
2015-01-28 16:09:20 +01:00
Mehdi Abaakouk
f286ef1114 Fix functionnal tests
This removes the functionnal tests from the legacy
directory and run the ones in the new directory with tox.

Change-Id: Ibbfd6c946e25435ff37e459bf5e82565a1e21778
2015-01-21 17:58:18 +01:00
Doug Hellmann
e55a83e832 Move files out of the namespace package
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
2015-01-12 12:50:41 -05:00
Mehdi Abaakouk
a8d3da228c Add qpid and amqp 1.0 tox targets
This change adds two targets for qpid and amqp to
be able to run the functional tests suite on them in gate

This also run only functional tests for the functional tox testenv

Change-Id: Ibf1db3fe55f82dd6dc02f2e57d73608fcad80d0e
2014-11-20 15:11:24 +00:00
James Carey
6f76039fa2 Activate pep8 check that _ is imported
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.

This helps ensure that the _ from i18n is used.

Activating this check did not flag any violations.

Change-Id: I077b9b2060e618823ef6dd6f95ce9fe7dcc52a06
2014-10-31 20:29:28 +00:00
Gordon Sim
f1afac446c Add driver independent functional tests
Add driver independent functional tests of the messaging API

The url used to select (and configure) the driver is specified as an
environment variable named TRANSPORT_URL.

Change-Id: I867001a15ffaca06ae831cfd0240ed3397bf6503
2014-10-22 17:07:45 +02:00
Julien Danjou
3dd6a23271 Finish transition to oslo.i18n
Change-Id: Ia0c8c15ba95b1fac6c815b86ccd8771b3ca24327
2014-10-06 13:28:05 +02:00
Davanum Srinivas
487bbf5b13 Enable oslo.i18n for oslo.messaging
Change-Id: Ic8e05ae4ffe3eb871ae64243c41a9955f47cbe2a
2014-09-24 22:18:50 -04:00
Jeremy Stanley
e0adc7db6c Work toward Python 3.4 support and testing
Change-Id: I766de4fa6f352fa1c9284187134654de1a468622
2014-09-09 23:25:31 +00:00
Gordon Sim
fbee94170f An initial implementation of an AMQP 1.0 based messaging driver
The key driver interfaces are implemented in the ProtonDriver class in
driver.py.  The logic for interfacing with Pyngus in order to
send/receive messages, manage AMQP connections and links, and handle
protocol events is in controller.py.  eventloop.py is a fairly generic
socket connection and I/O processor which runs in its own thread.
controller.py uses the eventloop.py thread to schedule subscription
and message send requests from the driver, as well as handle all
protocol event callbacks coming from Pyngus.

Included in this patch are a set of functional tests that can be run
under tox (tox -eamqp1).  These tests fully exercise the new driver,
from the driver API down to the 'wire' - nothing in the driver is
mocked out.  The functional tests implement a simple loopback test
broker, which allows the driver to send and receive messages via the
local network.  All RPC call patterns, RPC timeouts, and even broker
failover are verified by the included functional tests.

This driver uses the Pyngus module, which is a pure-python client API
built on the Proton AMQP 1.0 protocol engine library from the Apache
Qpid project.  Pyngus is available via pypi.python.org.

This driver introduces a dependency on the Proton AMQP 1.0 protocol
library, which is a platform-dependent library that must be installed
in order to use this driver and run the functional tests.

Change-Id: I871703e4cdc04cee3e6c214e911c9df464ede2ed
Implements: blueprint amqp10-driver-implementation
2014-09-04 15:12:43 -04:00
Julien Danjou
4cb33ecc94 Port to Python 3
This patch enables running all the unit tests (except the qpid ones that
are skipped) under Python 3.3 and Python 3.4.

Change-Id: I711663b4eedfb3cdeea7e6da7d28c6b92663e611
2014-08-18 17:08:13 +02:00
Christian Berendt
dd1d6d12ed Enable PEP8 check E714
Change-Id: I1562330af99553b4322f7dc062b310cc4ef93ccf
2014-08-08 06:07:17 +00:00
Christian Berendt
ec9ffdb979 Enable PEP8 check E265
Change-Id: Idf41d967fb06a063d02c19987733ba3757aa466f
2014-08-08 06:07:09 +00:00
Christian Berendt
8151da821b Enable PEP8 check E241
* E241 multiple spaces after ':'

Change-Id: I2310ffc00b7fe58d0781705a73212eefa116c999
2014-08-08 06:06:55 +00:00
Christian Berendt
500f1e5dca Enable check for E226
* E226 missing whitespace around arithmetic operator

Change-Id: Iee5f6a952d9b12c6c8a4a79ef656fc7f94170776
2014-08-04 12:15:34 +00:00
Christian Berendt
5be1b6a6a9 Enabled hacking checks H305 and H307
* H305  imports not grouped correctly
* H307  like imports should be grouped together

Change-Id: I08dafc4fa150d2213b2bb002da7c9ee0ee517fac
2014-07-17 12:41:21 +02:00
Jenkins
3d956f5f5f Merge "Synced jsonutils and its dependencies from oslo-incubator" 2014-07-09 21:46:55 +00:00
Mark McLoughlin
8babb0d1bd Add 'docs' tox environment
To make it easy to build docs with 'tox -e docs'.

Change-Id: Idd47c617196b25539b6b1fc88fac0a45b7fc0911
2014-06-26 06:52:25 +01:00
Ihar Hrachyshka
503b48a6b8 Synced jsonutils and its dependencies from oslo-incubator
The sync includes change that makes sure we get unicode-only dicts from
jsonutils no matter which json module implementation is selected.

The latest commit in oslo-incubator:
- 2e1214b74b5448825d3db26e1308a51b468d3d5c

Included commits:
* gettextutils.py:
  - de4adbc4: pep8: fixed multiple violations
  - 9912e5df: Add API for creating translation functions
  - 6cc96d05: Fix test_gettextutils on Python 3
  - fd33d1ea: Fix gettextutil.Message handling of deep copy failures
  - 047b2e4e: Change lazy translation to retain complete dict
  - 6d55e26a: Add support for translating log levels separately
* importutils.py:
  - 1173e469: Remove ValueError when accessing sys.modules
  - 885828af: Deleted duplicated method in cliutils.
* jsonutils.py:
  - 0d7296f6: Add kwargs to jsonutils.load(s) functions
  - 18f2bc1b: Enforce unicode json output for jsonutils.load[s]()
  - 9e5a3938: jsonutils.load() accepts file pointer, not string
* timeutils.py:
  - 250cd88c: Fixed a new pep8 error and a small typo

The sync adds new module: strutils.

Disabled pep8 import checks for gettextutils to avoid raising 'H302:
import only modules.'

Change-Id: Ic815ca3df94c33edec9104172048b2cd94b92e3f
Closes-Bug: 1314129
2014-06-24 14:14:02 +02:00
Davanum Srinivas
d0254b736e Bump hacking to 0.9.x series
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.

Change-Id: I5711e066da1076486d291bc4f45359ecb26e1b1a
2014-06-12 09:53:40 -04:00
Doug Hellmann
0f1aeee7b2 Don't run python 3 tests by default
Remove py33 from the list of environments used when someone
runs "tox" without any arguments. The python 3.3 tests do
not pass yet, and the expected failure is confusing to new
contributors.

Change-Id: I1f1307153c4a32e59bcffbf340c31dbf3e70173c
2014-02-28 14:23:55 -08:00
Jeremy Hanmer
fb453e4f08 Convert to oslo.test
bp graduate-oslo-test

Change-Id: Iff1eebac011dab26468a7f1475b5c36b0bb2a7d2
2014-02-26 17:06:03 -08:00
Mark McLoughlin
03aafcb49c Simplify public symbol exports
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.
2013-06-24 12:52:30 +01:00
Mark McLoughlin
b5c41bba00 Add oslo.messaging project infrastructure 2013-06-15 08:43:50 +01:00