Add a wadl target to the documentation

Thanks to sphinxcontrib-docbookrestapi, the documentation for the REST API can
be automatically generated. Add a target to do this.

Change-Id: I9dda41bc00160bf1be1e275d9ac94a3a53571688
Handle the metrics sent by nova notifier

Nova compute node can now get metrics from monitors and send
notifications to message bus. So, add listeners to handle the
metrics in ceilometer. This patch changes the directory layout
for compute notifications, because there will be other metrics
(e.g. network and cache Qos) to be added. The deployer can also
add the metrics they want. It's better to make a classification
of these metrics.

Nova blueprint utilization-aware-scheduling

Change-Id: I6f54ef18035c437370360bbaff6d71666d0323fe
storage: factorize not implemented methods

There's a lot of driver that are not implementing everything, and as
time goes by, this is getting and going to be more and more common. Not
all drivers are suited to do everything, so implementing every methods
as abstract makes a lot of NotImplementedError raising redundant.

This patch makes stop using that and remove a lot of useless copy pasted
code.

Change-Id: I9e48c4f0484033061a3c3461d761e4cea4b8e75e
Sync config generator workaround from oslo

The following workaround avoid error when parsing duplicated config
options during config generation, see bug 1262148 for the details.

7c18261 Temporary workaround for config generator

Change-Id: Ia21afa53c5801f59dd361946716d8a18c389ada5
Add new meters for swift

    This patch adds new meters:
        -storage.containers.objects
        -storage.containers.objects.size.
    These meters are implemented through a polling Swift

blueprint: https://wiki.openstack.org/wiki/Ceilometer/blueprints/pollster-swift

Change-Id: Ic1f3aaf351db0b99392eb13d4f31f2732f87f816
Merge "storage: factorize not implemented methods"
Ensure we are not exhausting the sqlalchemy pool

Because of eventlet, notification messages can be consumed more quickly
that than they are wroted to the database, this have to effect to exhaust
the sqlalchemy connection pool and raise:

TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection
timed out, timeout 30

The patch creates a eventlet pool to ensure that the pool never exhausts
and prints a warning message in the log to inform that perhaps the pool
size need to be increased.

Fixes bug #1243251

Change-Id: I5ccdc141c441db32fab361783a31a96015516878
Add Event API

This commit adds v2/event_types, v2/events and
v2/events/*/traits. Currently, the event api is
limited to admin users, but is configurable in
the policy.json file. All users that are able to
access the event api can view all events in the
system, it is not restricted per project id.
Operators other than 'eq' have not yet been
implemented.

This change re-names the parameters in the
event_filter to class so they are more
end-user friendly.

implements bp specify-event-api

Change-Id: I0ccd4ef81cac5f8f57a450dc980ea85ff8fe89ec
Merge "Add Event API"
Merge "Ensure we are not exhausting the sqlalchemy pool"
Empty files should no longer contain copyright

Change-Id: Id314cd0ec658cb96cfc50493cd5bab10c2716714
Closes-Bug: #1262424
Allow customized reseller_prefix in Ceilometer middleware for Swift

Swift can be configured to use a different reseller prefix than AUTH_.
In this case Ceilometer returns None as resource_id.

This patch allows to set the reseller prefix, with a fallback to AUTH_
if not set. It also ensures that the reseller prefix ends with ``_``.
Two additional tests to verify this were added.

Change-Id: I1ba40091582da46c0385a71d1828bb3820a5e2b5
Closes-Bug: #1260965
Remove redundant code in nova_client.Client

'a and a or b' is equal to 'a or b', the redundant code can be
removed.

This patch also fixes the docstring of __init__, which actually
initializes a nova client object, not returns.

Change-Id: I0815928a2b597452048a1cc6c2170259a53ccaf9
Closes-Bug: #1264099
Add missing gettextutils import to ceilometer.storage.base

Change-Id: I1cea5f9032ffceac72cd441da81f197e7f66448d
Closes-Bug: #1265492
Utilizes assertIsNone and assertIsNotNone

Using assertEqual/assertNotEqual to test if an element
is or is not None is too python2.4.
Our unit testing framework supports assertIsNone and assertIsNotNone
which were created for these types of tests.

Change-Id: Ieba2d4ce5602885dc8a33a938a40f3086879b2c3
Change endpoint_type parameter

Replace endpoint_type parameter by os_endpoint_type parameter
expected by ceilometerclient.

Change-Id: I676247b289f8efa7c047a34dc9333361d094b024
Closes-Bug: #1257232
Avoid false negatives on message signature comparison

Fixes bug 1262255

Previously, samples for the 'instance.scheduled' meter were always
rejected with a false negative on the message signature verification.

The problem occured because certain resource metadata (such as the
block_device_mapping) in the 'scheduler.run_instance.scheduled'
notification are realized as a list of dict, and are thus similarly
encoded in the corresponding sample payload.

However the message signature computation then became indeterminate,
as the unicode representation of equivalent dicts is not guaranteed
equal (e.g. depends on insertion order in the case of hash collisions).

Now, we avoid false negatives by explicitly re-ordering insertion
into such dicts.

Change-Id: I77f7d89229518cf040608d7eb3307e2257bce07a
1st & last sample timestamps in Resource representation

Fixes bug 1262335

Previously, the first and last sample timestamps associated
with a resource were calculated by the storage driver, but
then discarded.

Now, we include these values in the API resource representation.

Change-Id: I3cf6081e1ac1294083f6326f85dabebab0d02203
Merge "Change endpoint_type parameter"
AlarmChange definition added to doc/source/webapi/v2.rst

Change-Id: I0c071a81ddd7a0e5a7083af9077ec20dce0a0b7c
Closes-Bug: #1266519