feat(sqlalchemy): add shards controller

This patch focuses on providing the shards controller for sqlalchemy.

As a bonus, a decorator is added that flags all methods that handles
all methods that raise a connection error.

The sqlalchemy driver passes all unit tests for the shards
controller. The initial suite is running on the sqlite engine.

A few general fixes have been applied:

- shards listing unit test now uses characters for names rather than
  numbers as strings to avoid sorting variations between storage
  engines
- cache.get_cache no longer takes a configOpts object

Change-Id: I7400884244be94f7600a5fb489b38c7058d36b31
Partially-Implements: blueprint: sql-storage-driver
feat(sql/catalogue): add catalogue controller

All unit tests passing.

Change-Id: I8871bfa162ab53bae5cecde956206978551b0554
Partially-Implements: blueprint: sql-storage-driver
Merge "feat(sqlalchemy): add shards controller"
Merge "feat(sql/catalogue): add catalogue controller"
Updated from global requirements

Change-Id: If75f151c4ffcd1c9cddb07d85c75242bc379b18c
Add an sqlalchemy storage to Marconi

Implements blueprint sql-storage-driver

Change-Id: I66452e1936646ca11366c574b6185b5e0badfdef
test(wsgi): Enable test_default_limits and fix UUID bug

The test_default_limits module was not being run. I remedied that, and
subsequently discovered that the fixture method, "_prepare_messages",
had a bug where it was not using a valid UUID for the "Client-ID" header.

Change-Id: I60d4ac76f50af110022e4f923c82cbdb16919e86
test(wsgi): Refactor tests in preparation for API v1.1

The tests were refactored into an inheritance model so that we can
share as much of the testing code as possible between v1.0 and v1.1.

As a part of this process, test class names were normalized and the
py3k check for keystone middleware was removed.

Change-Id: I04d342e2ce8bfd4fa0829935deb9b2753dd5af32
Partially-Implements: blueprint api-v1.1
fix(mongodb): Limit kwarg must be an int

It turns out that the limit kwarg in pymongo's find method doesn't revert to
a sensible default when "None" is passed.

Change-Id: I9070959cbcc003da49cccce33b28cc3100311f5c
Updated from global requirements

Change-Id: I1c01f4641c2f918310162144284aa68d57408bf5
Remove termios support (and associated issues)

This is to fix issues related to devstack, marconi-server was
crashing with no screen mode.

Change-Id: Ida12606f44d1c5b2bd981834858302f03df8ed96
Merge "Remove termios support (and associated issues)"
Merge "test(wsgi): Refactor tests in preparation for API v1.1"
Enable pragma foreign key for sqlite

Without this pragma, things like CASCADE won't work in sqlite.

Implements blueprint: sql-storage-driver

Change-Id: Ic24036b4b5105d1bf4e70cbf735d85a02fa2dc9a
Fix message's get and deletion

The message get was not returning the expected result. Also,
bulk_message deletion was not deleting messages due to a wrong
serialization of messages ids.

Implements blueprint: sql-storage-driver

Change-Id: I9d04dc9f615b4b1d408a710cc447cfc2ed098286
Register sqlalchemy endpoints

Sqlalchemy endpoints were missing in the setup.cfg entry_points list.

Implements blueprint: sql-storage-driver

Change-Id: I11b77e8c64fc9cb9e027799c7fb015e25e118c56
Don't raise `DoesNotExist` on claims deletion

We don't raise DoesNotExist when the queue that a claim has to be
deleted from does not exist.

Implements blueprint: sql-storage-driver

Change-Id: I2a3e11d493b066c5dae7af81db81989468e90726
Deprecate sqlite in favor of sqlalchemy

Since the default engine used by the new sqlalchemy driver is sqlite, it
doesn't make sense to keep the sqlite driver around. This patch replaces
all usages of `sqlite` with `sqlalchemy`.

Although sqlite is being deprecated, the patch keeps the entry point for
backwards compatibility so that environments currently using the sqlite
backend won't be suddenly broken.

Implement blueprint: sql-storage-driver

Change-Id: Ib7e32fa56ab0c6621dc9a888feb6b0e4981b4e91
Fix assertion for Testutils to check on sqlite://:memory:

The current uses sqlite://memory to test a connection. This is a faulty path to
memory. Corrent path is sqlite://:memory:

Change-Id: I950521f9b9c6aa8ae73be24121a836e84e409ca2
Merge "fix(mongodb): Limit kwarg must be an int"