Pull the vnctoken remctl into the controls module
[invirt/packages/invirt-web.git] / code / controls.py
index d895364..5512f66 100644 (file)
@@ -171,6 +171,13 @@ def listHost(machine):
         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)