Revision 7a95a954 lib/rapi/rlib2.py
b/lib/rapi/rlib2.py | ||
---|---|---|
281 | 281 |
|
282 | 282 |
|
283 | 283 |
class R_2_nodes_name_migrate(baserlib.R_Generic): |
284 |
"""/2/nodes/[node_name]/evacuate migrate.
|
|
284 |
"""/2/nodes/[node_name]/migrate resource.
|
|
285 | 285 |
|
286 | 286 |
""" |
287 | 287 |
def POST(self): |
... | ... | |
296 | 296 |
return baserlib.SubmitJob([op]) |
297 | 297 |
|
298 | 298 |
|
299 |
class R_2_nodes_name_storage(baserlib.R_Generic): |
|
300 |
"""/2/nodes/[node_name]/storage ressource. |
|
301 |
|
|
302 |
""" |
|
303 |
# LUQueryNodeStorage acquires locks, hence restricting access to GET |
|
304 |
GET_ACCESS = [rapi.RAPI_ACCESS_WRITE] |
|
305 |
|
|
306 |
def GET(self): |
|
307 |
node_name = self.items[0] |
|
308 |
|
|
309 |
storage_type = self._checkStringVariable("storage_type", None) |
|
310 |
if not storage_type: |
|
311 |
raise http.HttpBadRequest("Missing the required 'storage_type'" |
|
312 |
" parameter") |
|
313 |
|
|
314 |
output_fields = self._checkStringVariable("output_fields", None) |
|
315 |
if not output_fields: |
|
316 |
raise http.HttpBadRequest("Missing the required 'output_fields'" |
|
317 |
" parameter") |
|
318 |
|
|
319 |
op = opcodes.OpQueryNodeStorage(nodes=[node_name], |
|
320 |
storage_type=storage_type, |
|
321 |
output_fields=output_fields.split(",")) |
|
322 |
return baserlib.SubmitJob([op]) |
|
323 |
|
|
324 |
|
|
299 | 325 |
class R_2_instances(baserlib.R_Generic): |
300 | 326 |
"""/2/instances resource. |
301 | 327 |
|
Also available in: Unified diff