Make entities (Resource, User, Project) able to store lists

When one Resource contains several meters we should store all of them.
The same is true about User, Project and Resource regarding sources.
To make it possible it is needed to change the way we store data in Hbase.

Now Resource, User and Project may contain several sources. Besides, Resource may contain several meters.
To store all of them we use ColumnFamily f and columns m_meters and s_sources.
All meters stored as JSON-ed list.
E.g.
resource_1: {f: {meters: [meter1, meter2, meter3]} }
The same for users and projects:
user_1: {f: [sources: [source_1, source_2]}

We cannot update these lists safely.

In this commit m_meters and s_sources are changed to m_{unique_meter_structure} and s_{unique_source_name}.
So we getting rid of 'lists' and may use safe put() method.
All meters in Resource and sources in User, Project, Resource are
stored with stub value=1 to make filtering simpler.

New ColumnFamilies are not introdused here because CF is a 'namespace' and make sence in case when
there is a lot of requests only for this CF. But it's not the case for Ceilometer: each request may
contain _id field or metadata filter. It's better to store all this info in one CF.

Closes bug 1288284

Change-Id: I5814202e3d59fd29f96c8734e445367f766e6a4a
Opencontrail network statistics driver

This patch introduces a network statistics driver
for Opencontrail. Only port statistics are currently
returned by the driver.

Implements: blueprint meter-from-opencontrail
Co-Authored-By: Edouard Thuleau <edouard.thuleau@cloudwatt.com>
Change-Id: Ic0afc478362fb4170903ee4e3723b82cd6c723fa
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
Synced jsonutils from oslo-incubator

The sync includes change that drastically enhances performance on Python
2.6 with fresh simplejson library installed.

The latest commit in oslo-incubator:
- 732bdb6297eb9de81667f7713ebcb1ccc2ee45a7

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
Replaced CONF object with url in storage engine creation

There is no need in passing CONF object deep down in hierarchy since
only 1 attribute from it is accessed.

Change-Id: I74783aad064b98e5d26184a3390c4186d12b4506
Initialize dispatcher manager in event endpoint

Dispatcher Manager is not a service, so moved it into the correct
namespace, this allows the event handler to initialize it correctly.

Closes-bug: #1314080
Change-Id: I02792eef2d49f1c6b15d144d97c8a4a280ca150f
Correcting formatting and adding period in measurement doc

Change-Id: Id53690ece12c3bf45334e0a74f408669ce830518
Removed StorageEngine class and it's hierarchy

This class doesn't have any logic in it so it can be safely removed

Change-Id: Iba3fe676df320a1d1cb48022f090df8d9e17b7aa
Adapt failing tests for latest wsme version

Some error message has been changed with the 0.6.1 wsme version due to
the fixed default value handling in wsme.

See 9c8a033415606667eca915c863165e5f9021bccb in wsme repo

Change-Id: I93b7138dcef1fb9e9b0d71661c8bc5a6344adb35
Closes-bug: #1315926
Corrections of spelling, rephrasing for clarity

Change-Id: Ie5ee9ab24267012c6b60a61b63c3522d06dc2759
oslo.messaging context must be a dict

oslo.messaging assume the context is a dict not a RequestContext
This patch ensure this.

Closes-bug: #1275771

Change-Id: Iae58d40f171d1d5780b74b747c26a74cca05b459
Correct class when stopping partitioned alarm eval svc

Avoid traceback on service shutdown by fixing tiny copy'n'paste
error in oslo-messaging switchover.

Change-Id: I5cf7e6f46ab1d982c59f8730eea1b8e7a3bd75e9
Closes-bug: #1317184
Revert "oslo.messaging context must be a dict"

This reverts commit 5df4cb53ae36ddb2a2495cc7aa9a1f3072133930.

The commit in question appears to have broken the notification agent
as an unintended side-effect. Reverting pending further investigation
as the notification agent is the more crucial component.

Related-to: #1317290
Change-Id: If9b1d638b60b7029c67f45e2e9feda62b9fd042a
Clean up openstack-common.conf

This patch clean up unused module and wrong module name.
The issues are detected by new change about update.py
in I68c0108304be8a315bcefe939c22019caab9bc98. This patch
doesn't depend the oslo-incubator patch.
 * remove unused module sslutils, versionutils
 * fix wrong module db.sqlachemy in openstack-common.conf

Change-Id: I55affbb398d97b1da8c15576ae1c54f27e6ad714
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
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
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