Prevent alarm_id in query field of getting history

The ceilometer CLI support alarm_id in query field of getting alarm
history.
But it will raise error when invoking the db function get_alarm_changes.
Getting history of an alarm, the alarm id is required, so we needn't allow
the alarm_id in query field of getting alarm history.

Change-Id: I968b5bbcbc5af18a737b63598b63c1caa78d187e
Closes-bug: #1290809
Add note on aggregate duplication to API docco

Provide some additional clarity on allowable duplication
in the selectable aggregates passed to a statistics query.

Change-Id: If534e0667aa08fd531bbf31032e7648f7b80890c
Refactor the DB implementation of Capabilities API

Replace the update of DEFAULT_CAPABILITIES into the __init__ function in
the Connection class of base.py instead of the Connection class of each
DB driver.

The AVAILABLE_CAPABILITIES dict was divided into two case of MongoDB
and DB2 drivers, the common capabilities are listed in pymongo_base.py
in COMMON_AVAILABLE_CAPABILTIES, which is updated with the capabilities
dict of the two affected DB drivers using pymongo.

Change-Id: I244eabc64f985d5a7ab5e166c72bcdb88b7e3372
Updated from global requirements

Change-Id: Ifbcba030cd65ebae6cf81cc5f4d9da7616e413df
Sync oslo-incubator code

Sync code to commit: b7ad6ddab8b1d61bf4f52ccaa461a9d68809747b

The oslo db API have been changed, so sqlalchemy driver have been updated
to match these changes.
We now use sqlalchemy/migration.py from oslo.db instead of the
ceilometer one.
The unused alembic code have been removed, because it is handled by
oslo.db now.

Closes bug: #1293409

Change-Id: I480d678a7165f32b92c5c9b4c55491c0edbc0991
Allowed nested resource metadata in POST'd samples

Fixes bug 1302664

Previously, posting samples with nested metadata caused the mongo
driver to fail on the embedded period in a metadata key.

Now, we explicitly unwind the flattened resource metadata before
publishing the sample.

Change-Id: Ibb0980afc880218962328a9b7fe792015d58d1d2
Merge "Allowed nested resource metadata in POST'd samples"
Include instance state in metadata

Instance state is missing from the resource
metadata. This fix includes the status of
an instance in resource/samples so its part
of the resource metadata.

Change-Id: I76edf1c3dabeb0d591d010d4b1771cdba6b95d36
Implements: blueprint ceilometer-instance-state-measurement
Merge "Add note on aggregate duplication to API docco"
Merge "Prevent alarm_id in query field of getting history"
Merge "Updated from global requirements"
Refactored fake connection URL classes

Changed the way how DB tests are run to make them coope with concurrent
databases.
FakeUrl -> DbManager.
DbManager becomes a fixture that is able to create a separate DB
for each test and perform a cleanup action if needed (delete database)

This is a preparational work for adding new database backends.

Related to blueprint sql-unit-tests-on-real-backend

Change-Id: I7cbaa084df4a69c453347a45d884e8e808ac697d