Return the memory available for a new machine.
"""
machines = invirt.database.Machine.query().filter_by(owner=owner)
- (quota_total, quota_single) = invirt.database.Owner.getQuotas(owner)
+ (quota_total, quota_single) = invirt.database.Owner.getMemoryQuotas(owner)
active_machines = [m for m in machines if m.name in xmlist]
mem_usage = sum([x.memory for x in active_machines])