Check if samples returned by get_sample_data are not None

Check if samples returned by the method get_sample_data
of a network statistics driver are not None.
As described in the docstring of the abstract method
if a driver is not able to return samples for a meter_name
it has to return None.

Closes-bug: #1304327
Change-Id: Id4b2000adc20078631cb8ce1ed7f84fce1a3165d
mongo: remove _id in inserted alarm changes

This change ensures that mongodb driver doesn't modify the alarm changes
dictionary when we insert a new alarm changes. To avoid the insertion
of the internal '_id' of mongodb.

Change-Id: I9bcd643c9dc55449141cee94ef6826784e81e4e5
Fix network notifications of neutron bulk creation

When bulk creating ports, networks, subnets in neutron,
ceilometer-notification-agent will be broken and raise an KeyError.

Change-Id: Id5737f8ec8aa46561fe66bd56251d2a8d55f2548
Closes-Bug: #1317900
Drop deprecated api v1

API v1 is deprecated since havana,
so remove it now.

Change-Id: If147d018ee571087eb3c11be6e1e66d9ab66cb22
Merge "mongo: remove _id in inserted alarm changes"
oslo.messaging context must be a dict

oslo.messaging assumes the context is a dict not a RequestContext
and it assumes the payload in json serializable.

This patch ensures this.

Also it removes oslo.messaging mock on some tests and use real oslo.messaging
library with the fake driver.

Change-Id: Ie3c6083bbc4ec83de28e42bb10e7c50c7e135070
Closes-bug: #1275771
Closes-bug: #1317290
Updated from global requirements

Change-Id: I7edbbb540599bbf51e07cffab1ebb058d88449ff
Merge "Updated from global requirements"
Remove unused db code due to api v1 drop

This changes remove the user and project tables that was only used by the
ceilometer v1 API.

Co-Authored-By: Ala Rezmerita <ala.rezmerita@cloudwatt.com>

Change-Id: I1d9dda48f30dc95e7c377a4eb446cdd895595754
switch SplitResult to use six

SplitResult included in six 1.6, switch to use six.

Change-Id: I5a61c0ab74899fcbfc2405488bfce5bd1de96dd0
Remove all mostly untranslated PO files

We only import PO files that are at least 75 % translated,
so we can delete now all other PO files. The patch only
removes the mostly untranslated files. Once a file becomes mostly
translated, the bot will import it again.

This removes all languages besides en_US.

Change-Id: Ic6d9b36a04260a2dd2f605379b847e0165449ce8
Closes-Bug: #1317794
Use None instead of mutables in method params defaults

Mutables in the method params defaults might cause errors and
that's why it's anti-pattern in most of the cases and should be
removed.

Change-Id: Ifb59a16c927a4bc285f7b70fac87f719054020f4
Use joins instead of subqueries for metadata filtering

Previously, Ceilometer used subqueries to apply metadata filters. These
subqueries, however, defeated MySQL's query optimizer, leading to absurdly
bad performance. In our production setup, this patch improved performance on
two metadata filters by up to 10000x.

Change-Id: Ie3bea14d05fb63a5565e2d5cced74068955b8f08
Closes-bug: #1320772
Merge "Remove all mostly untranslated PO files"
Implemented metering for Cinder's snapshots

Cinder already publishes the required notifications, but Ceilometer
wasn't recording them. This patch fixes that.

Closes-Bug: #1316670

Change-Id: I53532d1833db2f22a803bf77e548f5d3b095a30f
Merge "Check if samples returned by get_sample_data are not None"
Merge "Implemented metering for Cinder's snapshots"
Merge "Use None instead of mutables in method params defaults"
Update testrepository configuration

This change is a copy of nova testrepository configuration file.

Since we use oslo.test we can now record the stdout and stderr of each
test and print them only is a test fail. This also ensure the printed
log is located into the failing tests.

It also sets a timeout of 160 for each test instead of waiting
indefinitely.

Change-Id: If8e847643d7812a3e595faff171cdc094f5642f4
Merge "Fix network notifications of neutron bulk creation"