From e1a2d4427c9b225f203d6298f90570dcb5cf71c7 Mon Sep 17 00:00:00 2001 From: David Peraza Date: Thu, 12 Dec 2013 13:05:49 -0600 Subject: [PATCH] Add metadata query validation limitation There is currently no way to pre-determine the schema of resource_metadata. So it will be hard to validate when running a query. This patch includes this limitation in ceilometer documentation. Change-Id: I804467c3bb8e7d336ae881b25434063839951724 Partial-Bug: #1245367 --- doc/source/webapi/v2.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/source/webapi/v2.rst b/doc/source/webapi/v2.rst index e6e74fed0..c2cbeb1b9 100644 --- a/doc/source/webapi/v2.rst +++ b/doc/source/webapi/v2.rst @@ -62,7 +62,12 @@ type (for example, if you apply a filter on a query for statistics, you won't target *duration_start* field of *Statistics*, but *timestamp* field of *Sample*). You may also apply filters based on the values of one or more of the *resource_metadata* field, in which case you should target -*metadata.*. +*metadata.*. Notice, however, that given the free-form nature of +*resource_metadata* field, there is no practical or consistent way to +validate the query fields under *metadata* domain like it is done for all other +fields. In other words, the API call will return HTTP 200 in both scenarios: +when a query with *metadata.* does not match its value, and when +** itself does not exist in any of the records being queried. .. autotype:: ceilometer.api.controllers.v2.Query :members: