Commit 658090bb authored by Simon Leinen's avatar Simon Leinen

Don't count volumes as instances

parent 14540652
......@@ -229,7 +229,9 @@ class UsageAnalyzer:
try:
s = ne.servers.get(server.id)
f = self.get_flavor(s.flavor['id'], r)
self.note_usage(s.tenant_id, r, s.status, ram=f.ram, vcpus=f.vcpus, disk=f.disk)
self.note_usage(s.tenant_id, r,
s.status,
ram=f.ram, vcpus=f.vcpus, disk=f.disk)
except NotFound as c:
warn("Instance {:s} disappeared".format(server.id))
......@@ -241,7 +243,9 @@ class UsageAnalyzer:
for volume in volumes:
try:
v = ce.volumes.get(volume.id)
self.note_usage(v._info['os-vol-tenant-attr:tenant_id'], r, v.status, ram=0, vcpus=0, disk=v.size)
self.note_usage(v._info['os-vol-tenant-attr:tenant_id'], r,
v.status,
instances=0, ram=0, vcpus=0, disk=v.size)
except NotFound as c:
warn("Volume {:s} disappeared".format(volume.id))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment