X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/cabbf7ab8e35de060f6f4e3f75670558ad25d9b5..c51a587924139a9bb900735f02e0b2258ed6d239:/code/controls.py diff --git a/code/controls.py b/code/controls.py index 808c988..ff3691c 100644 --- a/code/controls.py +++ b/code/controls.py @@ -97,7 +97,7 @@ def createVm(username, state, owner, contact, name, memory, disksize, machine_ty # put stuff in the table transaction = ctx.current.create_transaction() try: - validation.Validate(username, state, owner=owner, memory=memory, disksize=disksize/1024.) + validation.Validate(username, state, name=name, owner=owner, memory=memory, disksize=disksize/1024.) res = meta.engine.execute('select nextval(' '\'"machines_machine_id_seq"\')') id = res.fetchone()[0] @@ -138,7 +138,7 @@ def createVm(username, state, owner, contact, name, memory, disksize, machine_ty def getList(): """Return a dictionary mapping machine names to dicts.""" value_string = remctl('web', 'listvms') - value_dict = yaml.load(value_string, yaml.SafeLoader) + value_dict = yaml.load(value_string, yaml.CSafeLoader) return value_dict def parseStatus(s):