From 602b0bb2a5afc374482d3018398fc6c047703943 Mon Sep 17 00:00:00 2001 From: Peter Iannucci Date: Tue, 17 Feb 2009 02:16:12 -0500 Subject: [PATCH] Made some changes requested by Broder. svn path=/trunk/packages/invirt-remote/; revision=2135 --- debian/changelog | 6 ++++++ server/usr/sbin/invirt-remote-create | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 069d9a8..3d12870 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-remote (0.3.5) unstable; urgency=low + + * updated quota support to refer to renamed owner table columns + + -- Peter A. Iannucci Tue, 17 Feb 2009 02:13:44 -0500 + invirt-remote (0.3.4) unstable; urgency=low * modified host/usr/sbin/invirt-availability and invirt-vmcontrol to stat diff --git a/server/usr/sbin/invirt-remote-create b/server/usr/sbin/invirt-remote-create index 3ec70a5..add3113 100755 --- a/server/usr/sbin/invirt-remote-create +++ b/server/usr/sbin/invirt-remote-create @@ -23,7 +23,7 @@ def maxMemory(owner, xmlist): active_machines = [m for m in machines if m.name in xmlist] mem_usage = sum([x.memory for x in active_machines]) - return min(quota_single, quota_total-mem_usage) + return min(quota_single, quota_total - mem_usage) def choose_host(): # Query each of the hosts. @@ -37,7 +37,9 @@ def main(argv): operation = argv[1] machine_name = argv[2] args = argv[3:] - + + invirt.database.connect() + if operation == 'install': options = dict(arg.split('=', 1) for arg in args) valid_keys = set(('mirror', 'dist', 'arch', 'imagesize', 'noinstall')) @@ -62,7 +64,6 @@ def main(argv): return 1 if operation == "create": - invirt.database.connect() machine = invirt.database.Machine.query().filter_by(name=machine_name).first() owner = machine.owner -- 1.7.9.5