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
Use the list when get information from libvirt

If the libvirt adds new elements to the domain info struct or others,
when use the new libvirt, there will be a valueError (too many values
to unpack). When we get information from libvirt, we should use the
original variable format. This change is for compatibility with upcoming
versions of libvirt which change this signature.

Change-Id: I885a48b730acd618e7cefc93cee3d69226575b7c
Closes-Bug: #1291805
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
Fix Jenkins translation jobs

The jobs ceilometer-propose-translation-update and
ceilometer-upstream-translation-update do not update from
transifex since our po files contain duplicate entries where
obsolete entries duplicate normal entries.

Remove all obsolete entries to fix the jobs.

Add test to pep8 that checks that no new breakages get
introduced.

Change-Id: I3d7d04a7d5d073d5123f1f7b1e16fd3ef167acfb
Closes-Bug: #1299349
Merge "Fix Jenkins translation jobs"
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
Disable specifying alarm itself in combination rule

Currently, update combination alarm can specify itself in alarm_ids,
however, that will cause endless loop when evaluating this alarm.

This patch adds a check to disable such behavior.

Change-Id: I63b465c59fe39206ae04b0736482d1ffd7bf59c4
Closes-Bug: #1304419
Removes direct access of timeutils.override_time

The attribute "override_time" is a private attribute which
should only be set through "timeutils.set_time_override()".
There are a number of places in Ceilometer which the override_time
attribute is set directly and such behavior should be prohibited.

However the "set_time_override()" function along with "override_time"
in timeutils is planned to be removed, therefore we no longer
need to use it.

Change-Id: I6f3a5e0bb4e4c448f369dd5ead0e1525fd2262e6
Related-Bug: #1266962
Merge "Add note on aggregate duplication to API docco"
Merge "Prevent alarm_id in query field of getting history"
Merge "Updated from global requirements"
Replace assert statements with assert methods

Some of the test methods were using python assert
statements for making assertions. This patch replaces
those statements with apropriate assert methods.

Change-Id: I3fcf4253560474868a0b32a7994f446e7b4bcc67
Closes-bug: #1303124
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
Removed useless code from __init__ method

This code is not needed in production code

Change-Id: Ic1e8e94671070a9dea7c50ea914fe4864210c6c1
fix statistics query in postgres

when aggregate functions present, postgres requires all
non-aggregate columns selected to be included in group by clause
to ensure a single value is selected.

Change-Id: Iccbcd8046cca872e8eba472f48fa392114f34426
Closes-Bug: #1256318