From: Evan Broder Date: Tue, 11 Nov 2008 09:32:17 +0000 (-0500) Subject: Actually generalize the invirt.remctl module X-Git-Tag: 0.0.9~14 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/1acdba7805c9af8696244e6a5c44c931afa0cc07 Actually generalize the invirt.remctl module svn path=/trunk/packages/invirt-web/; revision=1614 --- diff --git a/code/controls.py b/code/controls.py index 4576a2e..d895364 100644 --- a/code/controls.py +++ b/code/controls.py @@ -9,7 +9,7 @@ import yaml from invirt.config import structs as config from invirt.database import Machine, Disk, Type, NIC, CDROM, session, meta -from invirt.remctl import remctl +from invirt.remctl import remctl as gen_remctl # ... and stolen from xend/uuid.py def randomUUID(): @@ -23,6 +23,11 @@ def uuidToString(u): "%02x" * 6]) % tuple(u) # end stolen code +def remctl(*args, **kwargs): + return gen_remctl(config.remote.hostname, *args, + principal='daemon/'+config.web.hostname, + **kwargs) + def lvcreate(machine, disk): """Create a single disk for a machine""" remctl('web', 'lvcreate', machine.name,