diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-09-01 00:16:34 +0000 |
---|---|---|
committer | Tarmac <> | 2011-09-01 00:16:34 +0000 |
commit | 65231ec1b9296bb26544d414e3033c9058ba07b7 (patch) | |
tree | a07dc22352352b7599433b8cf46a6d857777ec7e /nova/context.py | |
parent | 3bc7a44dad3233595beb20b63204f16f1cb4376e (diff) | |
parent | 0f83de82b93d714be6df16b7f151141ab3f4d987 (diff) | |
download | nova-65231ec1b9296bb26544d414e3033c9058ba07b7.tar.gz nova-65231ec1b9296bb26544d414e3033c9058ba07b7.tar.xz nova-65231ec1b9296bb26544d414e3033c9058ba07b7.zip |
Simple usage extension for nova. Uses db to calculate tenant_usage for specified time periods.
Methods:
* index: return a list of tenant_usages, with option of incuding detailed server_usage
* show: returns a specific tenant_usage object
tenant_usage object:
* tenant_usage.total_memory_mb_usage: sum of memory_mb * hours for all instances in tenant for this period
* tenant_usage.total_local_gb_usage: sum of local_gb * hours for all instances in tenant for this period
* tenant_usage.total_vcpus_usage: sum of vcpus * hours for all instances in tenant for this period
* tenant_usage.total_hours: sum of all instance hours for this period
* tenant_usage.server_usages: A detailed list of server_usages, which describe the usage of a specific server
For larger instances db tables, indexes on instance.launched_at and instance.terminated_at should significantly help performance.
Diffstat (limited to 'nova/context.py')
0 files changed, 0 insertions, 0 deletions