Implement the /v2/samples/<sample-id> API
This is a simple implementation of the new sample endpoint in the API. It provides raw accesses to the samples collected by Ceilometer, without imposing any kind of filtering on the meter name. The patch is about retreiving only one sample with the id. The fields are also correctly named this time. Change-Id: Ifdd7f024b066407cd42ec0572385f97acd312125 Blueprint: sample-api
This commit is contained in:
@@ -159,6 +159,8 @@ def make_query_from_filter(session, query, sample_filter, require_meter=True):
|
||||
query = query.filter_by(project_id=sample_filter.project)
|
||||
if sample_filter.resource:
|
||||
query = query.filter_by(resource_id=sample_filter.resource)
|
||||
if sample_filter.message_id:
|
||||
query = query.filter_by(message_id=sample_filter.message_id)
|
||||
|
||||
if sample_filter.metaquery:
|
||||
query = apply_metaquery_filter(session, query,
|
||||
|
||||
Reference in New Issue
Block a user