From: Eric Price Date: Tue, 27 Nov 2007 07:06:29 +0000 (-0500) Subject: Makes deleting VMs work with the access controls. X-Git-Tag: sipb-xen-www/1~31 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/77269356e0e57b5e35fec45eb5fa235dfcc821d5 Makes deleting VMs work with the access controls. svn path=/trunk/web/; revision=247 --- diff --git a/controls.py b/controls.py index 4099d3b..620402b 100644 --- a/controls.py +++ b/controls.py @@ -201,6 +201,8 @@ def deleteVM(machine): ctx.current.save(nic) for disk in machine.disks: ctx.current.delete(disk) + for access in machine.users: + ctx.current.delete(access) ctx.current.delete(machine) transaction.commit() except: diff --git a/main.py b/main.py index e8d199d..d4ae1c5 100755 --- a/main.py +++ b/main.py @@ -13,7 +13,6 @@ import sys import time from StringIO import StringIO - def revertStandardError(): """Move stderr to stdout, and return the contents of the old stderr.""" errio = sys.stderr @@ -641,7 +640,7 @@ if __name__ == '__main__': if not operation: operation = 'list' - #main(operation, u, fields) - import profile - profile.run('main(operation, u, fields)', 'log-'+operation) + main(operation, u, fields) + #import profile + #profile.run('main(operation, u, fields)', 'log-'+operation)