Skip to content

Commit

Permalink
Return full vm list and use no pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Callum Williams committed Jan 29, 2016
1 parent 48d4874 commit 3ab4fd8
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions controllers/api/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -197,7 +192,7 @@ def GET(self, history=0, offset=0, size=1):
'token' : token
})

return json
return {"data":json}


'''
Expand Down

0 comments on commit 3ab4fd8

Please sign in to comment.