Skip to content

Commit 3ab4fd8

Browse files
author
Callum Williams
committed
Return full vm list and use no pagination
1 parent 48d4874 commit 3ab4fd8

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

controllers/api/vm.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,15 @@ def GET(self, history=0, offset=0, size=1):
113113
HEADNODE = cherrypy.request.config.get("headnode")
114114
FEDID = cherrypy.request.cookie.get('fedid').value
115115
SESSION = cherrypy.request.cookie.get('session').value
116-
SHOWALL = cherrypy.request.cookie.get('showall').value
117-
if SHOWALL == "true":
118-
show_vms = -2
119-
else :
120-
show_vms = -3
121116

122117
server = xmlrpclib.ServerProxy(HEADNODE)
123118

124119
request = [
125-
"%s:%s"%(FEDID,SESSION), # auth token
126-
show_vms, # show only user's VMs or group VMs
127-
int(offset), # offest for pagination
128-
-1 * int(size), # number of entries to return
129-
-1 if history == 0 else -2 # show either active or all VMs
120+
"%s:%s"%(FEDID,SESSION), # auth token
121+
-2, # show only user's VMs or group VMs
122+
0, # offest for pagination
123+
-1, # number of entries to return
124+
-1 if history == 0 else -2 # show either active or all VMs
130125
]
131126
response = server.one.vmpool.info(*request)
132127
validateresponse(response)
@@ -197,7 +192,7 @@ def GET(self, history=0, offset=0, size=1):
197192
'token' : token
198193
})
199194

200-
return json
195+
return {"data":json}
201196

202197

203198
'''

0 commit comments

Comments
 (0)