From 1acdba7805c9af8696244e6a5c44c931afa0cc07 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 11 Nov 2008 04:32:17 -0500 Subject: [PATCH] Actually generalize the invirt.remctl module svn path=/trunk/packages/invirt-web/; revision=1614 --- code/controls.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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, -- 1.7.9.5