Replace nosetests with testr in tox.ini.

Config tox.ini updated to run testr instead of nosetests.
File test-requirements.txt modified respectively.
Config .testr.conf added.

Testr allows for more flexible testing, more consistent use of the
unittest protocol and, most importantly, faster testing via parallelism.

Part of blueprint run-tests-script.

Change-Id: Iba847d430a18458a1a68e6ef07541d29c0c01c64
Remove the unused plugins framework

This framework was merged a year ago and AFAICT hasn't seen use beyond
the two initial wikimedia extensions for Nova.

The framework basically allows a way for a single plugin to register API
extensions and notification hooks. Both of these can be done by directly
using config opts like osapi_compute_extension and notification_driver
so this framework really only helps if we expected to (and wanted to)
lots of these plugins in the wild.

Nova is the only project using this and we don't have an active
maintainer listed in the MAINTAINERS file, so it seems like it's time to
remove it from the incubator.

Change-Id: I5552b5625e26f4821464807743545ec6f5117f2b
Optionally reject messages on exception.

Rather than blindly ack() all messages, consumers can be created
that reject() the message if an exception occurs in the callback.

Currently only implemented in kombu driver.

Change-Id: I308dd794b50966e3a189d31b2b51fdac36cd7d3a
Update kombu and anyjson

Update the kombu requirement based on the new
value in the global requirements list.

The new version of kombu we are using depends on
anyjson>=0.3.3.

Related to bug #1134575

Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>

Change-Id: I36211a2730bfc712e189d39893ab2af513ce3ba9
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Creates a new file TESTING.rst.

Creates a new file called TESTING.rst making the file discoverable.

Contents of the file include very generic instructions to get newcomers
started with testing. File also includes links, including the OpenStack
wiki page on testing, encouraging the curious to access greater options
for testing individual projects as well as greater flexibility in testing.

Change-Id: I57ab249133eccd38fa5302809e06172ed6a7d89e
Merge "Creates a new file TESTING.rst."
Merge "Update kombu and anyjson"
Merge "Optionally reject messages on exception."
Allow BaseTestCase use a different conf object

The new messaging work will register options like rpc_backend and, since
the existing RPC API registers those options with CONF, we need to run
the messaging tests with a different ConfigOpts object.

It's actually probably pretty sane for all unit tests to use a per-test
ConfigOpts object rather than cfg.CONF anyway.

The kombu and zmq tests have an issue with this where they rely on being
able to call self.config() before the base class setUp() is called.
Fixing this properly is a little tricky, so for now, initialize
self.conf early to cfg.CONF just for these tests.

Change-Id: I7b2e3db7c21c511f3ab16ac866e0cc80846cbd80
Do not raise NEW exceptions

Raising NEW exception is bad practice, because we lose TraceBack.
So all places like:

except SomeException as e:
    raise e

should be replaced by

except SomeException:
    raise

If we are doing some other actions before reraising we should
store information about exception then do all actions and then
reraise it. This is caused by eventlet bug. It lost information
about exception if it switch threads.

fixes bug 1191730

Change-Id: I7bce659591c4c3e4bc41e12d7d8390128c30e2e4
Enable H202 hacking check

There is no point to ignore this check because everything works
correctly without it.

Change-Id: I38b6f2314208b3bfb5898b2a08d7fe7c0f640e57
Merge "Remove the unused plugins framework"
Merge "Replace nosetests with testr in tox.ini."
Merge "Enable H202 hacking check"
Merge "Do not raise NEW exceptions"