-
Committer:
Anthony Young
-
Date:
2011-08-22 21:08:03 UTC
-
Revision ID:
sleepsonthefloor@gmail.com-20110822210803-xkfkzq7ktuu4mgxb
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.