yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #05006
[Bug 1226482] Re: Support decorators in Ceilometer API methods
transferred to blueprint https://blueprints.launchpad.net/horizon/+spec
/ceilometer-api-statistics-decorators-and-convertors
** Changed in: horizon
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1226482
Title:
Support decorators in Ceilometer API methods
Status in OpenStack Dashboard (Horizon):
Invalid
Bug description:
Right now, the Ceilometer APi returns all statistics in their default
unit and format.
1. Be able to define decorators(or maybe name it filters, as this
naming is already used in Horizon) 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 decorator based on:
1.1 Unit
e.g. unit_decorators={"B": (float, to_gigabytes, lambda x: x + ' GB')} which will convert it to some float format and convert B to GB and add 'GB' string to the end
1.2 Meter name
e.g. decorators={'cpu'=> (to_hours,)}
2. Define default decorators, like always show GB instead of B. Though
that default decorators could be redefined in the specific list.
It would always use only 1 list of decorators, if there will be more decorators defined for a meter, based on their priority. Priorities from highest to lowest:
1. Meter name decorator
2. Unit decorator
3. Default decorator
!!! 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1226482/+subscriptions