summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1acdba7)
svn path=/trunk/packages/invirt-web/; revision=1615
return None
return out.strip()
return None
return out.strip()
+def vnctoken(machine):
+ """Return a time-stamped VNC token"""
+ out, err = remctl('control', machine.name, 'vnctoken')
+ if err:
+ return None
+ return out.strip()
+
def deleteVM(machine):
"""Delete a VM."""
remctl('control', machine.name, 'destroy', err=True)
def deleteVM(machine):
"""Delete a VM."""
remctl('control', machine.name, 'destroy', err=True)
from invirt.database import Machine, CDROM, session, connect, MachineAccess, Type, Autoinstall
from invirt.config import structs as config
from invirt.common import InvalidInput, CodeError
from invirt.database import Machine, CDROM, session, connect, MachineAccess, Type, Autoinstall
from invirt.config import structs as config
from invirt.common import InvalidInput, CodeError
-from invirt.remctl import remctl
def pathSplit(path):
if path.startswith('/'):
def pathSplit(path):
if path.startswith('/'):
"""
machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine
"""
machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine
- token = controls.remctl('control', machine.name, 'vnctoken').strip()
+ token = control.vnctoken(machine)
host = controls.listHost(machine)
if host:
port = 10003 + [h.hostname for h in config.hosts].index(host)
host = controls.listHost(machine)
if host:
port = 10003 + [h.hostname for h in config.hosts].index(host)