[openstack-dev] [telemetry][aodh] "aodh alarm list" vs "aodh alarm search"

gordon chung gord at live.ca
Mon Mar 7 12:37:31 UTC 2016



On 07/03/2016 3:15 AM, Julien Danjou wrote:
> On Fri, Mar 04 2016, liusheng wrote:
>
>> Hi folks,
>> Currently, we have supported "aodh alarm list" and "aodh alarm search" commands
>> to query alarms.  They both need mandatory "--type" parameter, and I want to
>> drop the limitation[1]. if we agree that, the "alarm list"  will only used to
>> list all alarms and don't support any query pamareters, it will be equal to
>> "alarm search" command without any --query parameter specified.  The "alarm
>> search" command is designed to support complex query which can perform almost
>> all the filtering query, the complex query has been supportted in Gnocchi.  IRC
>> meeting disscussions [3].
>>
>> So we don't need two overlapping interfaces and want to drop one, "alarm list"
>> or "alarm search" ?
>>
>> i. The "alarm search" need users to post a expression in JSON format to perform
>> spedific query, it is not easy to use and it is unlike a customary practice (I
>> mean the most common usages of filtering query of other openstack projects),
>> compare to "alarm list --filter xxx=zzz" usage.
>>
>> ii. we don't have a strong requirement to support *complex* query scenarios of
>> alarms, we only have alarms and alarm history records in aodh.
>>
>> iii. I personally think it is enough to support filtering query with "--filter"
>> which is easy to implement [2], and, we have plan to support pagination query
>> in aodh.
>>
>> any thoughts ?
>
> I agree that filtering is probably enough in Aodh use case.
>
> OTOH, we have support for complex query already merged in, and we can
> share the code with Gnocchi (and probably Ceilometer).
>
> `alarm list' is actually `GET /v2/alarms', which is very REST-y, so I
> don't think we should drop it.
>

shall we drop 'alarm search' nomenclature and use just 'alarm list' for 
both queries (standard and complex). the concern i have right now is the 
proposal is to add standard query support to 'alarm list' while complex 
query support is in 'alarm search'. this is very confusing especially 
because both commands use '--query' as their option input.

cheers,

-- 
gord


More information about the OpenStack-dev mailing list