TURBOYAML!!1
[invirt/packages/invirt-web.git] / code / controls.py
index 79aa311..d4afab0 100644 (file)
@@ -137,13 +137,11 @@ def createVm(owner, contact, name, memory, disk_size, machine_type, cdrom, clone
     bootMachine(machine, cdrom)
     return machine
 
-def getList(machines):
-    """Return a dictionary mapping machine  to dicts."""
+def getList():
+    """Return a dictionary mapping machine names to dicts."""
     value_string = remctl('web', 'listvms')
-    value_dict = yaml.safe_load(value_string)
-
-    d = dict((m, value_dict[m.name]) for m in machines if m.name in value_dict)
-    return d
+    value_dict = yaml.load(value_string, yaml.CSafeLoader)
+    return value_dict
 
 def parseStatus(s):
     """Parse a status string into nested tuples of strings.