Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

what is usage of additional_query in utils/ceilometer

In class ProjectAggregatesQuery they are using additional query and {'field': 'timestamp', 'op': 'ge', 'value': date_from}. What is timestamp, op.

Please see the following link.

https://github.com/openstack/horizon/blob/master/openstack_dashboard/utils/metering.py#L181-L189

class ProjectAggregatesQuery(object):
   def __init__(self, date_from, date_to,
                 period=None, additional_query=[]):
        if not period:
            #print('if not period, period=', period) # It is not running 
            period = calc_period(date_from, date_to)
        if date_from:
            additional_query.append({'field': 'timestamp',
                                     'op': 'ge',
                                     'value': date_from})
        if date_to:
            additional_query.append({'field': 'timestamp',
                                     'op': 'le',
                                     'value': date_to})