Provide the meters unit's in /meters

 * change pollsters and notification handlers to report units
 * modify db storage to store units in counters

Change-Id: Ibd7e52623b84d26ca7bbc9f260c20fdf1d61a4bc
Implements: blueprint provide-meter-units
Enhance policy test for init()

As suggested by Doug, let's write real data and see if they were read.

Change-Id: If709b36634b4352ce7e5a3d40b58bfba0f9ae91d
Signed-off-by: Julien Danjou <julien@danjou.info>
Merge "Provide the meters unit's in /meters"
Merge "Enhance policy test for init()"
Remove leftover useless import

Change-Id: I09b6ba227f3dddfeb64f4af01ee617f19fef1e43
Signed-off-by: Julien Danjou <julien@danjou.info>
Update pep8 to 1.3.3

This is needed to update openstack.common

Change-Id: I8410f978f38b3893b71239f97f785086ca5faffe
Signed-off-by: Julien Danjou <julien@danjou.info>
Peg the version of Ming used in tests

Up until today we have needed to use a git checkout of Ming
to get some changes we pushed upstream but that were not
released. Release 0.3.2 includes all of our changes, so we
can now update our requirements to use it and stop using
the git head.

Change-Id: I4a3c242259c279b1e1be86d280572dd8cd26e84e
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Fixes a minor documentation typo

bug #1100107

Change-Id: Iaf1bf16abb54e643c65752e25f2a4ce70ccdec84
Add Kwapi pollster (energy monitoring).

Given that my blueprint is not publicly available, I summarize it here.

Kwapi (kilowatt API) contains the following modules:
- Drivers: receive values from wattmeters and forward them on a bus (ZeroMQ).
Wattmeter drivers are specific to each wattmeters (Wattsup, OmegaWatt, etc).
- Plugins: listen the bus and process received data.
Currently, there is two plugins: the ceilometer plugin (REST API) and a visualization plugin (build graphs with RRDtool).

Kwapi is part of the XLcloud project (HPC cloud).
http://www.xlcloud.org

Repository:
https://github.com/stackforge/kwapi

Change-Id: Ieaaa1db9c8c569b6ee9f0815e03879f8b3f3e282
Merge "Add Kwapi pollster (energy monitoring)."
Remove the ImageSizePollster

We can use generator to achieve this purpose simply.

Change-Id: Id05c33fb2aa89fd02035c717417d0181e975c3ec
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
Merge "Peg the version of Ming used in tests"
Update WebOb version specification

Now that the other projects are using WebOb>=1.2 we can
specify that, too.

See bug #1092227 for details.

Change-Id: Ifcb99354f405d9f4dc113d01d83b2a9d76660fc5
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Update v2 API for WSME code reorg

The files in the WSME library were rearranged
so we need to update some of our imports.

Change-Id: Ie3056483bc4011d3c84d8e033e9064f3c6e1efcd
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Merge "Remove leftover useless import"
Merge "Remove the ImageSizePollster"
Merge "Update WebOb version specification"
Flatten the v2 API

This is a squashed commit of work done by Doug and myself.
Thanks Doug!

Author: Angus Salkeld <asalkeld@redhat.com>

    Add a Statistics class
    Note this is a bit different to the spec
    (http://wiki.openstack.org/Ceilometer/blueprints/APIv2)
    As wsme doen't really like different types been returned from
    the same method.

    I have:
    GET /v2/meters/<meter> - raw samples
    GET /v2/meters/<meter>/statistics - for the stats

    Make the error reporting better for invalid fields
    Try and protect from passing in the wrong arguments into the db api
    Also get_resources() takes start/stop_timestamp not start/stop.
    Fix most of the duration test cases (overlapping ones are still broken)
    Add some log messages to warn of unimplemented queries
    Fix the start/end timestamp passed into calc_duration()
    Make the query op default to 'eq'
    Fix v2 event list paths
    Remove v2 list projects tests
    Re-Add the duration
    Implement get_meter_statistics() for sqlalchemy.
    Add tests for get_meter_statistics()
    Fix the latest pep8 1.4 issues

Author: Doug Hellmann <doug.hellmann@dreamhost.com>
    fixme comment
    Fix duration calculation
    fix event listing tests
    remove obsolete list tests
    update resource listing tests
    remove obsolete list tests
    fix max statistics tests for projects
    fix max tests for resource queries
    fix tests for stats using project filter
    Fix sum tests for resource queries
    Fix the statistics calculation in the mongo driver to handle getting
    no data back from the query.
    Update the queries in the test code.
    enable logging for wsme in the tests to help with debugging
    always include all query fields to keep values aligned
    only include the start and end timestamp keywords wanted by the EventFilter
    update url used in acl tests
    update tests for listing meters
    convert prints to logging calls and add a few todo/fixme notes
    add some debugging and error checking to _query_to_kwargs
    add q argument to get_json() to make it easier to pass queries to the service
    do not stub out controller we have deleted
    fix whitespace issues to make pep8 happy

Change-Id: I1b9a4c26fb8cc74ae1a002f93b84db05d0b20192
Blueprint: api-aggregate-average
Blueprint: api-server-pecan-wsme
Remove useless imports

Change-Id: I8be8a72905d8483f092c98d10bc1da25b7b50e19
Signed-off-by: Julien Danjou <julien@danjou.info>
Merge "Flatten the v2 API"