Return the memory available for a new machine.
"""
machines = invirt.database.Machine.query().filter_by(owner=owner)
Return the memory available for a new machine.
"""
machines = invirt.database.Machine.query().filter_by(owner=owner)
active_machines = [m for m in machines if m.name in xmlist]
mem_usage = sum([x.memory for x in active_machines])
active_machines = [m for m in machines if m.name in xmlist]
mem_usage = sum([x.memory for x in active_machines])
if operation == 'install':
options = dict(arg.split('=', 1) for arg in args)
valid_keys = set(('mirror', 'dist', 'arch', 'imagesize', 'noinstall'))
if operation == 'install':
options = dict(arg.split('=', 1) for arg in args)
valid_keys = set(('mirror', 'dist', 'arch', 'imagesize', 'noinstall'))