From: Eric Price Date: Wed, 30 Jan 2008 04:47:34 +0000 (-0500) Subject: Update acls on creation and don't always through a spurious error X-Git-Tag: sipb-xen-www/1~16 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/38d0c57f7db6d593efd4048b6b91d0113b97781a Update acls on creation and don't always through a spurious error svn path=/trunk/web/; revision=265 --- diff --git a/controls.py b/controls.py index b6f6dec..7134668 100644 --- a/controls.py +++ b/controls.py @@ -10,6 +10,7 @@ import subprocess import sys import time import re +import cache_acls # ... and stolen from xend/uuid.py def randomUUID(): @@ -85,9 +86,6 @@ def bootMachine(machine, cdtype): elif err: raise CodeError('"%s" on "control %s create %s' % (err, machine.name, cdtype)) - else: - raise CodeError('"%s" on "control %s create %s' - % (err, machine.name, cdtype)) def registerMachine(machine): """Register a machine to be controlled by the web interface""" @@ -131,6 +129,7 @@ def createVm(owner, contact, name, memory, disk_size, is_hvm, cdrom): nic.hostname = name ctx.current.save(nic) ctx.current.save(disk) + cache_acls.refreshMachine(machine) transaction.commit() except: transaction.rollback()