From: Evan Broder Date: Sun, 1 Jun 2008 22:49:03 +0000 (-0400) Subject: Switch to using YAML on the web interface for listvms X-Git-Tag: sipb-xen-www/3.4~2 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/966553f52ce277810245551803109ba11014d72e Switch to using YAML on the web interface for listvms svn path=/trunk/packages/sipb-xen-www/; revision=550 --- diff --git a/code/controls.py b/code/controls.py index 841d21b..79aa311 100644 --- a/code/controls.py +++ b/code/controls.py @@ -11,7 +11,7 @@ import sys import time import re import cache_acls -import cPickle +import yaml # ... and stolen from xend/uuid.py def randomUUID(): @@ -139,8 +139,8 @@ def createVm(owner, contact, name, memory, disk_size, machine_type, cdrom, clone def getList(machines): """Return a dictionary mapping machine to dicts.""" - value_string = remctl('web', 'listvms', '--pickle') - value_dict = cPickle.loads(value_string) + 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