The openstack_dashboard.utils.metering ModuleΒΆ

class openstack_dashboard.utils.metering.MeterQuery(*args, **kwargs)[source]

Bases: openstack_dashboard.utils.metering.ProjectAggregatesQuery

query(meter)[source]
class openstack_dashboard.utils.metering.ProjectAggregatesQuery(request, date_from, date_to, period=None, additional_query=None)[source]

Bases: object

query(meter)[source]
openstack_dashboard.utils.metering.calc_date_args(date_from, date_to, date_options)[source]
openstack_dashboard.utils.metering.calc_period(date_from, date_to, number_of_samples=400)[source]
openstack_dashboard.utils.metering.get_resource_name(request, resource_id, resource_name, meter_name)[source]
openstack_dashboard.utils.metering.get_unit(meter, request)[source]
openstack_dashboard.utils.metering.normalize_series_by_unit(series)[source]

Transform series’ values into a more human readable form: 1) Determine the data point with the maximum value 2) Decide the unit appropriate for this value (normalize it) 3) Convert other values to this new unit, if necessary

openstack_dashboard.utils.metering.series_for_meter(request, aggregates, group_by, meter_id, meter_name, stats_name, unit, label=None)[source]

Construct datapoint series for a meter from resource aggregates.

Previous topic

The openstack_dashboard.templatetags Module

Next topic

The openstack_dashboard.utils Module

Project Source

This Page