From 38d0c57f7db6d593efd4048b6b91d0113b97781a Mon Sep 17 00:00:00 2001 From: Eric Price Date: Tue, 29 Jan 2008 23:47:34 -0500 Subject: [PATCH] Update acls on creation and don't always through a spurious error svn path=/trunk/web/; revision=265 --- controls.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() -- 1.7.9.5