diff options
| author | RongzeZhu <zrzhit@gmail.com> | 2012-09-02 18:43:56 +0800 |
|---|---|---|
| committer | RongzeZhu <zrzhit@gmail.com> | 2012-09-05 17:44:13 +0800 |
| commit | 869443f41c8826c9a4de1dcc65c5a5354b623a04 (patch) | |
| tree | 6d47450475ac0c495885a716d2e7fd95a16285cb /nova/node.py | |
| parent | 84c62b35ff349ff0301eed36f765031d400e6c24 (diff) | |
Fix simple_tenant_usage's handing of future end times
Fixes bug #1043999
simple_tenant_usage returns the usage in the range between the supplied
start and end query parameters. The _hours_for() method calculates the
number of hours the instance was running in this range, even if the end time
is in the future.
By default, python-novaclient requests usage between 4 weeks ago and tomorrow.
This means we a report which accounts for 24 hours of extra running time for
each currently running instance. Fix this by clamping the period of the
returned report at the current time.
Change-Id: I61c211fd85b729aaeaac6ef24644ee19eb5bb6b0
Diffstat (limited to 'nova/node.py')
0 files changed, 0 insertions, 0 deletions
