Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1042000 - [RFE][horizon]: Ceilometer API statistics Decorators and Unit convertors
[RFE][horizon]: Ceilometer API statistics Decorators and Unit convertors
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity medium
: Upstream M1
: 7.0 (Kilo)
Assigned To: RHOS Maint
Ido Ovadia
https://blueprints.launchpad.net/hori...
upstream_milestone_kilo-1 upstream_st...
: FutureFeature, OtherQA, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-12 15:30 EST by RHOS Integration
Modified: 2015-08-05 09:11 EDT (History)
6 users (show)

See Also:
Fixed In Version: python-django-horizon-2015.1.0-7.el7ost
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-05 09:11:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1548 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2015-08-05 13:07:06 EDT

  None (edit)
Description RHOS Integration 2013-12-12 15:30:36 EST
Cloned from launchpad blueprint https://blueprints.launchpad.net/horizon/+spec/ceilometer-api-statistics-decorators-and-convertors.

Description:

Right now, the Ceilometer API statistics methods returns all statistics in their default unit and format.

We should be able to define decorators(or maybe name it filters, as this naming is already used in Horizon) and unit convertors for the meters for the statistics list, so we can easily define that cpu should be decorated as 12.3days, instead of 1... ns

We should be able to define:
1. Decorators based on Meter names
e.g. decorators={'cpu': (float, lambda x: x + ' GB')} which will convert it to some float format and add 'GB' string to the end
1.1. Define default decorators for each Meter name
default decorators can be redefined by 1. for specific statistics

2. Unit conversion based on Meter name
e.g. conversions={'cpu'=> 'Days', 'memory'=> 'GB'}
2.1 Default conversions for each meter name
default conversions can be redefined by 2. for specific statistics

The order of applying will be: first Conversion, then Decorating

!!! important
As the decorator will be changing a unit, I need to be able to obtain the unit back.
So it has to be somehow connected to this https://bugs.launchpad.net/horizon/+bug/1226479

Probably, every meter statistic should hold a object of the Meter, that contains the current Unit. After converting the meter statistic to another unit, we should change the Meter object unit.

So e.g. the to_hours convert method could obtain the original unit from Class definition of the cpu Meters. The current unit would be available in the Meters object that holds the cpu.

Looking back, it might be better to not join decorator and converting logic.

Converting logic could reside in Meters class.

Specification URL (additional information):

None
Comment 7 errata-xmlrpc 2015-08-05 09:11:03 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1548

Note You need to log in before you can comment on or make changes to this bug.