Allow metering samples to be submitted directly to the ceilometer-api via a RESTful interface (as opposed to everything being collected over AMQP). Upstream blueprint: https://blueprints.launchpad.net/ceilometer/+spec/meter-post-api
Heat and Ceilometer tests will be performed mainly by Dev
How To Test =========== 0. Install packstack allinone in the usual way. 1. Submit a sequence of samples for a fabricated meter: for i in $(seq 5) do ceilometer sample-create -r foobar -m instance_likes \ --meter-type delta --meter-unit thumbs_up --sample-volume $i \ --resource-metadata '{"image_id": "cirros", "vcpus": "1", "display_name": "test_server", "ram": "512"}' \ --timestamp $(date -u +"%Y-%m-%dT%H:%M:%SZ") sleep 1 done 2. Ensure that the samples are all reported correctly: ceilometer sample-list -m instance_likes The correct number of samples should be reported, with the volumes in descending order. 3. Ensure that samples are aggregated as expected: ceilometer statistics ceilometer sample-list -m instance_likes Check that the aggregates reported are sane: count: 5 min: 1 max: 5 sum: sigma n (n <= 5) avg: 3 4. Ensure that the project and user IDs for the submitted samples can only be set to another indentity by admin: export OS_USERNAME=demo export OS_TENANT_NAME=demo export OS_PASSWORD=<DEMO_PASSWORD> ceilometer --debug sample-create -r foobar -m instance_likes \ --meter-type delta --meter-unit thumbs_up --sample-volume 6 \ --resource-metadata '{"image_id": "cirros", "vcpus": "1", "display_name": "test_server", "ram": "512"}' \ --timestamp $(date -u +"%Y-%m-%dT%H:%M:%SZ") \ --project-id foo --user-id bar Should fail with: ... {"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Invalid input for field/attribute project_id. Value: 'project_id'. can not post samples to other projects"}} WARNING (http:172) Request returned failure status. HTTPBadRequest (HTTP 400)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1859.html