From 3ab4fd8efdf76c215fae15d3ccc9b387808ac353 Mon Sep 17 00:00:00 2001 From: Callum Williams Date: Fri, 29 Jan 2016 16:04:32 +0000 Subject: [PATCH] Return full vm list and use no pagination --- controllers/api/vm.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/controllers/api/vm.py b/controllers/api/vm.py index c9ced7dc..7b393c0f 100644 --- a/controllers/api/vm.py +++ b/controllers/api/vm.py @@ -113,20 +113,15 @@ def GET(self, history=0, offset=0, size=1): HEADNODE = cherrypy.request.config.get("headnode") FEDID = cherrypy.request.cookie.get('fedid').value SESSION = cherrypy.request.cookie.get('session').value - SHOWALL = cherrypy.request.cookie.get('showall').value - if SHOWALL == "true": - show_vms = -2 - else : - show_vms = -3 server = xmlrpclib.ServerProxy(HEADNODE) request = [ - "%s:%s"%(FEDID,SESSION), # auth token - show_vms, # show only user's VMs or group VMs - int(offset), # offest for pagination - -1 * int(size), # number of entries to return - -1 if history == 0 else -2 # show either active or all VMs + "%s:%s"%(FEDID,SESSION), # auth token + -2, # show only user's VMs or group VMs + 0, # offest for pagination + -1, # number of entries to return + -1 if history == 0 else -2 # show either active or all VMs ] response = server.one.vmpool.info(*request) validateresponse(response) @@ -197,7 +192,7 @@ def GET(self, history=0, offset=0, size=1): 'token' : token }) - return json + return {"data":json} '''